Class 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.GeneratedMessageV3.Builder<ResourceCommitment.Builder>
    implements ResourceCommitmentOrBuilder
     Commitment for a particular resource (a Commitment is composed of one or more of these).
     
    Protobuf type google.cloud.compute.v1.ResourceCommitment
    • Method Detail

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

        public 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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public ResourceCommitment.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.Builder>
      • setField

        public ResourceCommitment.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                   Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.Builder>
      • clearField

        public ResourceCommitment.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.Builder>
      • clearOneof

        public ResourceCommitment.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.Builder>
      • setRepeatedField

        public ResourceCommitment.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                           int index,
                                                           Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.Builder>
      • addRepeatedField

        public ResourceCommitment.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                           Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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 resource. Applicable only when the type 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 resource. Applicable only when the type 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 resource. Applicable only when the type 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 resource. Applicable only when the type 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 resource. Applicable only when the type 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 resource. Applicable only when the type 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 amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.
         
        optional int64 amount = 196759640;
        Specified by:
        hasAmount in interface ResourceCommitmentOrBuilder
        Returns:
        Whether the amount field is set.
      • getAmount

        public long getAmount()
         The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.
         
        optional int64 amount = 196759640;
        Specified by:
        getAmount in interface ResourceCommitmentOrBuilder
        Returns:
        The amount.
      • setAmount

        public ResourceCommitment.Builder setAmount​(long value)
         The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.
         
        optional int64 amount = 196759640;
        Parameters:
        value - The amount to set.
        Returns:
        This builder for chaining.
      • clearAmount

        public ResourceCommitment.Builder clearAmount()
         The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.
         
        optional int64 amount = 196759640;
        Returns:
        This builder for chaining.
      • hasType

        public boolean hasType()
         Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR.
         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()
         Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR.
         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()
         Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR.
         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)
         Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR.
         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()
         Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR.
         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)
         Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR.
         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.
      • setUnknownFields

        public final ResourceCommitment.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.Builder>
      • mergeUnknownFields

        public final ResourceCommitment.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.Builder>