public static final class ResourceCommitment.Builder extends com.google.protobuf.GeneratedMessageV3.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| Modifier and Type | Method and Description |
|---|---|
ResourceCommitment.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
ResourceCommitment |
build() |
ResourceCommitment |
buildPartial() |
ResourceCommitment.Builder |
clear() |
ResourceCommitment.Builder |
clearAcceleratorType()
Name of the accelerator type or GPU resource.
|
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.
|
ResourceCommitment.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
ResourceCommitment.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
ResourceCommitment.Builder |
clearType()
The type of hardware resource that you want to specify.
|
ResourceCommitment.Builder |
clone() |
String |
getAcceleratorType()
Name of the accelerator type or GPU resource.
|
com.google.protobuf.ByteString |
getAcceleratorTypeBytes()
Name of the accelerator type or GPU resource.
|
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.
|
ResourceCommitment |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getType()
The type of hardware resource that you want to specify.
|
com.google.protobuf.ByteString |
getTypeBytes()
The type of hardware resource that you want to specify.
|
boolean |
hasAcceleratorType()
Name of the accelerator type or GPU resource.
|
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.
|
boolean |
hasType()
The type of hardware resource that you want to specify.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
ResourceCommitment.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
ResourceCommitment.Builder |
mergeFrom(com.google.protobuf.Message other) |
ResourceCommitment.Builder |
mergeFrom(ResourceCommitment other) |
ResourceCommitment.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
ResourceCommitment.Builder |
setAcceleratorType(String value)
Name of the accelerator type or GPU resource.
|
ResourceCommitment.Builder |
setAcceleratorTypeBytes(com.google.protobuf.ByteString value)
Name of the accelerator type or GPU resource.
|
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.
|
ResourceCommitment.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
ResourceCommitment.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
ResourceCommitment.Builder |
setType(String value)
The type of hardware resource that you want to specify.
|
ResourceCommitment.Builder |
setTypeBytes(com.google.protobuf.ByteString value)
The type of hardware resource that you want to specify.
|
ResourceCommitment.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.Builder>public ResourceCommitment.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.Builder>public ResourceCommitment getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic ResourceCommitment build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic ResourceCommitment buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic ResourceCommitment.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.Builder>public ResourceCommitment.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.Builder>public ResourceCommitment.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.Builder>public ResourceCommitment.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.Builder>public ResourceCommitment.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.Builder>public ResourceCommitment.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.Builder>public ResourceCommitment.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<ResourceCommitment.Builder>public ResourceCommitment.Builder mergeFrom(ResourceCommitment other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.Builder>public ResourceCommitment.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<ResourceCommitment.Builder>IOExceptionpublic 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;hasAcceleratorType in interface ResourceCommitmentOrBuilderpublic 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;getAcceleratorType in interface ResourceCommitmentOrBuilderpublic 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;getAcceleratorTypeBytes in interface ResourceCommitmentOrBuilderpublic 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;value - The acceleratorType to set.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;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;value - The bytes for acceleratorType to set.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;hasAmount in interface ResourceCommitmentOrBuilderpublic 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;getAmount in interface ResourceCommitmentOrBuilderpublic 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;value - The amount to set.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;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;hasType in interface ResourceCommitmentOrBuilderpublic 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;getType in interface ResourceCommitmentOrBuilderpublic 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;getTypeBytes in interface ResourceCommitmentOrBuilderpublic 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;value - The type to set.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;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;value - The bytes for type to set.public final ResourceCommitment.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.Builder>public final ResourceCommitment.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceCommitment.Builder>Copyright © 2025 Google LLC. All rights reserved.