All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.netapp.v1.BackupConfig Maven / Gradle / Ivy

/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/netapp/v1/volume.proto

// Protobuf Java Version: 3.25.4
package com.google.cloud.netapp.v1;

/**
 *
 *
 * 
 * BackupConfig contains backup related config on a volume.
 * 
* * Protobuf type {@code google.cloud.netapp.v1.BackupConfig} */ public final class BackupConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.BackupConfig) BackupConfigOrBuilder { private static final long serialVersionUID = 0L; // Use BackupConfig.newBuilder() to construct. private BackupConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private BackupConfig() { backupPolicies_ = com.google.protobuf.LazyStringArrayList.emptyList(); backupVault_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new BackupConfig(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.netapp.v1.VolumeProto .internal_static_google_cloud_netapp_v1_BackupConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.netapp.v1.VolumeProto .internal_static_google_cloud_netapp_v1_BackupConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.netapp.v1.BackupConfig.class, com.google.cloud.netapp.v1.BackupConfig.Builder.class); } private int bitField0_; public static final int BACKUP_POLICIES_FIELD_NUMBER = 1; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList backupPolicies_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * * *
   * Optional. When specified, schedule backups will be created based on the
   * policy configuration.
   * 
* * * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return A list containing the backupPolicies. */ public com.google.protobuf.ProtocolStringList getBackupPoliciesList() { return backupPolicies_; } /** * * *
   * Optional. When specified, schedule backups will be created based on the
   * policy configuration.
   * 
* * * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The count of backupPolicies. */ public int getBackupPoliciesCount() { return backupPolicies_.size(); } /** * * *
   * Optional. When specified, schedule backups will be created based on the
   * policy configuration.
   * 
* * * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @param index The index of the element to return. * @return The backupPolicies at the given index. */ public java.lang.String getBackupPolicies(int index) { return backupPolicies_.get(index); } /** * * *
   * Optional. When specified, schedule backups will be created based on the
   * policy configuration.
   * 
* * * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @param index The index of the value to return. * @return The bytes of the backupPolicies at the given index. */ public com.google.protobuf.ByteString getBackupPoliciesBytes(int index) { return backupPolicies_.getByteString(index); } public static final int BACKUP_VAULT_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object backupVault_ = ""; /** * * *
   * Optional. Name of backup vault.
   * Format:
   * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}
   * 
* * * string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The backupVault. */ @java.lang.Override public java.lang.String getBackupVault() { java.lang.Object ref = backupVault_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); backupVault_ = s; return s; } } /** * * *
   * Optional. Name of backup vault.
   * Format:
   * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}
   * 
* * * string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The bytes for backupVault. */ @java.lang.Override public com.google.protobuf.ByteString getBackupVaultBytes() { java.lang.Object ref = backupVault_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); backupVault_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SCHEDULED_BACKUP_ENABLED_FIELD_NUMBER = 3; private boolean scheduledBackupEnabled_ = false; /** * * *
   * Optional. When set to true, scheduled backup is enabled on the volume.
   * This field should be nil when there's no backup policy attached.
   * 
* * optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the scheduledBackupEnabled field is set. */ @java.lang.Override public boolean hasScheduledBackupEnabled() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Optional. When set to true, scheduled backup is enabled on the volume.
   * This field should be nil when there's no backup policy attached.
   * 
* * optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The scheduledBackupEnabled. */ @java.lang.Override public boolean getScheduledBackupEnabled() { return scheduledBackupEnabled_; } public static final int BACKUP_CHAIN_BYTES_FIELD_NUMBER = 4; private long backupChainBytes_ = 0L; /** * * *
   * Output only. Total size of all backups in a chain in bytes = baseline
   * backup size + sum(incremental backup size).
   * 
* * optional int64 backup_chain_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the backupChainBytes field is set. */ @java.lang.Override public boolean hasBackupChainBytes() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
   * Output only. Total size of all backups in a chain in bytes = baseline
   * backup size + sum(incremental backup size).
   * 
* * optional int64 backup_chain_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The backupChainBytes. */ @java.lang.Override public long getBackupChainBytes() { return backupChainBytes_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < backupPolicies_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, backupPolicies_.getRaw(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupVault_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backupVault_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(3, scheduledBackupEnabled_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeInt64(4, backupChainBytes_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < backupPolicies_.size(); i++) { dataSize += computeStringSizeNoTag(backupPolicies_.getRaw(i)); } size += dataSize; size += 1 * getBackupPoliciesList().size(); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupVault_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backupVault_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, scheduledBackupEnabled_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, backupChainBytes_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.netapp.v1.BackupConfig)) { return super.equals(obj); } com.google.cloud.netapp.v1.BackupConfig other = (com.google.cloud.netapp.v1.BackupConfig) obj; if (!getBackupPoliciesList().equals(other.getBackupPoliciesList())) return false; if (!getBackupVault().equals(other.getBackupVault())) return false; if (hasScheduledBackupEnabled() != other.hasScheduledBackupEnabled()) return false; if (hasScheduledBackupEnabled()) { if (getScheduledBackupEnabled() != other.getScheduledBackupEnabled()) return false; } if (hasBackupChainBytes() != other.hasBackupChainBytes()) return false; if (hasBackupChainBytes()) { if (getBackupChainBytes() != other.getBackupChainBytes()) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getBackupPoliciesCount() > 0) { hash = (37 * hash) + BACKUP_POLICIES_FIELD_NUMBER; hash = (53 * hash) + getBackupPoliciesList().hashCode(); } hash = (37 * hash) + BACKUP_VAULT_FIELD_NUMBER; hash = (53 * hash) + getBackupVault().hashCode(); if (hasScheduledBackupEnabled()) { hash = (37 * hash) + SCHEDULED_BACKUP_ENABLED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getScheduledBackupEnabled()); } if (hasBackupChainBytes()) { hash = (37 * hash) + BACKUP_CHAIN_BYTES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBackupChainBytes()); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.netapp.v1.BackupConfig parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.netapp.v1.BackupConfig parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.netapp.v1.BackupConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.netapp.v1.BackupConfig parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.netapp.v1.BackupConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.netapp.v1.BackupConfig parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.netapp.v1.BackupConfig parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.netapp.v1.BackupConfig parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.netapp.v1.BackupConfig parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.netapp.v1.BackupConfig parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.netapp.v1.BackupConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.netapp.v1.BackupConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.netapp.v1.BackupConfig prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
   * BackupConfig contains backup related config on a volume.
   * 
* * Protobuf type {@code google.cloud.netapp.v1.BackupConfig} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.BackupConfig) com.google.cloud.netapp.v1.BackupConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.netapp.v1.VolumeProto .internal_static_google_cloud_netapp_v1_BackupConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.netapp.v1.VolumeProto .internal_static_google_cloud_netapp_v1_BackupConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.netapp.v1.BackupConfig.class, com.google.cloud.netapp.v1.BackupConfig.Builder.class); } // Construct using com.google.cloud.netapp.v1.BackupConfig.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; backupPolicies_ = com.google.protobuf.LazyStringArrayList.emptyList(); backupVault_ = ""; scheduledBackupEnabled_ = false; backupChainBytes_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.netapp.v1.VolumeProto .internal_static_google_cloud_netapp_v1_BackupConfig_descriptor; } @java.lang.Override public com.google.cloud.netapp.v1.BackupConfig getDefaultInstanceForType() { return com.google.cloud.netapp.v1.BackupConfig.getDefaultInstance(); } @java.lang.Override public com.google.cloud.netapp.v1.BackupConfig build() { com.google.cloud.netapp.v1.BackupConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.netapp.v1.BackupConfig buildPartial() { com.google.cloud.netapp.v1.BackupConfig result = new com.google.cloud.netapp.v1.BackupConfig(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.cloud.netapp.v1.BackupConfig result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { backupPolicies_.makeImmutable(); result.backupPolicies_ = backupPolicies_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.backupVault_ = backupVault_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.scheduledBackupEnabled_ = scheduledBackupEnabled_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000008) != 0)) { result.backupChainBytes_ = backupChainBytes_; to_bitField0_ |= 0x00000002; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.netapp.v1.BackupConfig) { return mergeFrom((com.google.cloud.netapp.v1.BackupConfig) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.netapp.v1.BackupConfig other) { if (other == com.google.cloud.netapp.v1.BackupConfig.getDefaultInstance()) return this; if (!other.backupPolicies_.isEmpty()) { if (backupPolicies_.isEmpty()) { backupPolicies_ = other.backupPolicies_; bitField0_ |= 0x00000001; } else { ensureBackupPoliciesIsMutable(); backupPolicies_.addAll(other.backupPolicies_); } onChanged(); } if (!other.getBackupVault().isEmpty()) { backupVault_ = other.backupVault_; bitField0_ |= 0x00000002; onChanged(); } if (other.hasScheduledBackupEnabled()) { setScheduledBackupEnabled(other.getScheduledBackupEnabled()); } if (other.hasBackupChainBytes()) { setBackupChainBytes(other.getBackupChainBytes()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); ensureBackupPoliciesIsMutable(); backupPolicies_.add(s); break; } // case 10 case 18: { backupVault_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 24: { scheduledBackupEnabled_ = input.readBool(); bitField0_ |= 0x00000004; break; } // case 24 case 32: { backupChainBytes_ = input.readInt64(); bitField0_ |= 0x00000008; break; } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private com.google.protobuf.LazyStringArrayList backupPolicies_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureBackupPoliciesIsMutable() { if (!backupPolicies_.isModifiable()) { backupPolicies_ = new com.google.protobuf.LazyStringArrayList(backupPolicies_); } bitField0_ |= 0x00000001; } /** * * *
     * Optional. When specified, schedule backups will be created based on the
     * policy configuration.
     * 
* * * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return A list containing the backupPolicies. */ public com.google.protobuf.ProtocolStringList getBackupPoliciesList() { backupPolicies_.makeImmutable(); return backupPolicies_; } /** * * *
     * Optional. When specified, schedule backups will be created based on the
     * policy configuration.
     * 
* * * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The count of backupPolicies. */ public int getBackupPoliciesCount() { return backupPolicies_.size(); } /** * * *
     * Optional. When specified, schedule backups will be created based on the
     * policy configuration.
     * 
* * * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @param index The index of the element to return. * @return The backupPolicies at the given index. */ public java.lang.String getBackupPolicies(int index) { return backupPolicies_.get(index); } /** * * *
     * Optional. When specified, schedule backups will be created based on the
     * policy configuration.
     * 
* * * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @param index The index of the value to return. * @return The bytes of the backupPolicies at the given index. */ public com.google.protobuf.ByteString getBackupPoliciesBytes(int index) { return backupPolicies_.getByteString(index); } /** * * *
     * Optional. When specified, schedule backups will be created based on the
     * policy configuration.
     * 
* * * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @param index The index to set the value at. * @param value The backupPolicies to set. * @return This builder for chaining. */ public Builder setBackupPolicies(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureBackupPoliciesIsMutable(); backupPolicies_.set(index, value); bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Optional. When specified, schedule backups will be created based on the
     * policy configuration.
     * 
* * * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @param value The backupPolicies to add. * @return This builder for chaining. */ public Builder addBackupPolicies(java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureBackupPoliciesIsMutable(); backupPolicies_.add(value); bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Optional. When specified, schedule backups will be created based on the
     * policy configuration.
     * 
* * * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @param values The backupPolicies to add. * @return This builder for chaining. */ public Builder addAllBackupPolicies(java.lang.Iterable values) { ensureBackupPoliciesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backupPolicies_); bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Optional. When specified, schedule backups will be created based on the
     * policy configuration.
     * 
* * * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return This builder for chaining. */ public Builder clearBackupPolicies() { backupPolicies_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); ; onChanged(); return this; } /** * * *
     * Optional. When specified, schedule backups will be created based on the
     * policy configuration.
     * 
* * * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @param value The bytes of the backupPolicies to add. * @return This builder for chaining. */ public Builder addBackupPoliciesBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureBackupPoliciesIsMutable(); backupPolicies_.add(value); bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object backupVault_ = ""; /** * * *
     * Optional. Name of backup vault.
     * Format:
     * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}
     * 
* * * string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The backupVault. */ public java.lang.String getBackupVault() { java.lang.Object ref = backupVault_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); backupVault_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Optional. Name of backup vault.
     * Format:
     * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}
     * 
* * * string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The bytes for backupVault. */ public com.google.protobuf.ByteString getBackupVaultBytes() { java.lang.Object ref = backupVault_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); backupVault_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Optional. Name of backup vault.
     * Format:
     * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}
     * 
* * * string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @param value The backupVault to set. * @return This builder for chaining. */ public Builder setBackupVault(java.lang.String value) { if (value == null) { throw new NullPointerException(); } backupVault_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Optional. Name of backup vault.
     * Format:
     * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}
     * 
* * * string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return This builder for chaining. */ public Builder clearBackupVault() { backupVault_ = getDefaultInstance().getBackupVault(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * Optional. Name of backup vault.
     * Format:
     * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}
     * 
* * * string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @param value The bytes for backupVault to set. * @return This builder for chaining. */ public Builder setBackupVaultBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); backupVault_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private boolean scheduledBackupEnabled_; /** * * *
     * Optional. When set to true, scheduled backup is enabled on the volume.
     * This field should be nil when there's no backup policy attached.
     * 
* * optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the scheduledBackupEnabled field is set. */ @java.lang.Override public boolean hasScheduledBackupEnabled() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
     * Optional. When set to true, scheduled backup is enabled on the volume.
     * This field should be nil when there's no backup policy attached.
     * 
* * optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The scheduledBackupEnabled. */ @java.lang.Override public boolean getScheduledBackupEnabled() { return scheduledBackupEnabled_; } /** * * *
     * Optional. When set to true, scheduled backup is enabled on the volume.
     * This field should be nil when there's no backup policy attached.
     * 
* * optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The scheduledBackupEnabled to set. * @return This builder for chaining. */ public Builder setScheduledBackupEnabled(boolean value) { scheduledBackupEnabled_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Optional. When set to true, scheduled backup is enabled on the volume.
     * This field should be nil when there's no backup policy attached.
     * 
* * optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return This builder for chaining. */ public Builder clearScheduledBackupEnabled() { bitField0_ = (bitField0_ & ~0x00000004); scheduledBackupEnabled_ = false; onChanged(); return this; } private long backupChainBytes_; /** * * *
     * Output only. Total size of all backups in a chain in bytes = baseline
     * backup size + sum(incremental backup size).
     * 
* * optional int64 backup_chain_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the backupChainBytes field is set. */ @java.lang.Override public boolean hasBackupChainBytes() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
     * Output only. Total size of all backups in a chain in bytes = baseline
     * backup size + sum(incremental backup size).
     * 
* * optional int64 backup_chain_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The backupChainBytes. */ @java.lang.Override public long getBackupChainBytes() { return backupChainBytes_; } /** * * *
     * Output only. Total size of all backups in a chain in bytes = baseline
     * backup size + sum(incremental backup size).
     * 
* * optional int64 backup_chain_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @param value The backupChainBytes to set. * @return This builder for chaining. */ public Builder setBackupChainBytes(long value) { backupChainBytes_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Output only. Total size of all backups in a chain in bytes = baseline
     * backup size + sum(incremental backup size).
     * 
* * optional int64 backup_chain_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return This builder for chaining. */ public Builder clearBackupChainBytes() { bitField0_ = (bitField0_ & ~0x00000008); backupChainBytes_ = 0L; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.BackupConfig) } // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.BackupConfig) private static final com.google.cloud.netapp.v1.BackupConfig DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.BackupConfig(); } public static com.google.cloud.netapp.v1.BackupConfig getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public BackupConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.netapp.v1.BackupConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy