Class AutoscalingPolicyScalingSchedule.Builder (1.31.0)

public static final class AutoscalingPolicyScalingSchedule.Builder extends GeneratedMessageV3.Builder<AutoscalingPolicyScalingSchedule.Builder> implements AutoscalingPolicyScalingScheduleOrBuilder

Scaling based on user-defined schedule. The message describes a single scaling schedule. A scaling schedule changes the minimum number of VM instances an autoscaler can recommend, which can trigger scaling out.

Protobuf type google.cloud.compute.v1.AutoscalingPolicyScalingSchedule

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AutoscalingPolicyScalingSchedule build()
Returns
TypeDescription
AutoscalingPolicyScalingSchedule

buildPartial()

public AutoscalingPolicyScalingSchedule buildPartial()
Returns
TypeDescription
AutoscalingPolicyScalingSchedule

clear()

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

clearDescription()

public AutoscalingPolicyScalingSchedule.Builder clearDescription()

A description of a scaling schedule.

optional string description = 422937596;

Returns
TypeDescription
AutoscalingPolicyScalingSchedule.Builder

This builder for chaining.

clearDisabled()

public AutoscalingPolicyScalingSchedule.Builder clearDisabled()

A boolean value that specifies whether a scaling schedule can influence autoscaler recommendations. If set to true, then a scaling schedule has no effect. This field is optional, and its value is false by default.

optional bool disabled = 270940796;

Returns
TypeDescription
AutoscalingPolicyScalingSchedule.Builder

This builder for chaining.

clearDurationSec()

public AutoscalingPolicyScalingSchedule.Builder clearDurationSec()

The duration of time intervals, in seconds, for which this scaling schedule is to run. The minimum allowed value is 300. This field is required.

optional int32 duration_sec = 212356902;

Returns
TypeDescription
AutoscalingPolicyScalingSchedule.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearMinRequiredReplicas()

public AutoscalingPolicyScalingSchedule.Builder clearMinRequiredReplicas()

The minimum number of VM instances that the autoscaler will recommend in time intervals starting according to schedule. This field is required.

optional int32 min_required_replicas = 365514414;

Returns
TypeDescription
AutoscalingPolicyScalingSchedule.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSchedule()

public AutoscalingPolicyScalingSchedule.Builder clearSchedule()

The start timestamps of time intervals when this scaling schedule is to provide a scaling signal. This field uses the extended cron format (with an optional year field). The expression can describe a single timestamp if the optional year is set, in which case the scaling schedule runs once. The schedule is interpreted with respect to time_zone. This field is required. Note: These timestamps only describe when autoscaler starts providing the scaling signal. The VMs need additional time to become serving.

optional string schedule = 375820951;

Returns
TypeDescription
AutoscalingPolicyScalingSchedule.Builder

This builder for chaining.

clearTimeZone()

public AutoscalingPolicyScalingSchedule.Builder clearTimeZone()

The time zone to use when interpreting the schedule. The value of this field must be a time zone name from the tz database: http://en.wikipedia.org/wiki/Tz_database. This field is assigned a default value of “UTC” if left empty.

optional string time_zone = 36848094;

Returns
TypeDescription
AutoscalingPolicyScalingSchedule.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public AutoscalingPolicyScalingSchedule getDefaultInstanceForType()
Returns
TypeDescription
AutoscalingPolicyScalingSchedule

getDescription()

public String getDescription()

A description of a scaling schedule.

optional string description = 422937596;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

A description of a scaling schedule.

optional string description = 422937596;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDisabled()

public boolean getDisabled()

A boolean value that specifies whether a scaling schedule can influence autoscaler recommendations. If set to true, then a scaling schedule has no effect. This field is optional, and its value is false by default.

optional bool disabled = 270940796;

Returns
TypeDescription
boolean

The disabled.

getDurationSec()

public int getDurationSec()

The duration of time intervals, in seconds, for which this scaling schedule is to run. The minimum allowed value is 300. This field is required.

optional int32 duration_sec = 212356902;

Returns
TypeDescription
int

The durationSec.

getMinRequiredReplicas()

public int getMinRequiredReplicas()

The minimum number of VM instances that the autoscaler will recommend in time intervals starting according to schedule. This field is required.

optional int32 min_required_replicas = 365514414;

Returns
TypeDescription
int

The minRequiredReplicas.

getSchedule()

public String getSchedule()

The start timestamps of time intervals when this scaling schedule is to provide a scaling signal. This field uses the extended cron format (with an optional year field). The expression can describe a single timestamp if the optional year is set, in which case the scaling schedule runs once. The schedule is interpreted with respect to time_zone. This field is required. Note: These timestamps only describe when autoscaler starts providing the scaling signal. The VMs need additional time to become serving.

optional string schedule = 375820951;

Returns
TypeDescription
String

The schedule.

getScheduleBytes()

public ByteString getScheduleBytes()

The start timestamps of time intervals when this scaling schedule is to provide a scaling signal. This field uses the extended cron format (with an optional year field). The expression can describe a single timestamp if the optional year is set, in which case the scaling schedule runs once. The schedule is interpreted with respect to time_zone. This field is required. Note: These timestamps only describe when autoscaler starts providing the scaling signal. The VMs need additional time to become serving.

optional string schedule = 375820951;

Returns
TypeDescription
ByteString

The bytes for schedule.

getTimeZone()

public String getTimeZone()

The time zone to use when interpreting the schedule. The value of this field must be a time zone name from the tz database: http://en.wikipedia.org/wiki/Tz_database. This field is assigned a default value of “UTC” if left empty.

optional string time_zone = 36848094;

Returns
TypeDescription
String

The timeZone.

getTimeZoneBytes()

public ByteString getTimeZoneBytes()

The time zone to use when interpreting the schedule. The value of this field must be a time zone name from the tz database: http://en.wikipedia.org/wiki/Tz_database. This field is assigned a default value of “UTC” if left empty.

optional string time_zone = 36848094;

Returns
TypeDescription
ByteString

The bytes for timeZone.

hasDescription()

public boolean hasDescription()

A description of a scaling schedule.

optional string description = 422937596;

Returns
TypeDescription
boolean

Whether the description field is set.

hasDisabled()

public boolean hasDisabled()

A boolean value that specifies whether a scaling schedule can influence autoscaler recommendations. If set to true, then a scaling schedule has no effect. This field is optional, and its value is false by default.

optional bool disabled = 270940796;

Returns
TypeDescription
boolean

Whether the disabled field is set.

hasDurationSec()

public boolean hasDurationSec()

The duration of time intervals, in seconds, for which this scaling schedule is to run. The minimum allowed value is 300. This field is required.

optional int32 duration_sec = 212356902;

Returns
TypeDescription
boolean

Whether the durationSec field is set.

hasMinRequiredReplicas()

public boolean hasMinRequiredReplicas()

The minimum number of VM instances that the autoscaler will recommend in time intervals starting according to schedule. This field is required.

optional int32 min_required_replicas = 365514414;

Returns
TypeDescription
boolean

Whether the minRequiredReplicas field is set.

hasSchedule()

public boolean hasSchedule()

The start timestamps of time intervals when this scaling schedule is to provide a scaling signal. This field uses the extended cron format (with an optional year field). The expression can describe a single timestamp if the optional year is set, in which case the scaling schedule runs once. The schedule is interpreted with respect to time_zone. This field is required. Note: These timestamps only describe when autoscaler starts providing the scaling signal. The VMs need additional time to become serving.

optional string schedule = 375820951;

Returns
TypeDescription
boolean

Whether the schedule field is set.

hasTimeZone()

public boolean hasTimeZone()

The time zone to use when interpreting the schedule. The value of this field must be a time zone name from the tz database: http://en.wikipedia.org/wiki/Tz_database. This field is assigned a default value of “UTC” if left empty.

optional string time_zone = 36848094;

Returns
TypeDescription
boolean

Whether the timeZone field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(AutoscalingPolicyScalingSchedule other)

public AutoscalingPolicyScalingSchedule.Builder mergeFrom(AutoscalingPolicyScalingSchedule other)
Parameter
NameDescription
otherAutoscalingPolicyScalingSchedule
Returns
TypeDescription
AutoscalingPolicyScalingSchedule.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setDescription(String value)

public AutoscalingPolicyScalingSchedule.Builder setDescription(String value)

A description of a scaling schedule.

optional string description = 422937596;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
AutoscalingPolicyScalingSchedule.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public AutoscalingPolicyScalingSchedule.Builder setDescriptionBytes(ByteString value)

A description of a scaling schedule.

optional string description = 422937596;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
AutoscalingPolicyScalingSchedule.Builder

This builder for chaining.

setDisabled(boolean value)

public AutoscalingPolicyScalingSchedule.Builder setDisabled(boolean value)

A boolean value that specifies whether a scaling schedule can influence autoscaler recommendations. If set to true, then a scaling schedule has no effect. This field is optional, and its value is false by default.

optional bool disabled = 270940796;

Parameter
NameDescription
valueboolean

The disabled to set.

Returns
TypeDescription
AutoscalingPolicyScalingSchedule.Builder

This builder for chaining.

setDurationSec(int value)

public AutoscalingPolicyScalingSchedule.Builder setDurationSec(int value)

The duration of time intervals, in seconds, for which this scaling schedule is to run. The minimum allowed value is 300. This field is required.

optional int32 duration_sec = 212356902;

Parameter
NameDescription
valueint

The durationSec to set.

Returns
TypeDescription
AutoscalingPolicyScalingSchedule.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setMinRequiredReplicas(int value)

public AutoscalingPolicyScalingSchedule.Builder setMinRequiredReplicas(int value)

The minimum number of VM instances that the autoscaler will recommend in time intervals starting according to schedule. This field is required.

optional int32 min_required_replicas = 365514414;

Parameter
NameDescription
valueint

The minRequiredReplicas to set.

Returns
TypeDescription
AutoscalingPolicyScalingSchedule.Builder

This builder for chaining.

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

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

setSchedule(String value)

public AutoscalingPolicyScalingSchedule.Builder setSchedule(String value)

The start timestamps of time intervals when this scaling schedule is to provide a scaling signal. This field uses the extended cron format (with an optional year field). The expression can describe a single timestamp if the optional year is set, in which case the scaling schedule runs once. The schedule is interpreted with respect to time_zone. This field is required. Note: These timestamps only describe when autoscaler starts providing the scaling signal. The VMs need additional time to become serving.

optional string schedule = 375820951;

Parameter
NameDescription
valueString

The schedule to set.

Returns
TypeDescription
AutoscalingPolicyScalingSchedule.Builder

This builder for chaining.

setScheduleBytes(ByteString value)

public AutoscalingPolicyScalingSchedule.Builder setScheduleBytes(ByteString value)

The start timestamps of time intervals when this scaling schedule is to provide a scaling signal. This field uses the extended cron format (with an optional year field). The expression can describe a single timestamp if the optional year is set, in which case the scaling schedule runs once. The schedule is interpreted with respect to time_zone. This field is required. Note: These timestamps only describe when autoscaler starts providing the scaling signal. The VMs need additional time to become serving.

optional string schedule = 375820951;

Parameter
NameDescription
valueByteString

The bytes for schedule to set.

Returns
TypeDescription
AutoscalingPolicyScalingSchedule.Builder

This builder for chaining.

setTimeZone(String value)

public AutoscalingPolicyScalingSchedule.Builder setTimeZone(String value)

The time zone to use when interpreting the schedule. The value of this field must be a time zone name from the tz database: http://en.wikipedia.org/wiki/Tz_database. This field is assigned a default value of “UTC” if left empty.

optional string time_zone = 36848094;

Parameter
NameDescription
valueString

The timeZone to set.

Returns
TypeDescription
AutoscalingPolicyScalingSchedule.Builder

This builder for chaining.

setTimeZoneBytes(ByteString value)

public AutoscalingPolicyScalingSchedule.Builder setTimeZoneBytes(ByteString value)

The time zone to use when interpreting the schedule. The value of this field must be a time zone name from the tz database: http://en.wikipedia.org/wiki/Tz_database. This field is assigned a default value of “UTC” if left empty.

optional string time_zone = 36848094;

Parameter
NameDescription
valueByteString

The bytes for timeZone to set.

Returns
TypeDescription
AutoscalingPolicyScalingSchedule.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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