Class Scheduling.Builder (1.65.0)

public static final class Scheduling.Builder extends GeneratedMessageV3.Builder<Scheduling.Builder> implements SchedulingOrBuilder

Sets the scheduling options for an Instance.

Protobuf type google.cloud.compute.v1.Scheduling

Implements

SchedulingOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllNodeAffinities(Iterable<? extends SchedulingNodeAffinity> values)

public Scheduling.Builder addAllNodeAffinities(Iterable<? extends SchedulingNodeAffinity> values)

A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.

repeated .google.cloud.compute.v1.SchedulingNodeAffinity node_affinities = 461799971;

Parameter
Name Description
values Iterable<? extends com.google.cloud.compute.v1.SchedulingNodeAffinity>
Returns
Type Description
Scheduling.Builder

addNodeAffinities(SchedulingNodeAffinity value)

public Scheduling.Builder addNodeAffinities(SchedulingNodeAffinity value)

A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.

repeated .google.cloud.compute.v1.SchedulingNodeAffinity node_affinities = 461799971;

Parameter
Name Description
value SchedulingNodeAffinity
Returns
Type Description
Scheduling.Builder

addNodeAffinities(SchedulingNodeAffinity.Builder builderForValue)

public Scheduling.Builder addNodeAffinities(SchedulingNodeAffinity.Builder builderForValue)

A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.

repeated .google.cloud.compute.v1.SchedulingNodeAffinity node_affinities = 461799971;

Parameter
Name Description
builderForValue SchedulingNodeAffinity.Builder
Returns
Type Description
Scheduling.Builder

addNodeAffinities(int index, SchedulingNodeAffinity value)

public Scheduling.Builder addNodeAffinities(int index, SchedulingNodeAffinity value)

A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.

repeated .google.cloud.compute.v1.SchedulingNodeAffinity node_affinities = 461799971;

Parameters
Name Description
index int
value SchedulingNodeAffinity
Returns
Type Description
Scheduling.Builder

addNodeAffinities(int index, SchedulingNodeAffinity.Builder builderForValue)

public Scheduling.Builder addNodeAffinities(int index, SchedulingNodeAffinity.Builder builderForValue)

A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.

repeated .google.cloud.compute.v1.SchedulingNodeAffinity node_affinities = 461799971;

Parameters
Name Description
index int
builderForValue SchedulingNodeAffinity.Builder
Returns
Type Description
Scheduling.Builder

addNodeAffinitiesBuilder()

public SchedulingNodeAffinity.Builder addNodeAffinitiesBuilder()

A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.

repeated .google.cloud.compute.v1.SchedulingNodeAffinity node_affinities = 461799971;

Returns
Type Description
SchedulingNodeAffinity.Builder

addNodeAffinitiesBuilder(int index)

public SchedulingNodeAffinity.Builder addNodeAffinitiesBuilder(int index)

A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.

repeated .google.cloud.compute.v1.SchedulingNodeAffinity node_affinities = 461799971;

Parameter
Name Description
index int
Returns
Type Description
SchedulingNodeAffinity.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Scheduling build()
Returns
Type Description
Scheduling

buildPartial()

public Scheduling buildPartial()
Returns
Type Description
Scheduling

clear()

public Scheduling.Builder clear()
Returns
Type Description
Scheduling.Builder
Overrides

clearAutomaticRestart()

public Scheduling.Builder clearAutomaticRestart()

Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.

optional bool automatic_restart = 350821371;

Returns
Type Description
Scheduling.Builder

This builder for chaining.

clearAvailabilityDomain()

public Scheduling.Builder clearAvailabilityDomain()

Specifies the availability domain to place the instance in. The value must be a number between 1 and the number of availability domains specified in the spread placement policy attached to the instance.

optional int32 availability_domain = 252514344;

Returns
Type Description
Scheduling.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearInstanceTerminationAction()

public Scheduling.Builder clearInstanceTerminationAction()

Specifies the termination action for the instance. Check the InstanceTerminationAction enum for the list of possible values.

optional string instance_termination_action = 107380667;

Returns
Type Description
Scheduling.Builder

This builder for chaining.

clearLocalSsdRecoveryTimeout()

public Scheduling.Builder clearLocalSsdRecoveryTimeout()

Specifies the maximum amount of time a Local Ssd Vm should wait while recovery of the Local Ssd state is attempted. Its value should be in between 0 and 168 hours with hour granularity and the default value being 1 hour.

optional .google.cloud.compute.v1.Duration local_ssd_recovery_timeout = 268015590;

Returns
Type Description
Scheduling.Builder

clearLocationHint()

public Scheduling.Builder clearLocationHint()

An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.

optional string location_hint = 350519505;

Returns
Type Description
Scheduling.Builder

This builder for chaining.

clearMaxRunDuration()

public Scheduling.Builder clearMaxRunDuration()

Specifies the max run duration for the given instance. If specified, the instance termination action will be performed at the end of the run duration.

optional .google.cloud.compute.v1.Duration max_run_duration = 430839747;

Returns
Type Description
Scheduling.Builder

clearMinNodeCpus()

public Scheduling.Builder clearMinNodeCpus()

The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.

optional int32 min_node_cpus = 317231675;

Returns
Type Description
Scheduling.Builder

This builder for chaining.

clearNodeAffinities()

public Scheduling.Builder clearNodeAffinities()

A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.

repeated .google.cloud.compute.v1.SchedulingNodeAffinity node_affinities = 461799971;

Returns
Type Description
Scheduling.Builder

clearOnHostMaintenance()

public Scheduling.Builder clearOnHostMaintenance()

Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Set VM host maintenance policy. Check the OnHostMaintenance enum for the list of possible values.

optional string on_host_maintenance = 64616796;

Returns
Type Description
Scheduling.Builder

This builder for chaining.

clearOnInstanceStopAction()

public Scheduling.Builder clearOnInstanceStopAction()

optional .google.cloud.compute.v1.SchedulingOnInstanceStopAction on_instance_stop_action = 529876681;

Returns
Type Description
Scheduling.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Scheduling.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Scheduling.Builder
Overrides

clearPreemptible()

public Scheduling.Builder clearPreemptible()

Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a TERMINATED state. See Instance Life Cycle for more information on the possible instance states.

optional bool preemptible = 324203169;

Returns
Type Description
Scheduling.Builder

This builder for chaining.

clearProvisioningModel()

public Scheduling.Builder clearProvisioningModel()

Specifies the provisioning model of the instance. Check the ProvisioningModel enum for the list of possible values.

optional string provisioning_model = 494423;

Returns
Type Description
Scheduling.Builder

This builder for chaining.

clearTerminationTime()

public Scheduling.Builder clearTerminationTime()

Specifies the timestamp, when the instance will be terminated, in RFC3339 text format. If specified, the instance termination action will be performed at the termination time.

optional string termination_time = 428082984;

Returns
Type Description
Scheduling.Builder

This builder for chaining.

clone()

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

getAutomaticRestart()

public boolean getAutomaticRestart()

Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.

optional bool automatic_restart = 350821371;

Returns
Type Description
boolean

The automaticRestart.

getAvailabilityDomain()

public int getAvailabilityDomain()

Specifies the availability domain to place the instance in. The value must be a number between 1 and the number of availability domains specified in the spread placement policy attached to the instance.

optional int32 availability_domain = 252514344;

Returns
Type Description
int

The availabilityDomain.

getDefaultInstanceForType()

public Scheduling getDefaultInstanceForType()
Returns
Type Description
Scheduling

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getInstanceTerminationAction()

public String getInstanceTerminationAction()

Specifies the termination action for the instance. Check the InstanceTerminationAction enum for the list of possible values.

optional string instance_termination_action = 107380667;

Returns
Type Description
String

The instanceTerminationAction.

getInstanceTerminationActionBytes()

public ByteString getInstanceTerminationActionBytes()

Specifies the termination action for the instance. Check the InstanceTerminationAction enum for the list of possible values.

optional string instance_termination_action = 107380667;

Returns
Type Description
ByteString

The bytes for instanceTerminationAction.

getLocalSsdRecoveryTimeout()

public Duration getLocalSsdRecoveryTimeout()

Specifies the maximum amount of time a Local Ssd Vm should wait while recovery of the Local Ssd state is attempted. Its value should be in between 0 and 168 hours with hour granularity and the default value being 1 hour.

optional .google.cloud.compute.v1.Duration local_ssd_recovery_timeout = 268015590;

Returns
Type Description
Duration

The localSsdRecoveryTimeout.

getLocalSsdRecoveryTimeoutBuilder()

public Duration.Builder getLocalSsdRecoveryTimeoutBuilder()

Specifies the maximum amount of time a Local Ssd Vm should wait while recovery of the Local Ssd state is attempted. Its value should be in between 0 and 168 hours with hour granularity and the default value being 1 hour.

optional .google.cloud.compute.v1.Duration local_ssd_recovery_timeout = 268015590;

Returns
Type Description
Duration.Builder

getLocalSsdRecoveryTimeoutOrBuilder()

public DurationOrBuilder getLocalSsdRecoveryTimeoutOrBuilder()

Specifies the maximum amount of time a Local Ssd Vm should wait while recovery of the Local Ssd state is attempted. Its value should be in between 0 and 168 hours with hour granularity and the default value being 1 hour.

optional .google.cloud.compute.v1.Duration local_ssd_recovery_timeout = 268015590;

Returns
Type Description
DurationOrBuilder

getLocationHint()

public String getLocationHint()

An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.

optional string location_hint = 350519505;

Returns
Type Description
String

The locationHint.

getLocationHintBytes()

public ByteString getLocationHintBytes()

An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.

optional string location_hint = 350519505;

Returns
Type Description
ByteString

The bytes for locationHint.

getMaxRunDuration()

public Duration getMaxRunDuration()

Specifies the max run duration for the given instance. If specified, the instance termination action will be performed at the end of the run duration.

optional .google.cloud.compute.v1.Duration max_run_duration = 430839747;

Returns
Type Description
Duration

The maxRunDuration.

getMaxRunDurationBuilder()

public Duration.Builder getMaxRunDurationBuilder()

Specifies the max run duration for the given instance. If specified, the instance termination action will be performed at the end of the run duration.

optional .google.cloud.compute.v1.Duration max_run_duration = 430839747;

Returns
Type Description
Duration.Builder

getMaxRunDurationOrBuilder()

public DurationOrBuilder getMaxRunDurationOrBuilder()

Specifies the max run duration for the given instance. If specified, the instance termination action will be performed at the end of the run duration.

optional .google.cloud.compute.v1.Duration max_run_duration = 430839747;

Returns
Type Description
DurationOrBuilder

getMinNodeCpus()

public int getMinNodeCpus()

The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.

optional int32 min_node_cpus = 317231675;

Returns
Type Description
int

The minNodeCpus.

getNodeAffinities(int index)

public SchedulingNodeAffinity getNodeAffinities(int index)

A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.

repeated .google.cloud.compute.v1.SchedulingNodeAffinity node_affinities = 461799971;

Parameter
Name Description
index int
Returns
Type Description
SchedulingNodeAffinity

getNodeAffinitiesBuilder(int index)

public SchedulingNodeAffinity.Builder getNodeAffinitiesBuilder(int index)

A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.

repeated .google.cloud.compute.v1.SchedulingNodeAffinity node_affinities = 461799971;

Parameter
Name Description
index int
Returns
Type Description
SchedulingNodeAffinity.Builder

getNodeAffinitiesBuilderList()

public List<SchedulingNodeAffinity.Builder> getNodeAffinitiesBuilderList()

A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.

repeated .google.cloud.compute.v1.SchedulingNodeAffinity node_affinities = 461799971;

Returns
Type Description
List<Builder>

getNodeAffinitiesCount()

public int getNodeAffinitiesCount()

A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.

repeated .google.cloud.compute.v1.SchedulingNodeAffinity node_affinities = 461799971;

Returns
Type Description
int

getNodeAffinitiesList()

public List<SchedulingNodeAffinity> getNodeAffinitiesList()

A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.

repeated .google.cloud.compute.v1.SchedulingNodeAffinity node_affinities = 461799971;

Returns
Type Description
List<SchedulingNodeAffinity>

getNodeAffinitiesOrBuilder(int index)

public SchedulingNodeAffinityOrBuilder getNodeAffinitiesOrBuilder(int index)

A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.

repeated .google.cloud.compute.v1.SchedulingNodeAffinity node_affinities = 461799971;

Parameter
Name Description
index int
Returns
Type Description
SchedulingNodeAffinityOrBuilder

getNodeAffinitiesOrBuilderList()

public List<? extends SchedulingNodeAffinityOrBuilder> getNodeAffinitiesOrBuilderList()

A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.

repeated .google.cloud.compute.v1.SchedulingNodeAffinity node_affinities = 461799971;

Returns
Type Description
List<? extends com.google.cloud.compute.v1.SchedulingNodeAffinityOrBuilder>

getOnHostMaintenance()

public String getOnHostMaintenance()

Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Set VM host maintenance policy. Check the OnHostMaintenance enum for the list of possible values.

optional string on_host_maintenance = 64616796;

Returns
Type Description
String

The onHostMaintenance.

getOnHostMaintenanceBytes()

public ByteString getOnHostMaintenanceBytes()

Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Set VM host maintenance policy. Check the OnHostMaintenance enum for the list of possible values.

optional string on_host_maintenance = 64616796;

Returns
Type Description
ByteString

The bytes for onHostMaintenance.

getOnInstanceStopAction()

public SchedulingOnInstanceStopAction getOnInstanceStopAction()

optional .google.cloud.compute.v1.SchedulingOnInstanceStopAction on_instance_stop_action = 529876681;

Returns
Type Description
SchedulingOnInstanceStopAction

The onInstanceStopAction.

getOnInstanceStopActionBuilder()

public SchedulingOnInstanceStopAction.Builder getOnInstanceStopActionBuilder()

optional .google.cloud.compute.v1.SchedulingOnInstanceStopAction on_instance_stop_action = 529876681;

Returns
Type Description
SchedulingOnInstanceStopAction.Builder

getOnInstanceStopActionOrBuilder()

public SchedulingOnInstanceStopActionOrBuilder getOnInstanceStopActionOrBuilder()

optional .google.cloud.compute.v1.SchedulingOnInstanceStopAction on_instance_stop_action = 529876681;

Returns
Type Description
SchedulingOnInstanceStopActionOrBuilder

getPreemptible()

public boolean getPreemptible()

Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a TERMINATED state. See Instance Life Cycle for more information on the possible instance states.

optional bool preemptible = 324203169;

Returns
Type Description
boolean

The preemptible.

getProvisioningModel()

public String getProvisioningModel()

Specifies the provisioning model of the instance. Check the ProvisioningModel enum for the list of possible values.

optional string provisioning_model = 494423;

Returns
Type Description
String

The provisioningModel.

getProvisioningModelBytes()

public ByteString getProvisioningModelBytes()

Specifies the provisioning model of the instance. Check the ProvisioningModel enum for the list of possible values.

optional string provisioning_model = 494423;

Returns
Type Description
ByteString

The bytes for provisioningModel.

getTerminationTime()

public String getTerminationTime()

Specifies the timestamp, when the instance will be terminated, in RFC3339 text format. If specified, the instance termination action will be performed at the termination time.

optional string termination_time = 428082984;

Returns
Type Description
String

The terminationTime.

getTerminationTimeBytes()

public ByteString getTerminationTimeBytes()

Specifies the timestamp, when the instance will be terminated, in RFC3339 text format. If specified, the instance termination action will be performed at the termination time.

optional string termination_time = 428082984;

Returns
Type Description
ByteString

The bytes for terminationTime.

hasAutomaticRestart()

public boolean hasAutomaticRestart()

Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.

optional bool automatic_restart = 350821371;

Returns
Type Description
boolean

Whether the automaticRestart field is set.

hasAvailabilityDomain()

public boolean hasAvailabilityDomain()

Specifies the availability domain to place the instance in. The value must be a number between 1 and the number of availability domains specified in the spread placement policy attached to the instance.

optional int32 availability_domain = 252514344;

Returns
Type Description
boolean

Whether the availabilityDomain field is set.

hasInstanceTerminationAction()

public boolean hasInstanceTerminationAction()

Specifies the termination action for the instance. Check the InstanceTerminationAction enum for the list of possible values.

optional string instance_termination_action = 107380667;

Returns
Type Description
boolean

Whether the instanceTerminationAction field is set.

hasLocalSsdRecoveryTimeout()

public boolean hasLocalSsdRecoveryTimeout()

Specifies the maximum amount of time a Local Ssd Vm should wait while recovery of the Local Ssd state is attempted. Its value should be in between 0 and 168 hours with hour granularity and the default value being 1 hour.

optional .google.cloud.compute.v1.Duration local_ssd_recovery_timeout = 268015590;

Returns
Type Description
boolean

Whether the localSsdRecoveryTimeout field is set.

hasLocationHint()

public boolean hasLocationHint()

An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.

optional string location_hint = 350519505;

Returns
Type Description
boolean

Whether the locationHint field is set.

hasMaxRunDuration()

public boolean hasMaxRunDuration()

Specifies the max run duration for the given instance. If specified, the instance termination action will be performed at the end of the run duration.

optional .google.cloud.compute.v1.Duration max_run_duration = 430839747;

Returns
Type Description
boolean

Whether the maxRunDuration field is set.

hasMinNodeCpus()

public boolean hasMinNodeCpus()

The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.

optional int32 min_node_cpus = 317231675;

Returns
Type Description
boolean

Whether the minNodeCpus field is set.

hasOnHostMaintenance()

public boolean hasOnHostMaintenance()

Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Set VM host maintenance policy. Check the OnHostMaintenance enum for the list of possible values.

optional string on_host_maintenance = 64616796;

Returns
Type Description
boolean

Whether the onHostMaintenance field is set.

hasOnInstanceStopAction()

public boolean hasOnInstanceStopAction()

optional .google.cloud.compute.v1.SchedulingOnInstanceStopAction on_instance_stop_action = 529876681;

Returns
Type Description
boolean

Whether the onInstanceStopAction field is set.

hasPreemptible()

public boolean hasPreemptible()

Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a TERMINATED state. See Instance Life Cycle for more information on the possible instance states.

optional bool preemptible = 324203169;

Returns
Type Description
boolean

Whether the preemptible field is set.

hasProvisioningModel()

public boolean hasProvisioningModel()

Specifies the provisioning model of the instance. Check the ProvisioningModel enum for the list of possible values.

optional string provisioning_model = 494423;

Returns
Type Description
boolean

Whether the provisioningModel field is set.

hasTerminationTime()

public boolean hasTerminationTime()

Specifies the timestamp, when the instance will be terminated, in RFC3339 text format. If specified, the instance termination action will be performed at the termination time.

optional string termination_time = 428082984;

Returns
Type Description
boolean

Whether the terminationTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Scheduling other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeLocalSsdRecoveryTimeout(Duration value)

public Scheduling.Builder mergeLocalSsdRecoveryTimeout(Duration value)

Specifies the maximum amount of time a Local Ssd Vm should wait while recovery of the Local Ssd state is attempted. Its value should be in between 0 and 168 hours with hour granularity and the default value being 1 hour.

optional .google.cloud.compute.v1.Duration local_ssd_recovery_timeout = 268015590;

Parameter
Name Description
value Duration
Returns
Type Description
Scheduling.Builder

mergeMaxRunDuration(Duration value)

public Scheduling.Builder mergeMaxRunDuration(Duration value)

Specifies the max run duration for the given instance. If specified, the instance termination action will be performed at the end of the run duration.

optional .google.cloud.compute.v1.Duration max_run_duration = 430839747;

Parameter
Name Description
value Duration
Returns
Type Description
Scheduling.Builder

mergeOnInstanceStopAction(SchedulingOnInstanceStopAction value)

public Scheduling.Builder mergeOnInstanceStopAction(SchedulingOnInstanceStopAction value)

optional .google.cloud.compute.v1.SchedulingOnInstanceStopAction on_instance_stop_action = 529876681;

Parameter
Name Description
value SchedulingOnInstanceStopAction
Returns
Type Description
Scheduling.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Scheduling.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Scheduling.Builder
Overrides

removeNodeAffinities(int index)

public Scheduling.Builder removeNodeAffinities(int index)

A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.

repeated .google.cloud.compute.v1.SchedulingNodeAffinity node_affinities = 461799971;

Parameter
Name Description
index int
Returns
Type Description
Scheduling.Builder

setAutomaticRestart(boolean value)

public Scheduling.Builder setAutomaticRestart(boolean value)

Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.

optional bool automatic_restart = 350821371;

Parameter
Name Description
value boolean

The automaticRestart to set.

Returns
Type Description
Scheduling.Builder

This builder for chaining.

setAvailabilityDomain(int value)

public Scheduling.Builder setAvailabilityDomain(int value)

Specifies the availability domain to place the instance in. The value must be a number between 1 and the number of availability domains specified in the spread placement policy attached to the instance.

optional int32 availability_domain = 252514344;

Parameter
Name Description
value int

The availabilityDomain to set.

Returns
Type Description
Scheduling.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setInstanceTerminationAction(String value)

public Scheduling.Builder setInstanceTerminationAction(String value)

Specifies the termination action for the instance. Check the InstanceTerminationAction enum for the list of possible values.

optional string instance_termination_action = 107380667;

Parameter
Name Description
value String

The instanceTerminationAction to set.

Returns
Type Description
Scheduling.Builder

This builder for chaining.

setInstanceTerminationActionBytes(ByteString value)

public Scheduling.Builder setInstanceTerminationActionBytes(ByteString value)

Specifies the termination action for the instance. Check the InstanceTerminationAction enum for the list of possible values.

optional string instance_termination_action = 107380667;

Parameter
Name Description
value ByteString

The bytes for instanceTerminationAction to set.

Returns
Type Description
Scheduling.Builder

This builder for chaining.

setLocalSsdRecoveryTimeout(Duration value)

public Scheduling.Builder setLocalSsdRecoveryTimeout(Duration value)

Specifies the maximum amount of time a Local Ssd Vm should wait while recovery of the Local Ssd state is attempted. Its value should be in between 0 and 168 hours with hour granularity and the default value being 1 hour.

optional .google.cloud.compute.v1.Duration local_ssd_recovery_timeout = 268015590;

Parameter
Name Description
value Duration
Returns
Type Description
Scheduling.Builder

setLocalSsdRecoveryTimeout(Duration.Builder builderForValue)

public Scheduling.Builder setLocalSsdRecoveryTimeout(Duration.Builder builderForValue)

Specifies the maximum amount of time a Local Ssd Vm should wait while recovery of the Local Ssd state is attempted. Its value should be in between 0 and 168 hours with hour granularity and the default value being 1 hour.

optional .google.cloud.compute.v1.Duration local_ssd_recovery_timeout = 268015590;

Parameter
Name Description
builderForValue Duration.Builder
Returns
Type Description
Scheduling.Builder

setLocationHint(String value)

public Scheduling.Builder setLocationHint(String value)

An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.

optional string location_hint = 350519505;

Parameter
Name Description
value String

The locationHint to set.

Returns
Type Description
Scheduling.Builder

This builder for chaining.

setLocationHintBytes(ByteString value)

public Scheduling.Builder setLocationHintBytes(ByteString value)

An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.

optional string location_hint = 350519505;

Parameter
Name Description
value ByteString

The bytes for locationHint to set.

Returns
Type Description
Scheduling.Builder

This builder for chaining.

setMaxRunDuration(Duration value)

public Scheduling.Builder setMaxRunDuration(Duration value)

Specifies the max run duration for the given instance. If specified, the instance termination action will be performed at the end of the run duration.

optional .google.cloud.compute.v1.Duration max_run_duration = 430839747;

Parameter
Name Description
value Duration
Returns
Type Description
Scheduling.Builder

setMaxRunDuration(Duration.Builder builderForValue)

public Scheduling.Builder setMaxRunDuration(Duration.Builder builderForValue)

Specifies the max run duration for the given instance. If specified, the instance termination action will be performed at the end of the run duration.

optional .google.cloud.compute.v1.Duration max_run_duration = 430839747;

Parameter
Name Description
builderForValue Duration.Builder
Returns
Type Description
Scheduling.Builder

setMinNodeCpus(int value)

public Scheduling.Builder setMinNodeCpus(int value)

The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.

optional int32 min_node_cpus = 317231675;

Parameter
Name Description
value int

The minNodeCpus to set.

Returns
Type Description
Scheduling.Builder

This builder for chaining.

setNodeAffinities(int index, SchedulingNodeAffinity value)

public Scheduling.Builder setNodeAffinities(int index, SchedulingNodeAffinity value)

A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.

repeated .google.cloud.compute.v1.SchedulingNodeAffinity node_affinities = 461799971;

Parameters
Name Description
index int
value SchedulingNodeAffinity
Returns
Type Description
Scheduling.Builder

setNodeAffinities(int index, SchedulingNodeAffinity.Builder builderForValue)

public Scheduling.Builder setNodeAffinities(int index, SchedulingNodeAffinity.Builder builderForValue)

A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.

repeated .google.cloud.compute.v1.SchedulingNodeAffinity node_affinities = 461799971;

Parameters
Name Description
index int
builderForValue SchedulingNodeAffinity.Builder
Returns
Type Description
Scheduling.Builder

setOnHostMaintenance(String value)

public Scheduling.Builder setOnHostMaintenance(String value)

Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Set VM host maintenance policy. Check the OnHostMaintenance enum for the list of possible values.

optional string on_host_maintenance = 64616796;

Parameter
Name Description
value String

The onHostMaintenance to set.

Returns
Type Description
Scheduling.Builder

This builder for chaining.

setOnHostMaintenanceBytes(ByteString value)

public Scheduling.Builder setOnHostMaintenanceBytes(ByteString value)

Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Set VM host maintenance policy. Check the OnHostMaintenance enum for the list of possible values.

optional string on_host_maintenance = 64616796;

Parameter
Name Description
value ByteString

The bytes for onHostMaintenance to set.

Returns
Type Description
Scheduling.Builder

This builder for chaining.

setOnInstanceStopAction(SchedulingOnInstanceStopAction value)

public Scheduling.Builder setOnInstanceStopAction(SchedulingOnInstanceStopAction value)

optional .google.cloud.compute.v1.SchedulingOnInstanceStopAction on_instance_stop_action = 529876681;

Parameter
Name Description
value SchedulingOnInstanceStopAction
Returns
Type Description
Scheduling.Builder

setOnInstanceStopAction(SchedulingOnInstanceStopAction.Builder builderForValue)

public Scheduling.Builder setOnInstanceStopAction(SchedulingOnInstanceStopAction.Builder builderForValue)

optional .google.cloud.compute.v1.SchedulingOnInstanceStopAction on_instance_stop_action = 529876681;

Parameter
Name Description
builderForValue SchedulingOnInstanceStopAction.Builder
Returns
Type Description
Scheduling.Builder

setPreemptible(boolean value)

public Scheduling.Builder setPreemptible(boolean value)

Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a TERMINATED state. See Instance Life Cycle for more information on the possible instance states.

optional bool preemptible = 324203169;

Parameter
Name Description
value boolean

The preemptible to set.

Returns
Type Description
Scheduling.Builder

This builder for chaining.

setProvisioningModel(String value)

public Scheduling.Builder setProvisioningModel(String value)

Specifies the provisioning model of the instance. Check the ProvisioningModel enum for the list of possible values.

optional string provisioning_model = 494423;

Parameter
Name Description
value String

The provisioningModel to set.

Returns
Type Description
Scheduling.Builder

This builder for chaining.

setProvisioningModelBytes(ByteString value)

public Scheduling.Builder setProvisioningModelBytes(ByteString value)

Specifies the provisioning model of the instance. Check the ProvisioningModel enum for the list of possible values.

optional string provisioning_model = 494423;

Parameter
Name Description
value ByteString

The bytes for provisioningModel to set.

Returns
Type Description
Scheduling.Builder

This builder for chaining.

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

public Scheduling.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Scheduling.Builder
Overrides

setTerminationTime(String value)

public Scheduling.Builder setTerminationTime(String value)

Specifies the timestamp, when the instance will be terminated, in RFC3339 text format. If specified, the instance termination action will be performed at the termination time.

optional string termination_time = 428082984;

Parameter
Name Description
value String

The terminationTime to set.

Returns
Type Description
Scheduling.Builder

This builder for chaining.

setTerminationTimeBytes(ByteString value)

public Scheduling.Builder setTerminationTimeBytes(ByteString value)

Specifies the timestamp, when the instance will be terminated, in RFC3339 text format. If specified, the instance termination action will be performed at the termination time.

optional string termination_time = 428082984;

Parameter
Name Description
value ByteString

The bytes for terminationTime to set.

Returns
Type Description
Scheduling.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Scheduling.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Scheduling.Builder
Overrides