public final class Reservation extends GeneratedMessageV3 implements ReservationOrBuilder
Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources.
Protobuf type google.cloud.compute.v1.Reservation
Fields
COMMITMENT_FIELD_NUMBER
public static final int COMMITMENT_FIELD_NUMBER
Field Value
CREATION_TIMESTAMP_FIELD_NUMBER
public static final int CREATION_TIMESTAMP_FIELD_NUMBER
Field Value
DESCRIPTION_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER
Field Value
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER
Field Value
KIND_FIELD_NUMBER
public static final int KIND_FIELD_NUMBER
Field Value
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
SATISFIES_PZS_FIELD_NUMBER
public static final int SATISFIES_PZS_FIELD_NUMBER
Field Value
SELF_LINK_FIELD_NUMBER
public static final int SELF_LINK_FIELD_NUMBER
Field Value
SPECIFIC_RESERVATION_FIELD_NUMBER
public static final int SPECIFIC_RESERVATION_FIELD_NUMBER
Field Value
SPECIFIC_RESERVATION_REQUIRED_FIELD_NUMBER
public static final int SPECIFIC_RESERVATION_REQUIRED_FIELD_NUMBER
Field Value
STATUS_FIELD_NUMBER
public static final int STATUS_FIELD_NUMBER
Field Value
ZONE_FIELD_NUMBER
public static final int ZONE_FIELD_NUMBER
Field Value
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getCommitment()
public String getCommitment()
[Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
optional string commitment = 482134805;
Returns
Type | Description |
String | The commitment.
|
getCommitmentBytes()
public ByteString getCommitmentBytes()
[Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
optional string commitment = 482134805;
Returns
Type | Description |
ByteString | The bytes for commitment.
|
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.
|
getDefaultInstance()
public static Reservation getDefaultInstance()
Returns
getDefaultInstanceForType()
public Reservation getDefaultInstanceForType()
Returns
getDescription()
public String getDescription()
An optional description of this resource. 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 this resource. Provide this property when you create the resource.
optional string description = 422937596;
Returns
Type | Description |
ByteString | The bytes for description.
|
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
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()
[Output Only] Type of the resource. Always compute#reservations for reservations.
optional string kind = 3292052;
Returns
Type | Description |
String | The kind.
|
getKindBytes()
public ByteString getKindBytes()
[Output Only] Type of the resource. Always compute#reservations for reservations.
optional string kind = 3292052;
Returns
getName()
The name of the resource, provided by the client when initially creating the resource. The resource 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()
The name of the resource, provided by the client when initially creating the resource. The resource 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
getParserForType()
public Parser<Reservation> getParserForType()
Returns
Overrides
getSatisfiesPzs()
public boolean getSatisfiesPzs()
[Output Only] Reserved for future use.
optional bool satisfies_pzs = 480964267;
Returns
Type | Description |
boolean | The satisfiesPzs.
|
getSelfLink()
public String getSelfLink()
[Output Only] Server-defined fully-qualified URL for this resource.
optional string self_link = 456214797;
Returns
Type | Description |
String | The selfLink.
|
getSelfLinkBytes()
public ByteString getSelfLinkBytes()
[Output Only] Server-defined fully-qualified URL for this resource.
optional string self_link = 456214797;
Returns
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getSpecificReservation()
public AllocationSpecificSKUReservation getSpecificReservation()
Reservation for instances with specific machine shapes.
optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;
Returns
getSpecificReservationOrBuilder()
public AllocationSpecificSKUReservationOrBuilder getSpecificReservationOrBuilder()
Reservation for instances with specific machine shapes.
optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;
Returns
getSpecificReservationRequired()
public boolean getSpecificReservationRequired()
Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
optional bool specific_reservation_required = 226550687;
Returns
Type | Description |
boolean | The specificReservationRequired.
|
getStatus()
public String getStatus()
[Output Only] The status of the reservation.
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] The status of the reservation.
Check the Status enum for the list of possible values.
optional string status = 181260274;
Returns
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
getZone()
Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
optional string zone = 3744684;
Returns
Type | Description |
String | The zone.
|
getZoneBytes()
public ByteString getZoneBytes()
Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
optional string zone = 3744684;
Returns
hasCommitment()
public boolean hasCommitment()
[Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
optional string commitment = 482134805;
Returns
Type | Description |
boolean | Whether the commitment 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.
|
hasDescription()
public boolean hasDescription()
An optional description of this resource. Provide this property when you create the resource.
optional string description = 422937596;
Returns
Type | Description |
boolean | Whether the description field is set.
|
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()
[Output Only] Type of the resource. Always compute#reservations for reservations.
optional string kind = 3292052;
Returns
Type | Description |
boolean | Whether the kind field is set.
|
hasName()
The name of the resource, provided by the client when initially creating the resource. The resource 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.
|
hasSatisfiesPzs()
public boolean hasSatisfiesPzs()
[Output Only] Reserved for future use.
optional bool satisfies_pzs = 480964267;
Returns
Type | Description |
boolean | Whether the satisfiesPzs field is set.
|
hasSelfLink()
public boolean hasSelfLink()
[Output Only] Server-defined fully-qualified URL for this resource.
optional string self_link = 456214797;
Returns
Type | Description |
boolean | Whether the selfLink field is set.
|
hasSpecificReservation()
public boolean hasSpecificReservation()
Reservation for instances with specific machine shapes.
optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;
Returns
Type | Description |
boolean | Whether the specificReservation field is set.
|
hasSpecificReservationRequired()
public boolean hasSpecificReservationRequired()
Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
optional bool specific_reservation_required = 226550687;
Returns
Type | Description |
boolean | Whether the specificReservationRequired field is set.
|
hasStatus()
public boolean hasStatus()
[Output Only] The status of the reservation.
Check the Status enum for the list of possible values.
optional string status = 181260274;
Returns
Type | Description |
boolean | Whether the status field is set.
|
hasZone()
Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
optional string zone = 3744684;
Returns
Type | Description |
boolean | Whether the zone field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilder()
public static Reservation.Builder newBuilder()
Returns
newBuilder(Reservation prototype)
public static Reservation.Builder newBuilder(Reservation prototype)
Parameter
Returns
newBuilderForType()
public Reservation.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Reservation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
public static Reservation parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static Reservation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static Reservation parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Reservation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static Reservation parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Reservation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Reservation parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static Reservation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Reservation parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static Reservation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static Reservation parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Reservation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<Reservation> parser()
Returns
toBuilder()
public Reservation.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions