Class NewSpotInstancesConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<NewSpotInstancesConfig.Builder>
com.google.cloud.hypercomputecluster.v1.NewSpotInstancesConfig.Builder
All Implemented Interfaces:
NewSpotInstancesConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
NewSpotInstancesConfig

public static final class NewSpotInstancesConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<NewSpotInstancesConfig.Builder> implements NewSpotInstancesConfigOrBuilder
 When set in a
 [ComputeResourceConfig][google.cloud.hypercomputecluster.v1.ComputeResourceConfig],
 indicates that [spot
 VM](https://cloud.google.com/compute/docs/instances/spot) instances should be
 created.
 
Protobuf type google.cloud.hypercomputecluster.v1.NewSpotInstancesConfig
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<NewSpotInstancesConfig.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<NewSpotInstancesConfig.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<NewSpotInstancesConfig.Builder>
    • getDefaultInstanceForType

      public NewSpotInstancesConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public NewSpotInstancesConfig build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public NewSpotInstancesConfig buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public NewSpotInstancesConfig.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<NewSpotInstancesConfig.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<NewSpotInstancesConfig.Builder>
    • mergeFrom

      public NewSpotInstancesConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<NewSpotInstancesConfig.Builder>
      Throws:
      IOException
    • getZone

      public String getZone()
       Required. Immutable. Name of the zone in which VM instances should run,
       e.g., `us-central1-a`. Must be in the same region as the cluster, and must
       match the zone of any other resources specified in the cluster.
       
      string zone = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getZone in interface NewSpotInstancesConfigOrBuilder
      Returns:
      The zone.
    • getZoneBytes

      public com.google.protobuf.ByteString getZoneBytes()
       Required. Immutable. Name of the zone in which VM instances should run,
       e.g., `us-central1-a`. Must be in the same region as the cluster, and must
       match the zone of any other resources specified in the cluster.
       
      string zone = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getZoneBytes in interface NewSpotInstancesConfigOrBuilder
      Returns:
      The bytes for zone.
    • setZone

      public NewSpotInstancesConfig.Builder setZone(String value)
       Required. Immutable. Name of the zone in which VM instances should run,
       e.g., `us-central1-a`. Must be in the same region as the cluster, and must
       match the zone of any other resources specified in the cluster.
       
      string zone = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Parameters:
      value - The zone to set.
      Returns:
      This builder for chaining.
    • clearZone

      public NewSpotInstancesConfig.Builder clearZone()
       Required. Immutable. Name of the zone in which VM instances should run,
       e.g., `us-central1-a`. Must be in the same region as the cluster, and must
       match the zone of any other resources specified in the cluster.
       
      string zone = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Returns:
      This builder for chaining.
    • setZoneBytes

      public NewSpotInstancesConfig.Builder setZoneBytes(com.google.protobuf.ByteString value)
       Required. Immutable. Name of the zone in which VM instances should run,
       e.g., `us-central1-a`. Must be in the same region as the cluster, and must
       match the zone of any other resources specified in the cluster.
       
      string zone = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Parameters:
      value - The bytes for zone to set.
      Returns:
      This builder for chaining.
    • getMachineType

      public String getMachineType()
       Required. Immutable. Name of the Compute Engine [machine
       type](https://cloud.google.com/compute/docs/machine-resource) to use, e.g.
       `n2-standard-2`.
       
      string machine_type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getMachineType in interface NewSpotInstancesConfigOrBuilder
      Returns:
      The machineType.
    • getMachineTypeBytes

      public com.google.protobuf.ByteString getMachineTypeBytes()
       Required. Immutable. Name of the Compute Engine [machine
       type](https://cloud.google.com/compute/docs/machine-resource) to use, e.g.
       `n2-standard-2`.
       
      string machine_type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getMachineTypeBytes in interface NewSpotInstancesConfigOrBuilder
      Returns:
      The bytes for machineType.
    • setMachineType

      public NewSpotInstancesConfig.Builder setMachineType(String value)
       Required. Immutable. Name of the Compute Engine [machine
       type](https://cloud.google.com/compute/docs/machine-resource) to use, e.g.
       `n2-standard-2`.
       
      string machine_type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Parameters:
      value - The machineType to set.
      Returns:
      This builder for chaining.
    • clearMachineType

      public NewSpotInstancesConfig.Builder clearMachineType()
       Required. Immutable. Name of the Compute Engine [machine
       type](https://cloud.google.com/compute/docs/machine-resource) to use, e.g.
       `n2-standard-2`.
       
      string machine_type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Returns:
      This builder for chaining.
    • setMachineTypeBytes

      public NewSpotInstancesConfig.Builder setMachineTypeBytes(com.google.protobuf.ByteString value)
       Required. Immutable. Name of the Compute Engine [machine
       type](https://cloud.google.com/compute/docs/machine-resource) to use, e.g.
       `n2-standard-2`.
       
      string machine_type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Parameters:
      value - The bytes for machineType to set.
      Returns:
      This builder for chaining.
    • getTerminationActionValue

      public int getTerminationActionValue()
       Optional. Termination action for the instance. If not specified, Compute
       Engine sets the termination action to DELETE.
       
      .google.cloud.hypercomputecluster.v1.NewSpotInstancesConfig.TerminationAction termination_action = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getTerminationActionValue in interface NewSpotInstancesConfigOrBuilder
      Returns:
      The enum numeric value on the wire for terminationAction.
    • setTerminationActionValue

      public NewSpotInstancesConfig.Builder setTerminationActionValue(int value)
       Optional. Termination action for the instance. If not specified, Compute
       Engine sets the termination action to DELETE.
       
      .google.cloud.hypercomputecluster.v1.NewSpotInstancesConfig.TerminationAction termination_action = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enum numeric value on the wire for terminationAction to set.
      Returns:
      This builder for chaining.
    • getTerminationAction

      public NewSpotInstancesConfig.TerminationAction getTerminationAction()
       Optional. Termination action for the instance. If not specified, Compute
       Engine sets the termination action to DELETE.
       
      .google.cloud.hypercomputecluster.v1.NewSpotInstancesConfig.TerminationAction termination_action = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getTerminationAction in interface NewSpotInstancesConfigOrBuilder
      Returns:
      The terminationAction.
    • setTerminationAction

       Optional. Termination action for the instance. If not specified, Compute
       Engine sets the termination action to DELETE.
       
      .google.cloud.hypercomputecluster.v1.NewSpotInstancesConfig.TerminationAction termination_action = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The terminationAction to set.
      Returns:
      This builder for chaining.
    • clearTerminationAction

      public NewSpotInstancesConfig.Builder clearTerminationAction()
       Optional. Termination action for the instance. If not specified, Compute
       Engine sets the termination action to DELETE.
       
      .google.cloud.hypercomputecluster.v1.NewSpotInstancesConfig.TerminationAction termination_action = 5 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.