Class ResourceCommitment.Builder

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

public static final class ResourceCommitment.Builder extends com.google.protobuf.GeneratedMessage.Builder<ResourceCommitment.Builder> implements ResourceCommitmentOrBuilder
 Commitment for a particular hardware resource (a commitment is composed of
 one or more of these).
 
Protobuf type google.cloud.compute.v1.ResourceCommitment
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    Name of the accelerator type or GPU resource.
    The quantity of the hardware resource that you want to commit to purchasing (in a type-dependent unit)
    The type of hardware resource that you want to specify.
    Name of the accelerator type or GPU resource.
    com.google.protobuf.ByteString
    Name of the accelerator type or GPU resource.
    long
    The quantity of the hardware resource that you want to commit to purchasing (in a type-dependent unit)
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    The type of hardware resource that you want to specify.
    com.google.protobuf.ByteString
    The type of hardware resource that you want to specify.
    boolean
    Name of the accelerator type or GPU resource.
    boolean
    The quantity of the hardware resource that you want to commit to purchasing (in a type-dependent unit)
    boolean
    The type of hardware resource that you want to specify.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    Name of the accelerator type or GPU resource.
    setAcceleratorTypeBytes(com.google.protobuf.ByteString value)
    Name of the accelerator type or GPU resource.
    setAmount(long value)
    The quantity of the hardware resource that you want to commit to purchasing (in a type-dependent unit)
    setType(String value)
    The type of hardware resource that you want to specify.
    setTypeBytes(com.google.protobuf.ByteString value)
    The type of hardware resource that you want to specify.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • 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<ResourceCommitment.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<ResourceCommitment.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<ResourceCommitment.Builder>
    • getDefaultInstanceForType

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

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

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

      public ResourceCommitment.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<ResourceCommitment.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<ResourceCommitment.Builder>
    • mergeFrom

      public ResourceCommitment.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<ResourceCommitment.Builder>
      Throws:
      IOException
    • hasAcceleratorType

      public boolean hasAcceleratorType()
       Name of the accelerator type or GPU resource. Specify this field only when
       the type of hardware resource is ACCELERATOR.
       
      optional string accelerator_type = 138031246;
      Specified by:
      hasAcceleratorType in interface ResourceCommitmentOrBuilder
      Returns:
      Whether the acceleratorType field is set.
    • getAcceleratorType

      public String getAcceleratorType()
       Name of the accelerator type or GPU resource. Specify this field only when
       the type of hardware resource is ACCELERATOR.
       
      optional string accelerator_type = 138031246;
      Specified by:
      getAcceleratorType in interface ResourceCommitmentOrBuilder
      Returns:
      The acceleratorType.
    • getAcceleratorTypeBytes

      public com.google.protobuf.ByteString getAcceleratorTypeBytes()
       Name of the accelerator type or GPU resource. Specify this field only when
       the type of hardware resource is ACCELERATOR.
       
      optional string accelerator_type = 138031246;
      Specified by:
      getAcceleratorTypeBytes in interface ResourceCommitmentOrBuilder
      Returns:
      The bytes for acceleratorType.
    • setAcceleratorType

      public ResourceCommitment.Builder setAcceleratorType(String value)
       Name of the accelerator type or GPU resource. Specify this field only when
       the type of hardware resource is ACCELERATOR.
       
      optional string accelerator_type = 138031246;
      Parameters:
      value - The acceleratorType to set.
      Returns:
      This builder for chaining.
    • clearAcceleratorType

      public ResourceCommitment.Builder clearAcceleratorType()
       Name of the accelerator type or GPU resource. Specify this field only when
       the type of hardware resource is ACCELERATOR.
       
      optional string accelerator_type = 138031246;
      Returns:
      This builder for chaining.
    • setAcceleratorTypeBytes

      public ResourceCommitment.Builder setAcceleratorTypeBytes(com.google.protobuf.ByteString value)
       Name of the accelerator type or GPU resource. Specify this field only when
       the type of hardware resource is ACCELERATOR.
       
      optional string accelerator_type = 138031246;
      Parameters:
      value - The bytes for acceleratorType to set.
      Returns:
      This builder for chaining.
    • hasAmount

      public boolean hasAmount()
       The quantity of the hardware resource that you want to commit to purchasing
       (in a type-dependent unit).
      
       - For vCPUs, you must specify an integer value.
       - For memory, you specify the amount of MB that you want. The value you
       specify must be a multiple of 256 MB, with up to 6.5 GB of
       memory per every vCPU.
       - For GPUs, you must specify an integer value.
       - For Local SSD disks, you must specify the amount in GB. The size of a
       single Local SSD disk is 375 GB.
       
      optional int64 amount = 196759640;
      Specified by:
      hasAmount in interface ResourceCommitmentOrBuilder
      Returns:
      Whether the amount field is set.
    • getAmount

      public long getAmount()
       The quantity of the hardware resource that you want to commit to purchasing
       (in a type-dependent unit).
      
       - For vCPUs, you must specify an integer value.
       - For memory, you specify the amount of MB that you want. The value you
       specify must be a multiple of 256 MB, with up to 6.5 GB of
       memory per every vCPU.
       - For GPUs, you must specify an integer value.
       - For Local SSD disks, you must specify the amount in GB. The size of a
       single Local SSD disk is 375 GB.
       
      optional int64 amount = 196759640;
      Specified by:
      getAmount in interface ResourceCommitmentOrBuilder
      Returns:
      The amount.
    • setAmount

      public ResourceCommitment.Builder setAmount(long value)
       The quantity of the hardware resource that you want to commit to purchasing
       (in a type-dependent unit).
      
       - For vCPUs, you must specify an integer value.
       - For memory, you specify the amount of MB that you want. The value you
       specify must be a multiple of 256 MB, with up to 6.5 GB of
       memory per every vCPU.
       - For GPUs, you must specify an integer value.
       - For Local SSD disks, you must specify the amount in GB. The size of a
       single Local SSD disk is 375 GB.
       
      optional int64 amount = 196759640;
      Parameters:
      value - The amount to set.
      Returns:
      This builder for chaining.
    • clearAmount

      public ResourceCommitment.Builder clearAmount()
       The quantity of the hardware resource that you want to commit to purchasing
       (in a type-dependent unit).
      
       - For vCPUs, you must specify an integer value.
       - For memory, you specify the amount of MB that you want. The value you
       specify must be a multiple of 256 MB, with up to 6.5 GB of
       memory per every vCPU.
       - For GPUs, you must specify an integer value.
       - For Local SSD disks, you must specify the amount in GB. The size of a
       single Local SSD disk is 375 GB.
       
      optional int64 amount = 196759640;
      Returns:
      This builder for chaining.
    • hasType

      public boolean hasType()
       The type of hardware resource that you want to specify.
       You can specify any of the following values:
      
       - VCPU
       - MEMORY
       - LOCAL_SSD
       - ACCELERATOR
      
      
      
       Specify as a separate entry in the list for each
       individual resource type.
       Check the Type enum for the list of possible values.
       
      optional string type = 3575610;
      Specified by:
      hasType in interface ResourceCommitmentOrBuilder
      Returns:
      Whether the type field is set.
    • getType

      public String getType()
       The type of hardware resource that you want to specify.
       You can specify any of the following values:
      
       - VCPU
       - MEMORY
       - LOCAL_SSD
       - ACCELERATOR
      
      
      
       Specify as a separate entry in the list for each
       individual resource type.
       Check the Type enum for the list of possible values.
       
      optional string type = 3575610;
      Specified by:
      getType in interface ResourceCommitmentOrBuilder
      Returns:
      The type.
    • getTypeBytes

      public com.google.protobuf.ByteString getTypeBytes()
       The type of hardware resource that you want to specify.
       You can specify any of the following values:
      
       - VCPU
       - MEMORY
       - LOCAL_SSD
       - ACCELERATOR
      
      
      
       Specify as a separate entry in the list for each
       individual resource type.
       Check the Type enum for the list of possible values.
       
      optional string type = 3575610;
      Specified by:
      getTypeBytes in interface ResourceCommitmentOrBuilder
      Returns:
      The bytes for type.
    • setType

      public ResourceCommitment.Builder setType(String value)
       The type of hardware resource that you want to specify.
       You can specify any of the following values:
      
       - VCPU
       - MEMORY
       - LOCAL_SSD
       - ACCELERATOR
      
      
      
       Specify as a separate entry in the list for each
       individual resource type.
       Check the Type enum for the list of possible values.
       
      optional string type = 3575610;
      Parameters:
      value - The type to set.
      Returns:
      This builder for chaining.
    • clearType

      public ResourceCommitment.Builder clearType()
       The type of hardware resource that you want to specify.
       You can specify any of the following values:
      
       - VCPU
       - MEMORY
       - LOCAL_SSD
       - ACCELERATOR
      
      
      
       Specify as a separate entry in the list for each
       individual resource type.
       Check the Type enum for the list of possible values.
       
      optional string type = 3575610;
      Returns:
      This builder for chaining.
    • setTypeBytes

      public ResourceCommitment.Builder setTypeBytes(com.google.protobuf.ByteString value)
       The type of hardware resource that you want to specify.
       You can specify any of the following values:
      
       - VCPU
       - MEMORY
       - LOCAL_SSD
       - ACCELERATOR
      
      
      
       Specify as a separate entry in the list for each
       individual resource type.
       Check the Type enum for the list of possible values.
       
      optional string type = 3575610;
      Parameters:
      value - The bytes for type to set.
      Returns:
      This builder for chaining.