Class Reservation.Builder (1.39.0)

public static final class Reservation.Builder extends GeneratedMessageV3.Builder<Reservation.Builder> 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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Reservation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Reservation.Builder
Overrides

build()

public Reservation build()
Returns
TypeDescription
Reservation

buildPartial()

public Reservation buildPartial()
Returns
TypeDescription
Reservation

clear()

public Reservation.Builder clear()
Returns
TypeDescription
Reservation.Builder
Overrides

clearCommitment()

public Reservation.Builder clearCommitment()

[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
TypeDescription
Reservation.Builder

This builder for chaining.

clearCreationTimestamp()

public Reservation.Builder clearCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

clearDescription()

public Reservation.Builder clearDescription()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Reservation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Reservation.Builder
Overrides

clearId()

public Reservation.Builder clearId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

clearKind()

public Reservation.Builder clearKind()

[Output Only] Type of the resource. Always compute#reservations for reservations.

optional string kind = 3292052;

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

clearName()

public Reservation.Builder clearName()

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
TypeDescription
Reservation.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Reservation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Reservation.Builder
Overrides

clearResourcePolicies()

public Reservation.Builder clearResourcePolicies()
Returns
TypeDescription
Reservation.Builder

clearResourceStatus()

public Reservation.Builder clearResourceStatus()

[Output Only] Status information for Reservation resource.

optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;

Returns
TypeDescription
Reservation.Builder

clearSatisfiesPzs()

public Reservation.Builder clearSatisfiesPzs()

[Output Only] Reserved for future use.

optional bool satisfies_pzs = 480964267;

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

public Reservation.Builder clearSelfLink()

[Output Only] Server-defined fully-qualified URL for this resource.

optional string self_link = 456214797;

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

clearShareSettings()

public Reservation.Builder clearShareSettings()

Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.

optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;

Returns
TypeDescription
Reservation.Builder

clearSpecificReservation()

public Reservation.Builder clearSpecificReservation()

Reservation for instances with specific machine shapes.

optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;

Returns
TypeDescription
Reservation.Builder

clearSpecificReservationRequired()

public Reservation.Builder clearSpecificReservationRequired()

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
TypeDescription
Reservation.Builder

This builder for chaining.

clearStatus()

public Reservation.Builder clearStatus()

[Output Only] The status of the reservation. Check the Status enum for the list of possible values.

optional string status = 181260274;

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

clearZone()

public Reservation.Builder clearZone()

Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.

optional string zone = 3744684;

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

clone()

public Reservation.Builder clone()
Returns
TypeDescription
Reservation.Builder
Overrides

containsResourcePolicies(String key)

public boolean containsResourcePolicies(String key)

Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.

map<string, string> resource_policies = 22220385;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

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
TypeDescription
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
TypeDescription
ByteString

The bytes for commitment.

getCreationTimestamp()

public String getCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
String

The creationTimestamp.

getCreationTimestampBytes()

public ByteString getCreationTimestampBytes()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
ByteString

The bytes for creationTimestamp.

getDefaultInstanceForType()

public Reservation getDefaultInstanceForType()
Returns
TypeDescription
Reservation

getDescription()

public String getDescription()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
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
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getId()

public long getId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
long

The id.

getKind()

public String getKind()

[Output Only] Type of the resource. Always compute#reservations for reservations.

optional string kind = 3292052;

Returns
TypeDescription
String

The kind.

getKindBytes()

public ByteString getKindBytes()

[Output Only] Type of the resource. Always compute#reservations for reservations.

optional string kind = 3292052;

Returns
TypeDescription
ByteString

The bytes for kind.

getMutableResourcePolicies()

public Map<String,String> getMutableResourcePolicies()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getName()

public String 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
TypeDescription
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
TypeDescription
ByteString

The bytes for name.

getResourcePolicies()

public Map<String,String> getResourcePolicies()
Returns
TypeDescription
Map<String,String>

getResourcePoliciesCount()

public int getResourcePoliciesCount()

Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.

map<string, string> resource_policies = 22220385;

Returns
TypeDescription
int

getResourcePoliciesMap()

public Map<String,String> getResourcePoliciesMap()

Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.

map<string, string> resource_policies = 22220385;

Returns
TypeDescription
Map<String,String>

getResourcePoliciesOrDefault(String key, String defaultValue)

public String getResourcePoliciesOrDefault(String key, String defaultValue)

Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.

map<string, string> resource_policies = 22220385;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getResourcePoliciesOrThrow(String key)

public String getResourcePoliciesOrThrow(String key)

Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.

map<string, string> resource_policies = 22220385;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getResourceStatus()

public AllocationResourceStatus getResourceStatus()

[Output Only] Status information for Reservation resource.

optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;

Returns
TypeDescription
AllocationResourceStatus

The resourceStatus.

getResourceStatusBuilder()

public AllocationResourceStatus.Builder getResourceStatusBuilder()

[Output Only] Status information for Reservation resource.

optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;

Returns
TypeDescription
AllocationResourceStatus.Builder

getResourceStatusOrBuilder()

public AllocationResourceStatusOrBuilder getResourceStatusOrBuilder()

[Output Only] Status information for Reservation resource.

optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;

Returns
TypeDescription
AllocationResourceStatusOrBuilder

getSatisfiesPzs()

public boolean getSatisfiesPzs()

[Output Only] Reserved for future use.

optional bool satisfies_pzs = 480964267;

Returns
TypeDescription
boolean

The satisfiesPzs.

public String getSelfLink()

[Output Only] Server-defined fully-qualified URL for this resource.

optional string self_link = 456214797;

Returns
TypeDescription
String

The selfLink.

getSelfLinkBytes()

public ByteString getSelfLinkBytes()

[Output Only] Server-defined fully-qualified URL for this resource.

optional string self_link = 456214797;

Returns
TypeDescription
ByteString

The bytes for selfLink.

getShareSettings()

public ShareSettings getShareSettings()

Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.

optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;

Returns
TypeDescription
ShareSettings

The shareSettings.

getShareSettingsBuilder()

public ShareSettings.Builder getShareSettingsBuilder()

Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.

optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;

Returns
TypeDescription
ShareSettings.Builder

getShareSettingsOrBuilder()

public ShareSettingsOrBuilder getShareSettingsOrBuilder()

Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.

optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;

Returns
TypeDescription
ShareSettingsOrBuilder

getSpecificReservation()

public AllocationSpecificSKUReservation getSpecificReservation()

Reservation for instances with specific machine shapes.

optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;

Returns
TypeDescription
AllocationSpecificSKUReservation

The specificReservation.

getSpecificReservationBuilder()

public AllocationSpecificSKUReservation.Builder getSpecificReservationBuilder()

Reservation for instances with specific machine shapes.

optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;

Returns
TypeDescription
AllocationSpecificSKUReservation.Builder

getSpecificReservationOrBuilder()

public AllocationSpecificSKUReservationOrBuilder getSpecificReservationOrBuilder()

Reservation for instances with specific machine shapes.

optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;

Returns
TypeDescription
AllocationSpecificSKUReservationOrBuilder

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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for status.

getZone()

public String 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
TypeDescription
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
TypeDescription
ByteString

The bytes for zone.

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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the description 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
TypeDescription
boolean

Whether the id field is set.

hasKind()

public boolean hasKind()

[Output Only] Type of the resource. Always compute#reservations for reservations.

optional string kind = 3292052;

Returns
TypeDescription
boolean

Whether the kind field is set.

hasName()

public boolean 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
TypeDescription
boolean

Whether the name field is set.

hasResourceStatus()

public boolean hasResourceStatus()

[Output Only] Status information for Reservation resource.

optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;

Returns
TypeDescription
boolean

Whether the resourceStatus field is set.

hasSatisfiesPzs()

public boolean hasSatisfiesPzs()

[Output Only] Reserved for future use.

optional bool satisfies_pzs = 480964267;

Returns
TypeDescription
boolean

Whether the satisfiesPzs field is set.

public boolean hasSelfLink()

[Output Only] Server-defined fully-qualified URL for this resource.

optional string self_link = 456214797;

Returns
TypeDescription
boolean

Whether the selfLink field is set.

hasShareSettings()

public boolean hasShareSettings()

Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.

optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;

Returns
TypeDescription
boolean

Whether the shareSettings field is set.

hasSpecificReservation()

public boolean hasSpecificReservation()

Reservation for instances with specific machine shapes.

optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the status field is set.

hasZone()

public boolean 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
TypeDescription
boolean

Whether the zone field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Reservation other)

public Reservation.Builder mergeFrom(Reservation other)
Parameter
NameDescription
otherReservation
Returns
TypeDescription
Reservation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Reservation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Reservation.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Reservation.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Reservation.Builder
Overrides

mergeResourceStatus(AllocationResourceStatus value)

public Reservation.Builder mergeResourceStatus(AllocationResourceStatus value)

[Output Only] Status information for Reservation resource.

optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;

Parameter
NameDescription
valueAllocationResourceStatus
Returns
TypeDescription
Reservation.Builder

mergeShareSettings(ShareSettings value)

public Reservation.Builder mergeShareSettings(ShareSettings value)

Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.

optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;

Parameter
NameDescription
valueShareSettings
Returns
TypeDescription
Reservation.Builder

mergeSpecificReservation(AllocationSpecificSKUReservation value)

public Reservation.Builder mergeSpecificReservation(AllocationSpecificSKUReservation value)

Reservation for instances with specific machine shapes.

optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;

Parameter
NameDescription
valueAllocationSpecificSKUReservation
Returns
TypeDescription
Reservation.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Reservation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Reservation.Builder
Overrides

putAllResourcePolicies(Map<String,String> values)

public Reservation.Builder putAllResourcePolicies(Map<String,String> values)

Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.

map<string, string> resource_policies = 22220385;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
Reservation.Builder

putResourcePolicies(String key, String value)

public Reservation.Builder putResourcePolicies(String key, String value)

Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.

map<string, string> resource_policies = 22220385;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
Reservation.Builder

removeResourcePolicies(String key)

public Reservation.Builder removeResourcePolicies(String key)

Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.

map<string, string> resource_policies = 22220385;

Parameter
NameDescription
keyString
Returns
TypeDescription
Reservation.Builder

setCommitment(String value)

public Reservation.Builder setCommitment(String value)

[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;

Parameter
NameDescription
valueString

The commitment to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

setCommitmentBytes(ByteString value)

public Reservation.Builder setCommitmentBytes(ByteString value)

[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;

Parameter
NameDescription
valueByteString

The bytes for commitment to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

setCreationTimestamp(String value)

public Reservation.Builder setCreationTimestamp(String value)

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Parameter
NameDescription
valueString

The creationTimestamp to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

setCreationTimestampBytes(ByteString value)

public Reservation.Builder setCreationTimestampBytes(ByteString value)

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Parameter
NameDescription
valueByteString

The bytes for creationTimestamp to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

setDescription(String value)

public Reservation.Builder setDescription(String value)

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Reservation.Builder setDescriptionBytes(ByteString value)

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Reservation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Reservation.Builder
Overrides

setId(long value)

public Reservation.Builder setId(long value)

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Parameter
NameDescription
valuelong

The id to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

setKind(String value)

public Reservation.Builder setKind(String value)

[Output Only] Type of the resource. Always compute#reservations for reservations.

optional string kind = 3292052;

Parameter
NameDescription
valueString

The kind to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

setKindBytes(ByteString value)

public Reservation.Builder setKindBytes(ByteString value)

[Output Only] Type of the resource. Always compute#reservations for reservations.

optional string kind = 3292052;

Parameter
NameDescription
valueByteString

The bytes for kind to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

setName(String value)

public Reservation.Builder setName(String value)

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;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Reservation.Builder setNameBytes(ByteString value)

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;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Reservation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Reservation.Builder
Overrides

setResourceStatus(AllocationResourceStatus value)

public Reservation.Builder setResourceStatus(AllocationResourceStatus value)

[Output Only] Status information for Reservation resource.

optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;

Parameter
NameDescription
valueAllocationResourceStatus
Returns
TypeDescription
Reservation.Builder

setResourceStatus(AllocationResourceStatus.Builder builderForValue)

public Reservation.Builder setResourceStatus(AllocationResourceStatus.Builder builderForValue)

[Output Only] Status information for Reservation resource.

optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;

Parameter
NameDescription
builderForValueAllocationResourceStatus.Builder
Returns
TypeDescription
Reservation.Builder

setSatisfiesPzs(boolean value)

public Reservation.Builder setSatisfiesPzs(boolean value)

[Output Only] Reserved for future use.

optional bool satisfies_pzs = 480964267;

Parameter
NameDescription
valueboolean

The satisfiesPzs to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

public Reservation.Builder setSelfLink(String value)

[Output Only] Server-defined fully-qualified URL for this resource.

optional string self_link = 456214797;

Parameter
NameDescription
valueString

The selfLink to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

setSelfLinkBytes(ByteString value)

public Reservation.Builder setSelfLinkBytes(ByteString value)

[Output Only] Server-defined fully-qualified URL for this resource.

optional string self_link = 456214797;

Parameter
NameDescription
valueByteString

The bytes for selfLink to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

setShareSettings(ShareSettings value)

public Reservation.Builder setShareSettings(ShareSettings value)

Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.

optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;

Parameter
NameDescription
valueShareSettings
Returns
TypeDescription
Reservation.Builder

setShareSettings(ShareSettings.Builder builderForValue)

public Reservation.Builder setShareSettings(ShareSettings.Builder builderForValue)

Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.

optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;

Parameter
NameDescription
builderForValueShareSettings.Builder
Returns
TypeDescription
Reservation.Builder

setSpecificReservation(AllocationSpecificSKUReservation value)

public Reservation.Builder setSpecificReservation(AllocationSpecificSKUReservation value)

Reservation for instances with specific machine shapes.

optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;

Parameter
NameDescription
valueAllocationSpecificSKUReservation
Returns
TypeDescription
Reservation.Builder

setSpecificReservation(AllocationSpecificSKUReservation.Builder builderForValue)

public Reservation.Builder setSpecificReservation(AllocationSpecificSKUReservation.Builder builderForValue)

Reservation for instances with specific machine shapes.

optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;

Parameter
NameDescription
builderForValueAllocationSpecificSKUReservation.Builder
Returns
TypeDescription
Reservation.Builder

setSpecificReservationRequired(boolean value)

public Reservation.Builder setSpecificReservationRequired(boolean value)

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;

Parameter
NameDescription
valueboolean

The specificReservationRequired to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

setStatus(String value)

public Reservation.Builder setStatus(String value)

[Output Only] The status of the reservation. Check the Status enum for the list of possible values.

optional string status = 181260274;

Parameter
NameDescription
valueString

The status to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

setStatusBytes(ByteString value)

public Reservation.Builder setStatusBytes(ByteString value)

[Output Only] The status of the reservation. Check the Status enum for the list of possible values.

optional string status = 181260274;

Parameter
NameDescription
valueByteString

The bytes for status to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Reservation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Reservation.Builder
Overrides

setZone(String value)

public Reservation.Builder setZone(String value)

Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.

optional string zone = 3744684;

Parameter
NameDescription
valueString

The zone to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

setZoneBytes(ByteString value)

public Reservation.Builder setZoneBytes(ByteString value)

Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.

optional string zone = 3744684;

Parameter
NameDescription
valueByteString

The bytes for zone to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.