Package com.google.cloud.compute.v1
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 TypeMethodDescriptionbuild()clear()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.ByteStringName of the accelerator type or GPU resource.longThe quantity of the hardware resource that you want to commit to purchasing (in a type-dependent unit)static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetType()The type of hardware resource that you want to specify.com.google.protobuf.ByteStringThe type of hardware resource that you want to specify.booleanName of the accelerator type or GPU resource.booleanThe quantity of the hardware resource that you want to commit to purchasing (in a type-dependent unit)booleanhasType()The type of hardware resource that you want to specify.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(ResourceCommitment other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setAcceleratorType(String value) 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)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, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods 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:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<ResourceCommitment.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<ResourceCommitment.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<ResourceCommitment.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ResourceCommitment.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.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:
hasAcceleratorTypein interfaceResourceCommitmentOrBuilder- Returns:
- Whether the acceleratorType field is set.
-
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:
getAcceleratorTypein interfaceResourceCommitmentOrBuilder- 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:
getAcceleratorTypeBytesin interfaceResourceCommitmentOrBuilder- Returns:
- The bytes for acceleratorType.
-
setAcceleratorType
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
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
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:
hasAmountin interfaceResourceCommitmentOrBuilder- 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:
getAmountin interfaceResourceCommitmentOrBuilder- Returns:
- The amount.
-
setAmount
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
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:
hasTypein interfaceResourceCommitmentOrBuilder- Returns:
- Whether the type field is set.
-
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:
getTypein interfaceResourceCommitmentOrBuilder- 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:
getTypeBytesin interfaceResourceCommitmentOrBuilder- Returns:
- The bytes for type.
-
setType
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
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
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.
-