target.apidocs.com.google.api.services.compute.model.ResourceCommitment.html Maven / Gradle / Ivy
ResourceCommitment (Compute Engine API v1-rev20200104-1.30.8)
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 GenericJson
Commitment for a particular 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
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 resource.
Long
getAmount()
The amount of the resource purchased (in a type-dependent unit, such as bytes).
String
getType()
Type of resource for which this commitment applies.
ResourceCommitment
set(String fieldName,
Object value)
ResourceCommitment
setAcceleratorType(String acceleratorType)
Name of the accelerator type resource.
ResourceCommitment
setAmount(Long amount)
The amount of the resource purchased (in a type-dependent unit, such as bytes).
ResourceCommitment
setType(String type)
Type of resource for which this commitment applies.
-
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 resource. Applicable only when the type is ACCELERATOR.
- Returns:
- value or
null for none
-
setAcceleratorType
public ResourceCommitment setAcceleratorType(String acceleratorType)
Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.
- Parameters:
acceleratorType - acceleratorType or null for none
-
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.
- Returns:
- value or
null for none
-
setAmount
public ResourceCommitment setAmount(Long amount)
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.
- Parameters:
amount - amount or null for none
-
getType
public String getType()
Type of resource for which this commitment applies. Possible values are VCPU and MEMORY
- Returns:
- value or
null for none
-
setType
public ResourceCommitment setType(String type)
Type of resource for which this commitment applies. Possible values are VCPU and MEMORY
- Parameters:
type - type or null for none
-
set
public ResourceCommitment set(String fieldName,
Object value)
- Overrides:
set in class GenericJson
-
clone
public ResourceCommitment clone()
- Overrides:
clone in class GenericJson
Copyright © 2011–2020 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy