target.apidocs.com.google.api.services.compute.model.ResourceCommitment.html Maven / Gradle / Ivy
The newest version!
ResourceCommitment (Compute Engine API v1-rev20250320-2.0.0)
com.google.api.services.compute.model
Class ResourceCommitment
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.compute.model.ResourceCommitment
-
public final class ResourceCommitment
extends com.google.api.client.json.GenericJson
Commitment for a particular hardware resource (a commitment is composed of one or more of these).
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Compute Engine API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
ResourceCommitment()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
ResourceCommitment
clone()
String
getAcceleratorType()
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).
String
getType()
The type of hardware resource that you want to specify.
ResourceCommitment
set(String fieldName,
Object value)
ResourceCommitment
setAcceleratorType(String acceleratorType)
Name of the accelerator type or GPU resource.
ResourceCommitment
setAmount(Long amount)
The quantity of the hardware resource that you want to commit to purchasing (in a type-
dependent unit).
ResourceCommitment
setType(String type)
The type of hardware resource that you want to specify.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getAcceleratorType
public String getAcceleratorType()
Name of the accelerator type or GPU resource. Specify this field only when the type of hardware
resource is ACCELERATOR.
- Returns:
- value or
null for none
-
setAcceleratorType
public ResourceCommitment setAcceleratorType(String acceleratorType)
Name of the accelerator type or GPU resource. Specify this field only when the type of hardware
resource is ACCELERATOR.
- Parameters:
acceleratorType - acceleratorType or null for none
-
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.
- Returns:
- value or
null for none
-
setAmount
public ResourceCommitment setAmount(Long amount)
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.
- Parameters:
amount - amount or null for none
-
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.
- Returns:
- value or
null for none
-
setType
public ResourceCommitment setType(String type)
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.
- Parameters:
type - type or null for none
-
set
public ResourceCommitment set(String fieldName,
Object value)
- Overrides:
set in class com.google.api.client.json.GenericJson
-
clone
public ResourceCommitment clone()
- Overrides:
clone in class com.google.api.client.json.GenericJson
Copyright © 2011–2025 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy