target.apidocs.com.google.api.services.compute.model.Commitment.html Maven / Gradle / Ivy
Commitment (Compute Engine API v1-rev20240919-2.0.0)
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 com.google.api.client.json.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.
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
Commitment()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Commitment
clone()
Boolean
getAutoRenew()
Specifies whether to enable automatic renewal for the commitment.
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.
List<String>
getExistingReservations()
Specifies the already existing reservations to attach to the Commitment.
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.
List<String>
getMergeSourceCommitments()
List of source commitments to be merged into a new 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 create-on-create reservations for this commitment.
List<ResourceCommitment>
getResources()
A list of commitment amounts for particular resources.
String
getSelfLink()
[Output Only] Server-defined URL for the resource.
String
getSplitSourceCommitment()
Source commitment to be split into a new commitment.
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
setAutoRenew(Boolean autoRenew)
Specifies whether to enable automatic renewal for the commitment.
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
setExistingReservations(List<String> existingReservations)
Specifies the already existing reservations to attach to the Commitment.
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
setMergeSourceCommitments(List<String> mergeSourceCommitments)
List of source commitments to be merged into a new 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 create-on-create reservations for 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
setSplitSourceCommitment(String splitSourceCommitment)
Source commitment to be split into a new commitment.
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
-
getAutoRenew
public Boolean getAutoRenew()
Specifies whether to enable automatic renewal for the commitment. The default value is false if
not specified. The field can be updated until the day of the commitment expiration at 12:00am
PST. If the field is set to true, the commitment will be automatically renewed for either one
or three years according to the terms of the existing commitment.
- Returns:
- value or
null
for none
-
setAutoRenew
public Commitment setAutoRenew(Boolean autoRenew)
Specifies whether to enable automatic renewal for the commitment. The default value is false if
not specified. The field can be updated until the day of the commitment expiration at 12:00am
PST. If the field is set to true, the commitment will be automatically renewed for either one
or three years according to the terms of the existing commitment.
- Parameters:
autoRenew
- autoRenew or null
for none
-
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
-
getExistingReservations
public List<String> getExistingReservations()
Specifies the already existing reservations to attach to the Commitment. This field is
optional, and it can be a full or partial URL. For example, the following are valid URLs to an
reservation: - https://www.googleapis.com/compute/v1/projects/project/zones/zone
/reservations/reservation - projects/project/zones/zone/reservations/reservation
- Returns:
- value or
null
for none
-
setExistingReservations
public Commitment setExistingReservations(List<String> existingReservations)
Specifies the already existing reservations to attach to the Commitment. This field is
optional, and it can be a full or partial URL. For example, the following are valid URLs to an
reservation: - https://www.googleapis.com/compute/v1/projects/project/zones/zone
/reservations/reservation - projects/project/zones/zone/reservations/reservation
- Parameters:
existingReservations
- existingReservations 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
-
getMergeSourceCommitments
public List<String> getMergeSourceCommitments()
List of source commitments to be merged into a new commitment.
- Returns:
- value or
null
for none
-
setMergeSourceCommitments
public Commitment setMergeSourceCommitments(List<String> mergeSourceCommitments)
List of source commitments to be merged into a new commitment.
- Parameters:
mergeSourceCommitments
- mergeSourceCommitments 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 create-on-create reservations for this commitment.
- Returns:
- value or
null
for none
-
setReservations
public Commitment setReservations(List<Reservation> reservations)
List of create-on-create reservations for 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
-
getSplitSourceCommitment
public String getSplitSourceCommitment()
Source commitment to be split into a new commitment.
- Returns:
- value or
null
for none
-
setSplitSourceCommitment
public Commitment setSplitSourceCommitment(String splitSourceCommitment)
Source commitment to be split into a new commitment.
- Parameters:
splitSourceCommitment
- splitSourceCommitment 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. Type
ACCELERATOR_OPTIMIZED specifies a commitment that will only apply to accelerator 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. Type
ACCELERATOR_OPTIMIZED specifies a commitment that will only apply to accelerator optimized
machines.
- Parameters:
type
- type or null
for none
-
set
public Commitment set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public Commitment clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.