Class MaintenancePolicy.Builder (2.44.0)

public static final class MaintenancePolicy.Builder extends GeneratedMessageV3.Builder<MaintenancePolicy.Builder> implements MaintenancePolicyOrBuilder

Maintenance policy for an instance.

Protobuf type google.cloud.redis.v1beta1.MaintenancePolicy

Static Methods

getDescriptor()

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

Methods

addAllWeeklyMaintenanceWindow(Iterable<? extends WeeklyMaintenanceWindow> values)

public MaintenancePolicy.Builder addAllWeeklyMaintenanceWindow(Iterable<? extends WeeklyMaintenanceWindow> values)

Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.

repeated .google.cloud.redis.v1beta1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.redis.v1beta1.WeeklyMaintenanceWindow>
Returns
TypeDescription
MaintenancePolicy.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addWeeklyMaintenanceWindow(WeeklyMaintenanceWindow value)

public MaintenancePolicy.Builder addWeeklyMaintenanceWindow(WeeklyMaintenanceWindow value)

Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.

repeated .google.cloud.redis.v1beta1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueWeeklyMaintenanceWindow
Returns
TypeDescription
MaintenancePolicy.Builder

addWeeklyMaintenanceWindow(WeeklyMaintenanceWindow.Builder builderForValue)

public MaintenancePolicy.Builder addWeeklyMaintenanceWindow(WeeklyMaintenanceWindow.Builder builderForValue)

Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.

repeated .google.cloud.redis.v1beta1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueWeeklyMaintenanceWindow.Builder
Returns
TypeDescription
MaintenancePolicy.Builder

addWeeklyMaintenanceWindow(int index, WeeklyMaintenanceWindow value)

public MaintenancePolicy.Builder addWeeklyMaintenanceWindow(int index, WeeklyMaintenanceWindow value)

Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.

repeated .google.cloud.redis.v1beta1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint
valueWeeklyMaintenanceWindow
Returns
TypeDescription
MaintenancePolicy.Builder

addWeeklyMaintenanceWindow(int index, WeeklyMaintenanceWindow.Builder builderForValue)

public MaintenancePolicy.Builder addWeeklyMaintenanceWindow(int index, WeeklyMaintenanceWindow.Builder builderForValue)

Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.

repeated .google.cloud.redis.v1beta1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint
builderForValueWeeklyMaintenanceWindow.Builder
Returns
TypeDescription
MaintenancePolicy.Builder

addWeeklyMaintenanceWindowBuilder()

public WeeklyMaintenanceWindow.Builder addWeeklyMaintenanceWindowBuilder()

Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.

repeated .google.cloud.redis.v1beta1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
WeeklyMaintenanceWindow.Builder

addWeeklyMaintenanceWindowBuilder(int index)

public WeeklyMaintenanceWindow.Builder addWeeklyMaintenanceWindowBuilder(int index)

Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.

repeated .google.cloud.redis.v1beta1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
WeeklyMaintenanceWindow.Builder

build()

public MaintenancePolicy build()
Returns
TypeDescription
MaintenancePolicy

buildPartial()

public MaintenancePolicy buildPartial()
Returns
TypeDescription
MaintenancePolicy

clear()

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

clearCreateTime()

public MaintenancePolicy.Builder clearCreateTime()

Output only. The time when the policy was created.

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

Returns
TypeDescription
MaintenancePolicy.Builder

clearDescription()

public MaintenancePolicy.Builder clearDescription()

Optional. Description of what this policy is for. Create/Update methods return INVALID_ARGUMENT if the length is greater than 512.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
MaintenancePolicy.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearUpdateTime()

public MaintenancePolicy.Builder clearUpdateTime()

Output only. The time when the policy was last updated.

.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
MaintenancePolicy.Builder

clearWeeklyMaintenanceWindow()

public MaintenancePolicy.Builder clearWeeklyMaintenanceWindow()

Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.

repeated .google.cloud.redis.v1beta1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
MaintenancePolicy.Builder

clone()

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

getCreateTime()

public Timestamp getCreateTime()

Output only. The time when the policy was created.

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

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The time when the policy was created.

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

Returns
TypeDescription
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time when the policy was created.

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

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public MaintenancePolicy getDefaultInstanceForType()
Returns
TypeDescription
MaintenancePolicy

getDescription()

public String getDescription()

Optional. Description of what this policy is for. Create/Update methods return INVALID_ARGUMENT if the length is greater than 512.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. Description of what this policy is for. Create/Update methods return INVALID_ARGUMENT if the length is greater than 512.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The time when the policy was last updated.

.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. The time when the policy was last updated.

.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The time when the policy was last updated.

.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getWeeklyMaintenanceWindow(int index)

public WeeklyMaintenanceWindow getWeeklyMaintenanceWindow(int index)

Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.

repeated .google.cloud.redis.v1beta1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
WeeklyMaintenanceWindow

getWeeklyMaintenanceWindowBuilder(int index)

public WeeklyMaintenanceWindow.Builder getWeeklyMaintenanceWindowBuilder(int index)

Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.

repeated .google.cloud.redis.v1beta1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
WeeklyMaintenanceWindow.Builder

getWeeklyMaintenanceWindowBuilderList()

public List<WeeklyMaintenanceWindow.Builder> getWeeklyMaintenanceWindowBuilderList()

Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.

repeated .google.cloud.redis.v1beta1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
List<Builder>

getWeeklyMaintenanceWindowCount()

public int getWeeklyMaintenanceWindowCount()

Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.

repeated .google.cloud.redis.v1beta1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

getWeeklyMaintenanceWindowList()

public List<WeeklyMaintenanceWindow> getWeeklyMaintenanceWindowList()

Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.

repeated .google.cloud.redis.v1beta1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
List<WeeklyMaintenanceWindow>

getWeeklyMaintenanceWindowOrBuilder(int index)

public WeeklyMaintenanceWindowOrBuilder getWeeklyMaintenanceWindowOrBuilder(int index)

Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.

repeated .google.cloud.redis.v1beta1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
WeeklyMaintenanceWindowOrBuilder

getWeeklyMaintenanceWindowOrBuilderList()

public List<? extends WeeklyMaintenanceWindowOrBuilder> getWeeklyMaintenanceWindowOrBuilderList()

Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.

repeated .google.cloud.redis.v1beta1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
List<? extends com.google.cloud.redis.v1beta1.WeeklyMaintenanceWindowOrBuilder>

hasCreateTime()

public boolean hasCreateTime()

Output only. The time when the policy was created.

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

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The time when the policy was last updated.

.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCreateTime(Timestamp value)

public MaintenancePolicy.Builder mergeCreateTime(Timestamp value)

Output only. The time when the policy was created.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
MaintenancePolicy.Builder

mergeFrom(MaintenancePolicy other)

public MaintenancePolicy.Builder mergeFrom(MaintenancePolicy other)
Parameter
NameDescription
otherMaintenancePolicy
Returns
TypeDescription
MaintenancePolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateTime(Timestamp value)

public MaintenancePolicy.Builder mergeUpdateTime(Timestamp value)

Output only. The time when the policy was last updated.

.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
MaintenancePolicy.Builder

removeWeeklyMaintenanceWindow(int index)

public MaintenancePolicy.Builder removeWeeklyMaintenanceWindow(int index)

Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.

repeated .google.cloud.redis.v1beta1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
MaintenancePolicy.Builder

setCreateTime(Timestamp value)

public MaintenancePolicy.Builder setCreateTime(Timestamp value)

Output only. The time when the policy was created.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
MaintenancePolicy.Builder

setCreateTime(Timestamp.Builder builderForValue)

public MaintenancePolicy.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time when the policy was created.

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

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
MaintenancePolicy.Builder

setDescription(String value)

public MaintenancePolicy.Builder setDescription(String value)

Optional. Description of what this policy is for. Create/Update methods return INVALID_ARGUMENT if the length is greater than 512.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
MaintenancePolicy.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public MaintenancePolicy.Builder setDescriptionBytes(ByteString value)

Optional. Description of what this policy is for. Create/Update methods return INVALID_ARGUMENT if the length is greater than 512.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
MaintenancePolicy.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdateTime(Timestamp value)

public MaintenancePolicy.Builder setUpdateTime(Timestamp value)

Output only. The time when the policy was last updated.

.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
MaintenancePolicy.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public MaintenancePolicy.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. The time when the policy was last updated.

.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
MaintenancePolicy.Builder

setWeeklyMaintenanceWindow(int index, WeeklyMaintenanceWindow value)

public MaintenancePolicy.Builder setWeeklyMaintenanceWindow(int index, WeeklyMaintenanceWindow value)

Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.

repeated .google.cloud.redis.v1beta1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint
valueWeeklyMaintenanceWindow
Returns
TypeDescription
MaintenancePolicy.Builder

setWeeklyMaintenanceWindow(int index, WeeklyMaintenanceWindow.Builder builderForValue)

public MaintenancePolicy.Builder setWeeklyMaintenanceWindow(int index, WeeklyMaintenanceWindow.Builder builderForValue)

Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.

repeated .google.cloud.redis.v1beta1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint
builderForValueWeeklyMaintenanceWindow.Builder
Returns
TypeDescription
MaintenancePolicy.Builder