Class BackupPolicy.Builder (0.16.0)

public static final class BackupPolicy.Builder extends GeneratedMessageV3.Builder<BackupPolicy.Builder> implements BackupPolicyOrBuilder

Backup Policy.

Protobuf type google.cloud.netapp.v1.BackupPolicy

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public BackupPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
BackupPolicy.Builder
Overrides

build()

public BackupPolicy build()
Returns
TypeDescription
BackupPolicy

buildPartial()

public BackupPolicy buildPartial()
Returns
TypeDescription
BackupPolicy

clear()

public BackupPolicy.Builder clear()
Returns
TypeDescription
BackupPolicy.Builder
Overrides

clearAssignedVolumeCount()

public BackupPolicy.Builder clearAssignedVolumeCount()

Output only. The total number of volumes assigned by this backup policy.

optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
BackupPolicy.Builder

This builder for chaining.

clearCreateTime()

public BackupPolicy.Builder clearCreateTime()

Output only. The time when the backup policy was created.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
BackupPolicy.Builder

clearDailyBackupLimit()

public BackupPolicy.Builder clearDailyBackupLimit()

Number of daily backups to keep. Note that the minimum daily backup limit is 2.

optional int32 daily_backup_limit = 2;

Returns
TypeDescription
BackupPolicy.Builder

This builder for chaining.

clearDescription()

public BackupPolicy.Builder clearDescription()

Description of the backup policy.

optional string description = 5;

Returns
TypeDescription
BackupPolicy.Builder

This builder for chaining.

clearEnabled()

public BackupPolicy.Builder clearEnabled()

If enabled, make backups automatically according to the schedules. This will be applied to all volumes that have this policy attached and enforced on volume level. If not specified, default is true.

optional bool enabled = 6;

Returns
TypeDescription
BackupPolicy.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public BackupPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
BackupPolicy.Builder
Overrides

clearLabels()

public BackupPolicy.Builder clearLabels()
Returns
TypeDescription
BackupPolicy.Builder

clearMonthlyBackupLimit()

public BackupPolicy.Builder clearMonthlyBackupLimit()

Number of monthly backups to keep. Note that the sum of daily, weekly and monthly backups should be greater than 1.

optional int32 monthly_backup_limit = 4;

Returns
TypeDescription
BackupPolicy.Builder

This builder for chaining.

clearName()

public BackupPolicy.Builder clearName()

Identifier. The resource name of the backup policy. Format: projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
TypeDescription
BackupPolicy.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public BackupPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
BackupPolicy.Builder
Overrides

clearState()

public BackupPolicy.Builder clearState()

Output only. The backup policy state.

.google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
BackupPolicy.Builder

This builder for chaining.

clearWeeklyBackupLimit()

public BackupPolicy.Builder clearWeeklyBackupLimit()

Number of weekly backups to keep. Note that the sum of daily, weekly and monthly backups should be greater than 1.

optional int32 weekly_backup_limit = 3;

Returns
TypeDescription
BackupPolicy.Builder

This builder for chaining.

clone()

public BackupPolicy.Builder clone()
Returns
TypeDescription
BackupPolicy.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getAssignedVolumeCount()

public int getAssignedVolumeCount()

Output only. The total number of volumes assigned by this backup policy.

optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

The assignedVolumeCount.

getCreateTime()

public Timestamp getCreateTime()

Output only. The time when the backup policy was created.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The time when the backup policy was created.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time when the backup policy was created.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getDailyBackupLimit()

public int getDailyBackupLimit()

Number of daily backups to keep. Note that the minimum daily backup limit is 2.

optional int32 daily_backup_limit = 2;

Returns
TypeDescription
int

The dailyBackupLimit.

getDefaultInstanceForType()

public BackupPolicy getDefaultInstanceForType()
Returns
TypeDescription
BackupPolicy

getDescription()

public String getDescription()

Description of the backup policy.

optional string description = 5;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Description of the backup policy.

optional string description = 5;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEnabled()

public boolean getEnabled()

If enabled, make backups automatically according to the schedules. This will be applied to all volumes that have this policy attached and enforced on volume level. If not specified, default is true.

optional bool enabled = 6;

Returns
TypeDescription
boolean

The enabled.

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMonthlyBackupLimit()

public int getMonthlyBackupLimit()

Number of monthly backups to keep. Note that the sum of daily, weekly and monthly backups should be greater than 1.

optional int32 monthly_backup_limit = 4;

Returns
TypeDescription
int

The monthlyBackupLimit.

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getName()

public String getName()

Identifier. The resource name of the backup policy. Format: projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The resource name of the backup policy. Format: projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
TypeDescription
ByteString

The bytes for name.

getState()

public BackupPolicy.State getState()

Output only. The backup policy state.

.google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
BackupPolicy.State

The state.

getStateValue()

public int getStateValue()

Output only. The backup policy state.

.google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

The enum numeric value on the wire for state.

getWeeklyBackupLimit()

public int getWeeklyBackupLimit()

Number of weekly backups to keep. Note that the sum of daily, weekly and monthly backups should be greater than 1.

optional int32 weekly_backup_limit = 3;

Returns
TypeDescription
int

The weeklyBackupLimit.

hasAssignedVolumeCount()

public boolean hasAssignedVolumeCount()

Output only. The total number of volumes assigned by this backup policy.

optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the assignedVolumeCount field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. The time when the backup policy was created.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasDailyBackupLimit()

public boolean hasDailyBackupLimit()

Number of daily backups to keep. Note that the minimum daily backup limit is 2.

optional int32 daily_backup_limit = 2;

Returns
TypeDescription
boolean

Whether the dailyBackupLimit field is set.

hasDescription()

public boolean hasDescription()

Description of the backup policy.

optional string description = 5;

Returns
TypeDescription
boolean

Whether the description field is set.

hasEnabled()

public boolean hasEnabled()

If enabled, make backups automatically according to the schedules. This will be applied to all volumes that have this policy attached and enforced on volume level. If not specified, default is true.

optional bool enabled = 6;

Returns
TypeDescription
boolean

Whether the enabled field is set.

hasMonthlyBackupLimit()

public boolean hasMonthlyBackupLimit()

Number of monthly backups to keep. Note that the sum of daily, weekly and monthly backups should be greater than 1.

optional int32 monthly_backup_limit = 4;

Returns
TypeDescription
boolean

Whether the monthlyBackupLimit field is set.

hasWeeklyBackupLimit()

public boolean hasWeeklyBackupLimit()

Number of weekly backups to keep. Note that the sum of daily, weekly and monthly backups should be greater than 1.

optional int32 weekly_backup_limit = 3;

Returns
TypeDescription
boolean

Whether the weeklyBackupLimit field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCreateTime(Timestamp value)

public BackupPolicy.Builder mergeCreateTime(Timestamp value)

Output only. The time when the backup policy was created.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
BackupPolicy.Builder

mergeFrom(BackupPolicy other)

public BackupPolicy.Builder mergeFrom(BackupPolicy other)
Parameter
NameDescription
otherBackupPolicy
Returns
TypeDescription
BackupPolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BackupPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BackupPolicy.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public BackupPolicy.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
BackupPolicy.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BackupPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
BackupPolicy.Builder
Overrides

putAllLabels(Map<String,String> values)

public BackupPolicy.Builder putAllLabels(Map<String,String> values)

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
BackupPolicy.Builder

putLabels(String key, String value)

public BackupPolicy.Builder putLabels(String key, String value)

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
BackupPolicy.Builder

removeLabels(String key)

public BackupPolicy.Builder removeLabels(String key)

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Parameter
NameDescription
keyString
Returns
TypeDescription
BackupPolicy.Builder

setAssignedVolumeCount(int value)

public BackupPolicy.Builder setAssignedVolumeCount(int value)

Output only. The total number of volumes assigned by this backup policy.

optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueint

The assignedVolumeCount to set.

Returns
TypeDescription
BackupPolicy.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public BackupPolicy.Builder setCreateTime(Timestamp value)

Output only. The time when the backup policy was created.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
BackupPolicy.Builder

setCreateTime(Timestamp.Builder builderForValue)

public BackupPolicy.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time when the backup policy was created.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
BackupPolicy.Builder

setDailyBackupLimit(int value)

public BackupPolicy.Builder setDailyBackupLimit(int value)

Number of daily backups to keep. Note that the minimum daily backup limit is 2.

optional int32 daily_backup_limit = 2;

Parameter
NameDescription
valueint

The dailyBackupLimit to set.

Returns
TypeDescription
BackupPolicy.Builder

This builder for chaining.

setDescription(String value)

public BackupPolicy.Builder setDescription(String value)

Description of the backup policy.

optional string description = 5;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
BackupPolicy.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public BackupPolicy.Builder setDescriptionBytes(ByteString value)

Description of the backup policy.

optional string description = 5;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
BackupPolicy.Builder

This builder for chaining.

setEnabled(boolean value)

public BackupPolicy.Builder setEnabled(boolean value)

If enabled, make backups automatically according to the schedules. This will be applied to all volumes that have this policy attached and enforced on volume level. If not specified, default is true.

optional bool enabled = 6;

Parameter
NameDescription
valueboolean

The enabled to set.

Returns
TypeDescription
BackupPolicy.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public BackupPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
BackupPolicy.Builder
Overrides

setMonthlyBackupLimit(int value)

public BackupPolicy.Builder setMonthlyBackupLimit(int value)

Number of monthly backups to keep. Note that the sum of daily, weekly and monthly backups should be greater than 1.

optional int32 monthly_backup_limit = 4;

Parameter
NameDescription
valueint

The monthlyBackupLimit to set.

Returns
TypeDescription
BackupPolicy.Builder

This builder for chaining.

setName(String value)

public BackupPolicy.Builder setName(String value)

Identifier. The resource name of the backup policy. Format: projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
BackupPolicy.Builder

This builder for chaining.

setNameBytes(ByteString value)

public BackupPolicy.Builder setNameBytes(ByteString value)

Identifier. The resource name of the backup policy. Format: projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
BackupPolicy.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public BackupPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
BackupPolicy.Builder
Overrides

setState(BackupPolicy.State value)

public BackupPolicy.Builder setState(BackupPolicy.State value)

Output only. The backup policy state.

.google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueBackupPolicy.State

The state to set.

Returns
TypeDescription
BackupPolicy.Builder

This builder for chaining.

setStateValue(int value)

public BackupPolicy.Builder setStateValue(int value)

Output only. The backup policy state.

.google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueint

The enum numeric value on the wire for state to set.

Returns
TypeDescription
BackupPolicy.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final BackupPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
BackupPolicy.Builder
Overrides

setWeeklyBackupLimit(int value)

public BackupPolicy.Builder setWeeklyBackupLimit(int value)

Number of weekly backups to keep. Note that the sum of daily, weekly and monthly backups should be greater than 1.

optional int32 weekly_backup_limit = 3;

Parameter
NameDescription
valueint

The weeklyBackupLimit to set.

Returns
TypeDescription
BackupPolicy.Builder

This builder for chaining.