
target.apidocs.com.google.api.services.compute.model.Commitment.html Maven / Gradle / Ivy
Commitment (Compute Engine API alpha-rev20200526-1.30.9)
com.google.api.services.compute.model
Class Commitment
- 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.Commitment
-
public final class Commitment
extends GenericJson
Represents a regional Commitment resource.
Creating a commitment resource means that you are purchasing a committed use contract with an
explicit start and end time. You can create commitments based on vCPUs and memory usage and
receive discounted rates. For full details, read Signing Up for Committed Use Discounts. (==
resource_for {$api_version}.regionCommitments ==)
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
Commitment()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Commitment
clone()
String
getCategory()
The category of the commitment.
String
getCreationTimestamp()
[Output Only] Creation timestamp in RFC3339 text format.
String
getDescription()
An optional description of this resource.
String
getEndTimestamp()
[Output Only] Commitment end time in RFC3339 text format.
BigInteger
getId()
[Output Only] The unique identifier for the resource.
String
getKind()
[Output Only] Type of the resource.
LicenseResourceCommitment
getLicenseResource()
The license specification required as part of a license commitment.
String
getName()
Name of the resource.
String
getPlan()
The plan for this commitment, which determines duration and discount rate.
String
getRegion()
[Output Only] URL of the region where this commitment may be used.
List<Reservation>
getReservations()
List of reservations in this commitment.
List<ResourceCommitment>
getResources()
A list of commitment amounts for particular resources.
String
getSelfLink()
[Output Only] Server-defined URL for the resource.
String
getSelfLinkWithId()
[Output Only] Server-defined URL for this resource with the resource id.
String
getStartTimestamp()
[Output Only] Commitment start time in RFC3339 text format.
String
getStatus()
[Output Only] Status of the commitment with regards to eventual expiration (each commitment has
an end date defined).
String
getStatusMessage()
[Output Only] An optional, human-readable explanation of the status.
String
getType()
The type of commitment, which affects the discount rate and the eligible resources.
Commitment
set(String fieldName,
Object value)
Commitment
setCategory(String category)
The category of the commitment.
Commitment
setCreationTimestamp(String creationTimestamp)
[Output Only] Creation timestamp in RFC3339 text format.
Commitment
setDescription(String description)
An optional description of this resource.
Commitment
setEndTimestamp(String endTimestamp)
[Output Only] Commitment end time in RFC3339 text format.
Commitment
setId(BigInteger id)
[Output Only] The unique identifier for the resource.
Commitment
setKind(String kind)
[Output Only] Type of the resource.
Commitment
setLicenseResource(LicenseResourceCommitment licenseResource)
The license specification required as part of a license commitment.
Commitment
setName(String name)
Name of the resource.
Commitment
setPlan(String plan)
The plan for this commitment, which determines duration and discount rate.
Commitment
setRegion(String region)
[Output Only] URL of the region where this commitment may be used.
Commitment
setReservations(List<Reservation> reservations)
List of reservations in this commitment.
Commitment
setResources(List<ResourceCommitment> resources)
A list of commitment amounts for particular resources.
Commitment
setSelfLink(String selfLink)
[Output Only] Server-defined URL for the resource.
Commitment
setSelfLinkWithId(String selfLinkWithId)
[Output Only] Server-defined URL for this resource with the resource id.
Commitment
setStartTimestamp(String startTimestamp)
[Output Only] Commitment start time in RFC3339 text format.
Commitment
setStatus(String status)
[Output Only] Status of the commitment with regards to eventual expiration (each commitment has
an end date defined).
Commitment
setStatusMessage(String statusMessage)
[Output Only] An optional, human-readable explanation of the status.
Commitment
setType(String type)
The type of commitment, which affects the discount rate and the eligible resources.
-
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
-
getCategory
public String getCategory()
The category of the commitment. Category MACHINE specifies commitments composed of machine
resources such as VCPU or MEMORY, listed in resources. Category LICENSE specifies commitments
composed of software licenses, listed in licenseResources. Note that only MACHINE commitments
should have a Type specified.
- Returns:
- value or
null
for none
-
setCategory
public Commitment setCategory(String category)
The category of the commitment. Category MACHINE specifies commitments composed of machine
resources such as VCPU or MEMORY, listed in resources. Category LICENSE specifies commitments
composed of software licenses, listed in licenseResources. Note that only MACHINE commitments
should have a Type specified.
- Parameters:
category
- category or null
for none
-
getCreationTimestamp
public String getCreationTimestamp()
[Output Only] Creation timestamp in RFC3339 text format.
- Returns:
- value or
null
for none
-
setCreationTimestamp
public Commitment setCreationTimestamp(String creationTimestamp)
[Output Only] Creation timestamp in RFC3339 text format.
- Parameters:
creationTimestamp
- creationTimestamp or null
for none
-
getDescription
public String getDescription()
An optional description of this resource. Provide this property when you create the resource.
- Returns:
- value or
null
for none
-
setDescription
public Commitment setDescription(String description)
An optional description of this resource. Provide this property when you create the resource.
- Parameters:
description
- description or null
for none
-
getEndTimestamp
public String getEndTimestamp()
[Output Only] Commitment end time in RFC3339 text format.
- Returns:
- value or
null
for none
-
setEndTimestamp
public Commitment setEndTimestamp(String endTimestamp)
[Output Only] Commitment end time in RFC3339 text format.
- Parameters:
endTimestamp
- endTimestamp or null
for none
-
getId
public BigInteger getId()
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
- Returns:
- value or
null
for none
-
setId
public Commitment setId(BigInteger id)
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
- Parameters:
id
- id or null
for none
-
getKind
public String getKind()
[Output Only] Type of the resource. Always compute#commitment for commitments.
- Returns:
- value or
null
for none
-
setKind
public Commitment setKind(String kind)
[Output Only] Type of the resource. Always compute#commitment for commitments.
- Parameters:
kind
- kind or null
for none
-
getLicenseResource
public LicenseResourceCommitment getLicenseResource()
The license specification required as part of a license commitment.
- Returns:
- value or
null
for none
-
setLicenseResource
public Commitment setLicenseResource(LicenseResourceCommitment licenseResource)
The license specification required as part of a license commitment.
- Parameters:
licenseResource
- licenseResource or null
for none
-
getName
public String getName()
Name of the resource. Provided by the client when the resource is created. The name must be
1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
character must be a lowercase letter, and all following characters must be a dash, lowercase
letter, or digit, except the last character, which cannot be a dash.
- Returns:
- value or
null
for none
-
setName
public Commitment setName(String name)
Name of the resource. Provided by the client when the resource is created. The name must be
1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
character must be a lowercase letter, and all following characters must be a dash, lowercase
letter, or digit, except the last character, which cannot be a dash.
- Parameters:
name
- name or null
for none
-
getPlan
public String getPlan()
The plan for this commitment, which determines duration and discount rate. The currently
supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years).
- Returns:
- value or
null
for none
-
setPlan
public Commitment setPlan(String plan)
The plan for this commitment, which determines duration and discount rate. The currently
supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years).
- Parameters:
plan
- plan or null
for none
-
getRegion
public String getRegion()
[Output Only] URL of the region where this commitment may be used.
- Returns:
- value or
null
for none
-
setRegion
public Commitment setRegion(String region)
[Output Only] URL of the region where this commitment may be used.
- Parameters:
region
- region or null
for none
-
getReservations
public List<Reservation> getReservations()
List of reservations in this commitment.
- Returns:
- value or
null
for none
-
setReservations
public Commitment setReservations(List<Reservation> reservations)
List of reservations in this commitment.
- Parameters:
reservations
- reservations or null
for none
-
getResources
public List<ResourceCommitment> getResources()
A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource
commitments must occur together.
- Returns:
- value or
null
for none
-
setResources
public Commitment setResources(List<ResourceCommitment> resources)
A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource
commitments must occur together.
- Parameters:
resources
- resources or null
for none
-
getSelfLink
public String getSelfLink()
[Output Only] Server-defined URL for the resource.
- Returns:
- value or
null
for none
-
setSelfLink
public Commitment setSelfLink(String selfLink)
[Output Only] Server-defined URL for the resource.
- Parameters:
selfLink
- selfLink or null
for none
-
getSelfLinkWithId
public String getSelfLinkWithId()
[Output Only] Server-defined URL for this resource with the resource id.
- Returns:
- value or
null
for none
-
setSelfLinkWithId
public Commitment setSelfLinkWithId(String selfLinkWithId)
[Output Only] Server-defined URL for this resource with the resource id.
- Parameters:
selfLinkWithId
- selfLinkWithId or null
for none
-
getStartTimestamp
public String getStartTimestamp()
[Output Only] Commitment start time in RFC3339 text format.
- Returns:
- value or
null
for none
-
setStartTimestamp
public Commitment setStartTimestamp(String startTimestamp)
[Output Only] Commitment start time in RFC3339 text format.
- Parameters:
startTimestamp
- startTimestamp or null
for none
-
getStatus
public String getStatus()
[Output Only] Status of the commitment with regards to eventual expiration (each commitment has
an end date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.
- Returns:
- value or
null
for none
-
setStatus
public Commitment setStatus(String status)
[Output Only] Status of the commitment with regards to eventual expiration (each commitment has
an end date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.
- Parameters:
status
- status or null
for none
-
getStatusMessage
public String getStatusMessage()
[Output Only] An optional, human-readable explanation of the status.
- Returns:
- value or
null
for none
-
setStatusMessage
public Commitment setStatusMessage(String statusMessage)
[Output Only] An optional, human-readable explanation of the status.
- Parameters:
statusMessage
- statusMessage or null
for none
-
getType
public String getType()
The type of commitment, which affects the discount rate and the eligible resources. Type
MEMORY_OPTIMIZED specifies a commitment that will only apply to memory optimized machines.
- Returns:
- value or
null
for none
-
setType
public Commitment setType(String type)
The type of commitment, which affects the discount rate and the eligible resources. Type
MEMORY_OPTIMIZED specifies a commitment that will only apply to memory optimized machines.
- Parameters:
type
- type or null
for none
-
set
public Commitment set(String fieldName,
Object value)
- Overrides:
set
in class GenericJson
-
clone
public Commitment clone()
- Overrides:
clone
in class GenericJson
Copyright © 2011–2020 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy