Class BackupPolicy.Builder (0.26.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
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public BackupPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BackupPolicy.Builder
Overrides

build()

public BackupPolicy build()
Returns
Type Description
BackupPolicy

buildPartial()

public BackupPolicy buildPartial()
Returns
Type Description
BackupPolicy

clear()

public BackupPolicy.Builder clear()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
BackupPolicy.Builder

This builder for chaining.

clearDescription()

public BackupPolicy.Builder clearDescription()

Description of the backup policy.

optional string description = 5;

Returns
Type Description
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
Type Description
BackupPolicy.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public BackupPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
BackupPolicy.Builder
Overrides

clearLabels()

public BackupPolicy.Builder clearLabels()
Returns
Type Description
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
Type Description
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
Type Description
BackupPolicy.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public BackupPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
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
Type Description
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
Type Description
BackupPolicy.Builder

This builder for chaining.

clone()

public BackupPolicy.Builder clone()
Returns
Type Description
BackupPolicy.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Parameter
Name Description
key String
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
int

The dailyBackupLimit.

getDefaultInstanceForType()

public BackupPolicy getDefaultInstanceForType()
Returns
Type Description
BackupPolicy

getDescription()

public String getDescription()

Description of the backup policy.

optional string description = 5;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Description of the backup policy.

optional string description = 5;

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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
Type Description
boolean

The enabled.

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Returns
Type Description
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
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Parameter
Name Description
key String
Returns
Type Description
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
Type Description
int

The monthlyBackupLimit.

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
boolean

Whether the dailyBackupLimit field is set.

hasDescription()

public boolean hasDescription()

Description of the backup policy.

optional string description = 5;

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
boolean

Whether the weeklyBackupLimit field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
BackupPolicy.Builder

mergeFrom(BackupPolicy other)

public BackupPolicy.Builder mergeFrom(BackupPolicy other)
Parameter
Name Description
other BackupPolicy
Returns
Type Description
BackupPolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BackupPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BackupPolicy.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public BackupPolicy.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
BackupPolicy.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BackupPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
values Map<String,String>
Returns
Type Description
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
Name Description
key String
value String
Returns
Type Description
BackupPolicy.Builder

removeLabels(String key)

public BackupPolicy.Builder removeLabels(String key)

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Parameter
Name Description
key String
Returns
Type Description
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
Name Description
value int

The assignedVolumeCount to set.

Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
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
Name Description
builderForValue Builder
Returns
Type Description
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
Name Description
value int

The dailyBackupLimit to set.

Returns
Type Description
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
Name Description
value String

The description to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
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
Name Description
value boolean

The enabled to set.

Returns
Type Description
BackupPolicy.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public BackupPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
value int

The monthlyBackupLimit to set.

Returns
Type Description
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
Name Description
value String

The name to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
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
Name Description
value BackupPolicy.State

The state to set.

Returns
Type Description
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
Name Description
value int

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

Returns
Type Description
BackupPolicy.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final BackupPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
value int

The weeklyBackupLimit to set.

Returns
Type Description
BackupPolicy.Builder

This builder for chaining.