- 1.69.0 (latest)
- 1.68.0
- 1.67.0
- 1.66.0
- 1.65.0
- 1.64.0
- 1.63.0
- 1.62.0
- 1.61.0
- 1.59.0
- 1.58.0
- 1.57.0
- 1.56.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.1
- 1.11.0
- 1.9.1
- 1.8.1
- 1.7.2
- 1.6.0-beta
public final class Commitment extends GeneratedMessageV3 implements CommitmentOrBuilder
Represents a regional resource-based commitment resource. Creating this commitment resource means that you are purchasing a resource-based committed use contract, with an explicit start and end time. You can purchase resource-based commitments for both hardware and software resources. For more information, read Resource-based committed use discounts
Protobuf type google.cloud.compute.v1.Commitment
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > CommitmentImplements
CommitmentOrBuilderStatic Fields
AUTO_RENEW_FIELD_NUMBER
public static final int AUTO_RENEW_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
CATEGORY_FIELD_NUMBER
public static final int CATEGORY_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
CREATION_TIMESTAMP_FIELD_NUMBER
public static final int CREATION_TIMESTAMP_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
CUSTOM_END_TIMESTAMP_FIELD_NUMBER
public static final int CUSTOM_END_TIMESTAMP_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
DESCRIPTION_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
END_TIMESTAMP_FIELD_NUMBER
public static final int END_TIMESTAMP_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
EXISTING_RESERVATIONS_FIELD_NUMBER
public static final int EXISTING_RESERVATIONS_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
KIND_FIELD_NUMBER
public static final int KIND_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
LICENSE_RESOURCE_FIELD_NUMBER
public static final int LICENSE_RESOURCE_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
MERGE_SOURCE_COMMITMENTS_FIELD_NUMBER
public static final int MERGE_SOURCE_COMMITMENTS_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
PLAN_FIELD_NUMBER
public static final int PLAN_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
REGION_FIELD_NUMBER
public static final int REGION_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
RESERVATIONS_FIELD_NUMBER
public static final int RESERVATIONS_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
RESOURCES_FIELD_NUMBER
public static final int RESOURCES_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
RESOURCE_STATUS_FIELD_NUMBER
public static final int RESOURCE_STATUS_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
SELF_LINK_FIELD_NUMBER
public static final int SELF_LINK_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
SPLIT_SOURCE_COMMITMENT_FIELD_NUMBER
public static final int SPLIT_SOURCE_COMMITMENT_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
START_TIMESTAMP_FIELD_NUMBER
public static final int START_TIMESTAMP_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
STATUS_FIELD_NUMBER
public static final int STATUS_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
STATUS_MESSAGE_FIELD_NUMBER
public static final int STATUS_MESSAGE_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
TYPE_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
Static Methods
getDefaultInstance()
public static Commitment getDefaultInstance()
Returns | |
---|---|
Type | Description |
Commitment |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
newBuilder()
public static Commitment.Builder newBuilder()
Returns | |
---|---|
Type | Description |
Commitment.Builder |
newBuilder(Commitment prototype)
public static Commitment.Builder newBuilder(Commitment prototype)
Parameter | |
---|---|
Name | Description |
prototype |
Commitment |
Returns | |
---|---|
Type | Description |
Commitment.Builder |
parseDelimitedFrom(InputStream input)
public static Commitment parseDelimitedFrom(InputStream input)
Parameter | |
---|---|
Name | Description |
input |
InputStream |
Returns | |
---|---|
Type | Description |
Commitment |
Exceptions | |
---|---|
Type | Description |
IOException |
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static Commitment parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Commitment |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(byte[] data)
public static Commitment parseFrom(byte[] data)
Parameter | |
---|---|
Name | Description |
data |
byte[] |
Returns | |
---|---|
Type | Description |
Commitment |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Commitment parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data |
byte[] |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Commitment |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data)
public static Commitment parseFrom(ByteString data)
Parameter | |
---|---|
Name | Description |
data |
ByteString |
Returns | |
---|---|
Type | Description |
Commitment |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Commitment parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data |
ByteString |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Commitment |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(CodedInputStream input)
public static Commitment parseFrom(CodedInputStream input)
Parameter | |
---|---|
Name | Description |
input |
CodedInputStream |
Returns | |
---|---|
Type | Description |
Commitment |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Commitment parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Commitment |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(InputStream input)
public static Commitment parseFrom(InputStream input)
Parameter | |
---|---|
Name | Description |
input |
InputStream |
Returns | |
---|---|
Type | Description |
Commitment |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static Commitment parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Commitment |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(ByteBuffer data)
public static Commitment parseFrom(ByteBuffer data)
Parameter | |
---|---|
Name | Description |
data |
ByteBuffer |
Returns | |
---|---|
Type | Description |
Commitment |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Commitment parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data |
ByteBuffer |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Commitment |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parser()
public static Parser<Commitment> parser()
Returns | |
---|---|
Type | Description |
Parser<Commitment> |
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter | |
---|---|
Name | Description |
obj |
Object |
Returns | |
---|---|
Type | Description |
boolean |
getAutoRenew()
public boolean getAutoRenew()
Specifies whether to automatically renew the commitment at the end of its current term. The default value is false. If you set the field to true, each time your commitment reaches the end of its term, Compute Engine automatically renews it for another term. You can update this field anytime before the commitment expires. For example, if the commitment is set to expire at 12 AM UTC-8 on January 3, 2027, you can update this field until 11:59 PM UTC-8 on January 2, 2027.
optional bool auto_renew = 495520765;
Returns | |
---|---|
Type | Description |
boolean |
The autoRenew. |
getCategory()
public String getCategory()
The category of the commitment; specifies whether the commitment is for hardware or software resources. Category MACHINE specifies that you are committing to hardware machine resources such as VCPU or MEMORY, listed in resources. Category LICENSE specifies that you are committing to software licenses, listed in licenseResources. Note that if you specify MACHINE commitments, then you must also specify a type to indicate the machine series of the hardware resource that you are committing to. Check the Category enum for the list of possible values.
optional string category = 50511102;
Returns | |
---|---|
Type | Description |
String |
The category. |
getCategoryBytes()
public ByteString getCategoryBytes()
The category of the commitment; specifies whether the commitment is for hardware or software resources. Category MACHINE specifies that you are committing to hardware machine resources such as VCPU or MEMORY, listed in resources. Category LICENSE specifies that you are committing to software licenses, listed in licenseResources. Note that if you specify MACHINE commitments, then you must also specify a type to indicate the machine series of the hardware resource that you are committing to. Check the Category enum for the list of possible values.
optional string category = 50511102;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for category. |
getCreationTimestamp()
public String getCreationTimestamp()
[Output Only] Creation timestamp in RFC3339 text format.
optional string creation_timestamp = 30525366;
Returns | |
---|---|
Type | Description |
String |
The creationTimestamp. |
getCreationTimestampBytes()
public ByteString getCreationTimestampBytes()
[Output Only] Creation timestamp in RFC3339 text format.
optional string creation_timestamp = 30525366;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for creationTimestamp. |
getCustomEndTimestamp()
public String getCustomEndTimestamp()
[Input Only] Optional, specifies the requested commitment end time in RFC3339 text format. Use this option when the desired commitment's end date is later than the start date + term duration.
optional string custom_end_timestamp = 181770852;
Returns | |
---|---|
Type | Description |
String |
The customEndTimestamp. |
getCustomEndTimestampBytes()
public ByteString getCustomEndTimestampBytes()
[Input Only] Optional, specifies the requested commitment end time in RFC3339 text format. Use this option when the desired commitment's end date is later than the start date + term duration.
optional string custom_end_timestamp = 181770852;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for customEndTimestamp. |
getDefaultInstanceForType()
public Commitment getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
Commitment |
getDescription()
public String getDescription()
An optional description of the commitment. You can provide this property when you create the resource.
optional string description = 422937596;
Returns | |
---|---|
Type | Description |
String |
The description. |
getDescriptionBytes()
public ByteString getDescriptionBytes()
An optional description of the commitment. You can provide this property when you create the resource.
optional string description = 422937596;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for description. |
getEndTimestamp()
public String getEndTimestamp()
[Output Only] Commitment end time in RFC3339 text format.
optional string end_timestamp = 468096690;
Returns | |
---|---|
Type | Description |
String |
The endTimestamp. |
getEndTimestampBytes()
public ByteString getEndTimestampBytes()
[Output Only] Commitment end time in RFC3339 text format.
optional string end_timestamp = 468096690;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for endTimestamp. |
getExistingReservations(int index)
public String getExistingReservations(int index)
repeated string existing_reservations = 493028443;
Parameter | |
---|---|
Name | Description |
index |
int The index of the element to return. |
Returns | |
---|---|
Type | Description |
String |
The existingReservations at the given index. |
getExistingReservationsBytes(int index)
public ByteString getExistingReservationsBytes(int index)
repeated string existing_reservations = 493028443;
Parameter | |
---|---|
Name | Description |
index |
int The index of the value to return. |
Returns | |
---|---|
Type | Description |
ByteString |
The bytes of the existingReservations at the given index. |
getExistingReservationsCount()
public int getExistingReservationsCount()
repeated string existing_reservations = 493028443;
Returns | |
---|---|
Type | Description |
int |
The count of existingReservations. |
getExistingReservationsList()
public ProtocolStringList getExistingReservationsList()
repeated string existing_reservations = 493028443;
Returns | |
---|---|
Type | Description |
ProtocolStringList |
A list containing the existingReservations. |
getId()
public long getId()
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
optional uint64 id = 3355;
Returns | |
---|---|
Type | Description |
long |
The id. |
getKind()
public String getKind()
[Output Only] Type of the resource. Always compute#commitment for commitments.
optional string kind = 3292052;
Returns | |
---|---|
Type | Description |
String |
The kind. |
getKindBytes()
public ByteString getKindBytes()
[Output Only] Type of the resource. Always compute#commitment for commitments.
optional string kind = 3292052;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for kind. |
getLicenseResource()
public LicenseResourceCommitment getLicenseResource()
The license specification required as part of a license commitment.
optional .google.cloud.compute.v1.LicenseResourceCommitment license_resource = 437955148;
Returns | |
---|---|
Type | Description |
LicenseResourceCommitment |
The licenseResource. |
getLicenseResourceOrBuilder()
public LicenseResourceCommitmentOrBuilder getLicenseResourceOrBuilder()
The license specification required as part of a license commitment.
optional .google.cloud.compute.v1.LicenseResourceCommitment license_resource = 437955148;
Returns | |
---|---|
Type | Description |
LicenseResourceCommitmentOrBuilder |
getMergeSourceCommitments(int index)
public String getMergeSourceCommitments(int index)
The list of source commitments that you are merging to create the new merged commitment. For more information, see Merging commitments.
repeated string merge_source_commitments = 188093761;
Parameter | |
---|---|
Name | Description |
index |
int The index of the element to return. |
Returns | |
---|---|
Type | Description |
String |
The mergeSourceCommitments at the given index. |
getMergeSourceCommitmentsBytes(int index)
public ByteString getMergeSourceCommitmentsBytes(int index)
The list of source commitments that you are merging to create the new merged commitment. For more information, see Merging commitments.
repeated string merge_source_commitments = 188093761;
Parameter | |
---|---|
Name | Description |
index |
int The index of the value to return. |
Returns | |
---|---|
Type | Description |
ByteString |
The bytes of the mergeSourceCommitments at the given index. |
getMergeSourceCommitmentsCount()
public int getMergeSourceCommitmentsCount()
The list of source commitments that you are merging to create the new merged commitment. For more information, see Merging commitments.
repeated string merge_source_commitments = 188093761;
Returns | |
---|---|
Type | Description |
int |
The count of mergeSourceCommitments. |
getMergeSourceCommitmentsList()
public ProtocolStringList getMergeSourceCommitmentsList()
The list of source commitments that you are merging to create the new merged commitment. For more information, see Merging commitments.
repeated string merge_source_commitments = 188093761;
Returns | |
---|---|
Type | Description |
ProtocolStringList |
A list containing the mergeSourceCommitments. |
getName()
public String getName()
Name of the commitment. You must specify a name when you purchase the commitment. 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?
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.
optional string name = 3373707;
Returns | |
---|---|
Type | Description |
String |
The name. |
getNameBytes()
public ByteString getNameBytes()
Name of the commitment. You must specify a name when you purchase the commitment. 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?
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.
optional string name = 3373707;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for name. |
getParserForType()
public Parser<Commitment> getParserForType()
Returns | |
---|---|
Type | Description |
Parser<Commitment> |
getPlan()
public String getPlan()
The minimum time duration that you commit to purchasing resources. The plan that you choose determines the preset term length of the commitment (which is 1 year or 3 years) and affects the discount rate that you receive for your resources. Committing to a longer time duration typically gives you a higher discount rate. The supported values for this field are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years). Check the Plan enum for the list of possible values.
optional string plan = 3443497;
Returns | |
---|---|
Type | Description |
String |
The plan. |
getPlanBytes()
public ByteString getPlanBytes()
The minimum time duration that you commit to purchasing resources. The plan that you choose determines the preset term length of the commitment (which is 1 year or 3 years) and affects the discount rate that you receive for your resources. Committing to a longer time duration typically gives you a higher discount rate. The supported values for this field are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years). Check the Plan enum for the list of possible values.
optional string plan = 3443497;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for plan. |
getRegion()
public String getRegion()
[Output Only] URL of the region where the commitment and committed resources are located.
optional string region = 138946292;
Returns | |
---|---|
Type | Description |
String |
The region. |
getRegionBytes()
public ByteString getRegionBytes()
[Output Only] URL of the region where the commitment and committed resources are located.
optional string region = 138946292;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for region. |
getReservations(int index)
public Reservation getReservations(int index)
The list of new reservations that you want to create and attach to this commitment. You must attach reservations to your commitment if your commitment specifies any GPUs or Local SSD disks. For more information, see Attach reservations to resource-based commitments. Specify this property only if you want to create new reservations to attach. To attach existing reservations, specify the existingReservations property instead.
repeated .google.cloud.compute.v1.Reservation reservations = 399717927;
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
Reservation |
getReservationsCount()
public int getReservationsCount()
The list of new reservations that you want to create and attach to this commitment. You must attach reservations to your commitment if your commitment specifies any GPUs or Local SSD disks. For more information, see Attach reservations to resource-based commitments. Specify this property only if you want to create new reservations to attach. To attach existing reservations, specify the existingReservations property instead.
repeated .google.cloud.compute.v1.Reservation reservations = 399717927;
Returns | |
---|---|
Type | Description |
int |
getReservationsList()
public List<Reservation> getReservationsList()
The list of new reservations that you want to create and attach to this commitment. You must attach reservations to your commitment if your commitment specifies any GPUs or Local SSD disks. For more information, see Attach reservations to resource-based commitments. Specify this property only if you want to create new reservations to attach. To attach existing reservations, specify the existingReservations property instead.
repeated .google.cloud.compute.v1.Reservation reservations = 399717927;
Returns | |
---|---|
Type | Description |
List<Reservation> |
getReservationsOrBuilder(int index)
public ReservationOrBuilder getReservationsOrBuilder(int index)
The list of new reservations that you want to create and attach to this commitment. You must attach reservations to your commitment if your commitment specifies any GPUs or Local SSD disks. For more information, see Attach reservations to resource-based commitments. Specify this property only if you want to create new reservations to attach. To attach existing reservations, specify the existingReservations property instead.
repeated .google.cloud.compute.v1.Reservation reservations = 399717927;
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
ReservationOrBuilder |
getReservationsOrBuilderList()
public List<? extends ReservationOrBuilder> getReservationsOrBuilderList()
The list of new reservations that you want to create and attach to this commitment. You must attach reservations to your commitment if your commitment specifies any GPUs or Local SSD disks. For more information, see Attach reservations to resource-based commitments. Specify this property only if you want to create new reservations to attach. To attach existing reservations, specify the existingReservations property instead.
repeated .google.cloud.compute.v1.Reservation reservations = 399717927;
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.compute.v1.ReservationOrBuilder> |
getResourceStatus()
public CommitmentResourceStatus getResourceStatus()
[Output Only] Status information for Commitment resource.
optional .google.cloud.compute.v1.CommitmentResourceStatus resource_status = 249429315;
Returns | |
---|---|
Type | Description |
CommitmentResourceStatus |
The resourceStatus. |
getResourceStatusOrBuilder()
public CommitmentResourceStatusOrBuilder getResourceStatusOrBuilder()
[Output Only] Status information for Commitment resource.
optional .google.cloud.compute.v1.CommitmentResourceStatus resource_status = 249429315;
Returns | |
---|---|
Type | Description |
CommitmentResourceStatusOrBuilder |
getResources(int index)
public ResourceCommitment getResources(int index)
The list of all the hardware resources, with their types and amounts, that you want to commit to. Specify as a separate entry in the list for each individual resource type.
repeated .google.cloud.compute.v1.ResourceCommitment resources = 164412965;
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
ResourceCommitment |
getResourcesCount()
public int getResourcesCount()
The list of all the hardware resources, with their types and amounts, that you want to commit to. Specify as a separate entry in the list for each individual resource type.
repeated .google.cloud.compute.v1.ResourceCommitment resources = 164412965;
Returns | |
---|---|
Type | Description |
int |
getResourcesList()
public List<ResourceCommitment> getResourcesList()
The list of all the hardware resources, with their types and amounts, that you want to commit to. Specify as a separate entry in the list for each individual resource type.
repeated .google.cloud.compute.v1.ResourceCommitment resources = 164412965;
Returns | |
---|---|
Type | Description |
List<ResourceCommitment> |
getResourcesOrBuilder(int index)
public ResourceCommitmentOrBuilder getResourcesOrBuilder(int index)
The list of all the hardware resources, with their types and amounts, that you want to commit to. Specify as a separate entry in the list for each individual resource type.
repeated .google.cloud.compute.v1.ResourceCommitment resources = 164412965;
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
ResourceCommitmentOrBuilder |
getResourcesOrBuilderList()
public List<? extends ResourceCommitmentOrBuilder> getResourcesOrBuilderList()
The list of all the hardware resources, with their types and amounts, that you want to commit to. Specify as a separate entry in the list for each individual resource type.
repeated .google.cloud.compute.v1.ResourceCommitment resources = 164412965;
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.compute.v1.ResourceCommitmentOrBuilder> |
getSelfLink()
public String getSelfLink()
[Output Only] Server-defined URL for the resource.
optional string self_link = 456214797;
Returns | |
---|---|
Type | Description |
String |
The selfLink. |
getSelfLinkBytes()
public ByteString getSelfLinkBytes()
[Output Only] Server-defined URL for the resource.
optional string self_link = 456214797;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for selfLink. |
getSerializedSize()
public int getSerializedSize()
Returns | |
---|---|
Type | Description |
int |
getSplitSourceCommitment()
public String getSplitSourceCommitment()
The source commitment from which you are transferring resources to create the new split commitment. For more information, see Split commitments.
optional string split_source_commitment = 402611156;
Returns | |
---|---|
Type | Description |
String |
The splitSourceCommitment. |
getSplitSourceCommitmentBytes()
public ByteString getSplitSourceCommitmentBytes()
The source commitment from which you are transferring resources to create the new split commitment. For more information, see Split commitments.
optional string split_source_commitment = 402611156;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for splitSourceCommitment. |
getStartTimestamp()
public String getStartTimestamp()
[Output Only] Commitment start time in RFC3339 text format.
optional string start_timestamp = 83645817;
Returns | |
---|---|
Type | Description |
String |
The startTimestamp. |
getStartTimestampBytes()
public ByteString getStartTimestampBytes()
[Output Only] Commitment start time in RFC3339 text format.
optional string start_timestamp = 83645817;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for startTimestamp. |
getStatus()
public String getStatus()
[Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). Status can be one of the following values: NOT_YET_ACTIVE, ACTIVE, or EXPIRED. Check the Status enum for the list of possible values.
optional string status = 181260274;
Returns | |
---|---|
Type | Description |
String |
The status. |
getStatusBytes()
public ByteString getStatusBytes()
[Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). Status can be one of the following values: NOT_YET_ACTIVE, ACTIVE, or EXPIRED. Check the Status enum for the list of possible values.
optional string status = 181260274;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for status. |
getStatusMessage()
public String getStatusMessage()
[Output Only] An optional, human-readable explanation of the status.
optional string status_message = 297428154;
Returns | |
---|---|
Type | Description |
String |
The statusMessage. |
getStatusMessageBytes()
public ByteString getStatusMessageBytes()
[Output Only] An optional, human-readable explanation of the status.
optional string status_message = 297428154;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for statusMessage. |
getType()
public String getType()
The type of commitment; specifies the machine series for which you want to commit to purchasing resources. The choice of machine series affects the discount rate and the eligible resource types. The type must be one of the following: ACCELERATOR_OPTIMIZED, ACCELERATOR_OPTIMIZED_A3, ACCELERATOR_OPTIMIZED_A3_MEGA, COMPUTE_OPTIMIZED, COMPUTE_OPTIMIZED_C2D, COMPUTE_OPTIMIZED_C3, COMPUTE_OPTIMIZED_C3D, COMPUTE_OPTIMIZED_H3, GENERAL_PURPOSE, GENERAL_PURPOSE_C4, GENERAL_PURPOSE_E2, GENERAL_PURPOSE_N2, GENERAL_PURPOSE_N2D, GENERAL_PURPOSE_N4, GENERAL_PURPOSE_T2D, GRAPHICS_OPTIMIZED, MEMORY_OPTIMIZED, MEMORY_OPTIMIZED_M3, MEMORY_OPTIMIZED_X4, STORAGE_OPTIMIZED_Z3. For example, type MEMORY_OPTIMIZED specifies a commitment that applies only to eligible resources of memory optimized M1 and M2 machine series. Type GENERAL_PURPOSE specifies a commitment that applies only to eligible resources of general purpose N1 machine series. Check the Type enum for the list of possible values.
optional string type = 3575610;
Returns | |
---|---|
Type | Description |
String |
The type. |
getTypeBytes()
public ByteString getTypeBytes()
The type of commitment; specifies the machine series for which you want to commit to purchasing resources. The choice of machine series affects the discount rate and the eligible resource types. The type must be one of the following: ACCELERATOR_OPTIMIZED, ACCELERATOR_OPTIMIZED_A3, ACCELERATOR_OPTIMIZED_A3_MEGA, COMPUTE_OPTIMIZED, COMPUTE_OPTIMIZED_C2D, COMPUTE_OPTIMIZED_C3, COMPUTE_OPTIMIZED_C3D, COMPUTE_OPTIMIZED_H3, GENERAL_PURPOSE, GENERAL_PURPOSE_C4, GENERAL_PURPOSE_E2, GENERAL_PURPOSE_N2, GENERAL_PURPOSE_N2D, GENERAL_PURPOSE_N4, GENERAL_PURPOSE_T2D, GRAPHICS_OPTIMIZED, MEMORY_OPTIMIZED, MEMORY_OPTIMIZED_M3, MEMORY_OPTIMIZED_X4, STORAGE_OPTIMIZED_Z3. For example, type MEMORY_OPTIMIZED specifies a commitment that applies only to eligible resources of memory optimized M1 and M2 machine series. Type GENERAL_PURPOSE specifies a commitment that applies only to eligible resources of general purpose N1 machine series. Check the Type enum for the list of possible values.
optional string type = 3575610;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for type. |
hasAutoRenew()
public boolean hasAutoRenew()
Specifies whether to automatically renew the commitment at the end of its current term. The default value is false. If you set the field to true, each time your commitment reaches the end of its term, Compute Engine automatically renews it for another term. You can update this field anytime before the commitment expires. For example, if the commitment is set to expire at 12 AM UTC-8 on January 3, 2027, you can update this field until 11:59 PM UTC-8 on January 2, 2027.
optional bool auto_renew = 495520765;
Returns | |
---|---|
Type | Description |
boolean |
Whether the autoRenew field is set. |
hasCategory()
public boolean hasCategory()
The category of the commitment; specifies whether the commitment is for hardware or software resources. Category MACHINE specifies that you are committing to hardware machine resources such as VCPU or MEMORY, listed in resources. Category LICENSE specifies that you are committing to software licenses, listed in licenseResources. Note that if you specify MACHINE commitments, then you must also specify a type to indicate the machine series of the hardware resource that you are committing to. Check the Category enum for the list of possible values.
optional string category = 50511102;
Returns | |
---|---|
Type | Description |
boolean |
Whether the category field is set. |
hasCreationTimestamp()
public boolean hasCreationTimestamp()
[Output Only] Creation timestamp in RFC3339 text format.
optional string creation_timestamp = 30525366;
Returns | |
---|---|
Type | Description |
boolean |
Whether the creationTimestamp field is set. |
hasCustomEndTimestamp()
public boolean hasCustomEndTimestamp()
[Input Only] Optional, specifies the requested commitment end time in RFC3339 text format. Use this option when the desired commitment's end date is later than the start date + term duration.
optional string custom_end_timestamp = 181770852;
Returns | |
---|---|
Type | Description |
boolean |
Whether the customEndTimestamp field is set. |
hasDescription()
public boolean hasDescription()
An optional description of the commitment. You can provide this property when you create the resource.
optional string description = 422937596;
Returns | |
---|---|
Type | Description |
boolean |
Whether the description field is set. |
hasEndTimestamp()
public boolean hasEndTimestamp()
[Output Only] Commitment end time in RFC3339 text format.
optional string end_timestamp = 468096690;
Returns | |
---|---|
Type | Description |
boolean |
Whether the endTimestamp field is set. |
hasId()
public boolean hasId()
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
optional uint64 id = 3355;
Returns | |
---|---|
Type | Description |
boolean |
Whether the id field is set. |
hasKind()
public boolean hasKind()
[Output Only] Type of the resource. Always compute#commitment for commitments.
optional string kind = 3292052;
Returns | |
---|---|
Type | Description |
boolean |
Whether the kind field is set. |
hasLicenseResource()
public boolean hasLicenseResource()
The license specification required as part of a license commitment.
optional .google.cloud.compute.v1.LicenseResourceCommitment license_resource = 437955148;
Returns | |
---|---|
Type | Description |
boolean |
Whether the licenseResource field is set. |
hasName()
public boolean hasName()
Name of the commitment. You must specify a name when you purchase the commitment. 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?
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.
optional string name = 3373707;
Returns | |
---|---|
Type | Description |
boolean |
Whether the name field is set. |
hasPlan()
public boolean hasPlan()
The minimum time duration that you commit to purchasing resources. The plan that you choose determines the preset term length of the commitment (which is 1 year or 3 years) and affects the discount rate that you receive for your resources. Committing to a longer time duration typically gives you a higher discount rate. The supported values for this field are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years). Check the Plan enum for the list of possible values.
optional string plan = 3443497;
Returns | |
---|---|
Type | Description |
boolean |
Whether the plan field is set. |
hasRegion()
public boolean hasRegion()
[Output Only] URL of the region where the commitment and committed resources are located.
optional string region = 138946292;
Returns | |
---|---|
Type | Description |
boolean |
Whether the region field is set. |
hasResourceStatus()
public boolean hasResourceStatus()
[Output Only] Status information for Commitment resource.
optional .google.cloud.compute.v1.CommitmentResourceStatus resource_status = 249429315;
Returns | |
---|---|
Type | Description |
boolean |
Whether the resourceStatus field is set. |
hasSelfLink()
public boolean hasSelfLink()
[Output Only] Server-defined URL for the resource.
optional string self_link = 456214797;
Returns | |
---|---|
Type | Description |
boolean |
Whether the selfLink field is set. |
hasSplitSourceCommitment()
public boolean hasSplitSourceCommitment()
The source commitment from which you are transferring resources to create the new split commitment. For more information, see Split commitments.
optional string split_source_commitment = 402611156;
Returns | |
---|---|
Type | Description |
boolean |
Whether the splitSourceCommitment field is set. |
hasStartTimestamp()
public boolean hasStartTimestamp()
[Output Only] Commitment start time in RFC3339 text format.
optional string start_timestamp = 83645817;
Returns | |
---|---|
Type | Description |
boolean |
Whether the startTimestamp field is set. |
hasStatus()
public boolean hasStatus()
[Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). Status can be one of the following values: NOT_YET_ACTIVE, ACTIVE, or EXPIRED. Check the Status enum for the list of possible values.
optional string status = 181260274;
Returns | |
---|---|
Type | Description |
boolean |
Whether the status field is set. |
hasStatusMessage()
public boolean hasStatusMessage()
[Output Only] An optional, human-readable explanation of the status.
optional string status_message = 297428154;
Returns | |
---|---|
Type | Description |
boolean |
Whether the statusMessage field is set. |
hasType()
public boolean hasType()
The type of commitment; specifies the machine series for which you want to commit to purchasing resources. The choice of machine series affects the discount rate and the eligible resource types. The type must be one of the following: ACCELERATOR_OPTIMIZED, ACCELERATOR_OPTIMIZED_A3, ACCELERATOR_OPTIMIZED_A3_MEGA, COMPUTE_OPTIMIZED, COMPUTE_OPTIMIZED_C2D, COMPUTE_OPTIMIZED_C3, COMPUTE_OPTIMIZED_C3D, COMPUTE_OPTIMIZED_H3, GENERAL_PURPOSE, GENERAL_PURPOSE_C4, GENERAL_PURPOSE_E2, GENERAL_PURPOSE_N2, GENERAL_PURPOSE_N2D, GENERAL_PURPOSE_N4, GENERAL_PURPOSE_T2D, GRAPHICS_OPTIMIZED, MEMORY_OPTIMIZED, MEMORY_OPTIMIZED_M3, MEMORY_OPTIMIZED_X4, STORAGE_OPTIMIZED_Z3. For example, type MEMORY_OPTIMIZED specifies a commitment that applies only to eligible resources of memory optimized M1 and M2 machine series. Type GENERAL_PURPOSE specifies a commitment that applies only to eligible resources of general purpose N1 machine series. Check the Type enum for the list of possible values.
optional string type = 3575610;
Returns | |
---|---|
Type | Description |
boolean |
Whether the type field is set. |
hashCode()
public int hashCode()
Returns | |
---|---|
Type | Description |
int |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
newBuilderForType()
public Commitment.Builder newBuilderForType()
Returns | |
---|---|
Type | Description |
Commitment.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Commitment.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter | |
---|---|
Name | Description |
parent |
BuilderParent |
Returns | |
---|---|
Type | Description |
Commitment.Builder |
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter | |
---|---|
Name | Description |
unused |
UnusedPrivateParameter |
Returns | |
---|---|
Type | Description |
Object |
toBuilder()
public Commitment.Builder toBuilder()
Returns | |
---|---|
Type | Description |
Commitment.Builder |
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter | |
---|---|
Name | Description |
output |
CodedOutputStream |
Exceptions | |
---|---|
Type | Description |
IOException |