Class Scheduling

  • All Implemented Interfaces:
    SchedulingOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class Scheduling
    extends com.google.protobuf.GeneratedMessageV3
    implements SchedulingOrBuilder
     Sets the scheduling options for an Instance.
     
    Protobuf type google.cloud.compute.v1.Scheduling
    See Also:
    Serialized Form
    • Field Detail

      • AUTOMATIC_RESTART_FIELD_NUMBER

        public static final int AUTOMATIC_RESTART_FIELD_NUMBER
        See Also:
        Constant Field Values
      • INSTANCE_TERMINATION_ACTION_FIELD_NUMBER

        public static final int INSTANCE_TERMINATION_ACTION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • LOCAL_SSD_RECOVERY_TIMEOUT_FIELD_NUMBER

        public static final int LOCAL_SSD_RECOVERY_TIMEOUT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • LOCATION_HINT_FIELD_NUMBER

        public static final int LOCATION_HINT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • MIN_NODE_CPUS_FIELD_NUMBER

        public static final int MIN_NODE_CPUS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • NODE_AFFINITIES_FIELD_NUMBER

        public static final int NODE_AFFINITIES_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ON_HOST_MAINTENANCE_FIELD_NUMBER

        public static final int ON_HOST_MAINTENANCE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • PREEMPTIBLE_FIELD_NUMBER

        public static final int PREEMPTIBLE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • PROVISIONING_MODEL_FIELD_NUMBER

        public static final int PROVISIONING_MODEL_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • 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;
        Specified by:
        hasAutomaticRestart in interface SchedulingOrBuilder
        Returns:
        Whether the automaticRestart field is set.
      • 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;
        Specified by:
        getAutomaticRestart in interface SchedulingOrBuilder
        Returns:
        The automaticRestart.
      • 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;
        Specified by:
        hasInstanceTerminationAction in interface SchedulingOrBuilder
        Returns:
        Whether the instanceTerminationAction field is set.
      • 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;
        Specified by:
        getInstanceTerminationAction in interface SchedulingOrBuilder
        Returns:
        The instanceTerminationAction.
      • getInstanceTerminationActionBytes

        public com.google.protobuf.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;
        Specified by:
        getInstanceTerminationActionBytes in interface SchedulingOrBuilder
        Returns:
        The bytes for instanceTerminationAction.
      • 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;
        Specified by:
        hasLocalSsdRecoveryTimeout in interface SchedulingOrBuilder
        Returns:
        Whether the localSsdRecoveryTimeout field is set.
      • 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;
        Specified by:
        getLocalSsdRecoveryTimeout in interface SchedulingOrBuilder
        Returns:
        The localSsdRecoveryTimeout.
      • 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;
        Specified by:
        getLocalSsdRecoveryTimeoutOrBuilder in interface SchedulingOrBuilder
      • 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;
        Specified by:
        hasLocationHint in interface SchedulingOrBuilder
        Returns:
        Whether the locationHint field is set.
      • 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;
        Specified by:
        getLocationHint in interface SchedulingOrBuilder
        Returns:
        The locationHint.
      • getLocationHintBytes

        public com.google.protobuf.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;
        Specified by:
        getLocationHintBytes in interface SchedulingOrBuilder
        Returns:
        The bytes for locationHint.
      • 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;
        Specified by:
        hasMinNodeCpus in interface SchedulingOrBuilder
        Returns:
        Whether the minNodeCpus field is set.
      • 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;
        Specified by:
        getMinNodeCpus in interface SchedulingOrBuilder
        Returns:
        The minNodeCpus.
      • 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;
        Specified by:
        getNodeAffinitiesList in interface SchedulingOrBuilder
      • 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;
        Specified by:
        getNodeAffinitiesOrBuilderList in interface SchedulingOrBuilder
      • 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;
        Specified by:
        getNodeAffinitiesCount in interface SchedulingOrBuilder
      • getNodeAffinities

        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;
        Specified by:
        getNodeAffinities in interface SchedulingOrBuilder
      • getNodeAffinitiesOrBuilder

        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;
        Specified by:
        getNodeAffinitiesOrBuilder in interface SchedulingOrBuilder
      • 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;
        Specified by:
        hasOnHostMaintenance in interface SchedulingOrBuilder
        Returns:
        Whether the onHostMaintenance field is set.
      • 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;
        Specified by:
        getOnHostMaintenance in interface SchedulingOrBuilder
        Returns:
        The onHostMaintenance.
      • getOnHostMaintenanceBytes

        public com.google.protobuf.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;
        Specified by:
        getOnHostMaintenanceBytes in interface SchedulingOrBuilder
        Returns:
        The bytes for onHostMaintenance.
      • 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;
        Specified by:
        hasPreemptible in interface SchedulingOrBuilder
        Returns:
        Whether the preemptible field is set.
      • 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;
        Specified by:
        getPreemptible in interface SchedulingOrBuilder
        Returns:
        The preemptible.
      • 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;
        Specified by:
        hasProvisioningModel in interface SchedulingOrBuilder
        Returns:
        Whether the provisioningModel field is set.
      • 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;
        Specified by:
        getProvisioningModel in interface SchedulingOrBuilder
        Returns:
        The provisioningModel.
      • getProvisioningModelBytes

        public com.google.protobuf.ByteString getProvisioningModelBytes()
         Specifies the provisioning model of the instance.
         Check the ProvisioningModel enum for the list of possible values.
         
        optional string provisioning_model = 494423;
        Specified by:
        getProvisioningModelBytes in interface SchedulingOrBuilder
        Returns:
        The bytes for provisioningModel.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static Scheduling parseFrom​(ByteBuffer data)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Scheduling parseFrom​(ByteBuffer data,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Scheduling parseFrom​(com.google.protobuf.ByteString data)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Scheduling parseFrom​(com.google.protobuf.ByteString data,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Scheduling parseFrom​(byte[] data)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Scheduling parseFrom​(byte[] data,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Scheduling parseFrom​(com.google.protobuf.CodedInputStream input,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws IOException
        Throws:
        IOException
      • newBuilderForType

        public Scheduling.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public Scheduling.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected Scheduling.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static Scheduling getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<Scheduling> parser()
      • getParserForType

        public com.google.protobuf.Parser<Scheduling> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public Scheduling getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder