Class Reservation.Builder (1.53.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
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Reservation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Reservation.Builder
Overrides

build()

public Reservation build()
Returns
Type Description
Reservation

buildPartial()

public Reservation buildPartial()
Returns
Type Description
Reservation

clear()

public Reservation.Builder clear()
Returns
Type Description
Reservation.Builder
Overrides

clearAggregateReservation()

public Reservation.Builder clearAggregateReservation()

Reservation for aggregated resources, providing shape flexibility.

optional .google.cloud.compute.v1.AllocationAggregateReservation aggregate_reservation = 291567948;

Returns
Type Description
Reservation.Builder

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
Type Description
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
Type Description
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
Type Description
Reservation.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Reservation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
Reservation.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Reservation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Reservation.Builder
Overrides

clearResourcePolicies()

public Reservation.Builder clearResourcePolicies()
Returns
Type Description
Reservation.Builder

clearResourceStatus()

public Reservation.Builder clearResourceStatus()

[Output Only] Status information for Reservation resource.

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

Returns
Type Description
Reservation.Builder

clearSatisfiesPzs()

public Reservation.Builder clearSatisfiesPzs()

[Output Only] Reserved for future use.

optional bool satisfies_pzs = 480964267;

Returns
Type Description
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
Type Description
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
Type Description
Reservation.Builder

clearSpecificReservation()

public Reservation.Builder clearSpecificReservation()

Reservation for instances with specific machine shapes.

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

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
Reservation.Builder

This builder for chaining.

clone()

public Reservation.Builder clone()
Returns
Type Description
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
Name Description
key String
Returns
Type Description
boolean

getAggregateReservation()

public AllocationAggregateReservation getAggregateReservation()

Reservation for aggregated resources, providing shape flexibility.

optional .google.cloud.compute.v1.AllocationAggregateReservation aggregate_reservation = 291567948;

Returns
Type Description
AllocationAggregateReservation

The aggregateReservation.

getAggregateReservationBuilder()

public AllocationAggregateReservation.Builder getAggregateReservationBuilder()

Reservation for aggregated resources, providing shape flexibility.

optional .google.cloud.compute.v1.AllocationAggregateReservation aggregate_reservation = 291567948;

Returns
Type Description
AllocationAggregateReservation.Builder

getAggregateReservationOrBuilder()

public AllocationAggregateReservationOrBuilder getAggregateReservationOrBuilder()

Reservation for aggregated resources, providing shape flexibility.

optional .google.cloud.compute.v1.AllocationAggregateReservation aggregate_reservation = 291567948;

Returns
Type Description
AllocationAggregateReservationOrBuilder

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.

getDefaultInstanceForType()

public Reservation getDefaultInstanceForType()
Returns
Type Description
Reservation

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.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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
Type Description
long

The id.

getKind()

public String 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
Type Description
ByteString

The bytes for kind.

getMutableResourcePolicies() (deprecated)

public Map<String,String> getMutableResourcePolicies()

Use alternate mutation accessors instead.

Returns
Type Description
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
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
Type Description
ByteString

The bytes for name.

getResourcePolicies() (deprecated)

public Map<String,String> getResourcePolicies()
Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
key String
defaultValue String
Returns
Type Description
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
Name Description
key String
Returns
Type Description
String

getResourceStatus()

public AllocationResourceStatus getResourceStatus()

[Output Only] Status information for Reservation resource.

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

Returns
Type Description
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
Type Description
AllocationResourceStatus.Builder

getResourceStatusOrBuilder()

public AllocationResourceStatusOrBuilder getResourceStatusOrBuilder()

[Output Only] Status information for Reservation resource.

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

Returns
Type Description
AllocationResourceStatusOrBuilder

getSatisfiesPzs()

public boolean getSatisfiesPzs()

[Output Only] Reserved for future use.

optional bool satisfies_pzs = 480964267;

Returns
Type Description
boolean

The satisfiesPzs.

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
Type Description
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
Type Description
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
Type Description
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
Type Description
ShareSettingsOrBuilder

getSpecificReservation()

public AllocationSpecificSKUReservation getSpecificReservation()

Reservation for instances with specific machine shapes.

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

Returns
Type Description
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
Type Description
AllocationSpecificSKUReservation.Builder

getSpecificReservationOrBuilder()

public AllocationSpecificSKUReservationOrBuilder getSpecificReservationOrBuilder()

Reservation for instances with specific machine shapes.

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

Returns
Type Description
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
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
Type Description
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
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
Type Description
ByteString

The bytes for zone.

hasAggregateReservation()

public boolean hasAggregateReservation()

Reservation for aggregated resources, providing shape flexibility.

optional .google.cloud.compute.v1.AllocationAggregateReservation aggregate_reservation = 291567948;

Returns
Type Description
boolean

Whether the aggregateReservation field is set.

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()

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#reservations for reservations.

optional string kind = 3292052;

Returns
Type Description
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
Type Description
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
Type Description
boolean

Whether the resourceStatus 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.

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.

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
Type Description
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
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()

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
Type Description
boolean

Whether the zone field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAggregateReservation(AllocationAggregateReservation value)

public Reservation.Builder mergeAggregateReservation(AllocationAggregateReservation value)

Reservation for aggregated resources, providing shape flexibility.

optional .google.cloud.compute.v1.AllocationAggregateReservation aggregate_reservation = 291567948;

Parameter
Name Description
value AllocationAggregateReservation
Returns
Type Description
Reservation.Builder

mergeFrom(Reservation other)

public Reservation.Builder mergeFrom(Reservation other)
Parameter
Name Description
other Reservation
Returns
Type Description
Reservation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Reservation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Reservation.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Reservation.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
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
Name Description
value AllocationResourceStatus
Returns
Type Description
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
Name Description
value ShareSettings
Returns
Type Description
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
Name Description
value AllocationSpecificSKUReservation
Returns
Type Description
Reservation.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Reservation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
values Map<String,String>
Returns
Type Description
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
Name Description
key String
value String
Returns
Type Description
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
Name Description
key String
Returns
Type Description
Reservation.Builder

setAggregateReservation(AllocationAggregateReservation value)

public Reservation.Builder setAggregateReservation(AllocationAggregateReservation value)

Reservation for aggregated resources, providing shape flexibility.

optional .google.cloud.compute.v1.AllocationAggregateReservation aggregate_reservation = 291567948;

Parameter
Name Description
value AllocationAggregateReservation
Returns
Type Description
Reservation.Builder

setAggregateReservation(AllocationAggregateReservation.Builder builderForValue)

public Reservation.Builder setAggregateReservation(AllocationAggregateReservation.Builder builderForValue)

Reservation for aggregated resources, providing shape flexibility.

optional .google.cloud.compute.v1.AllocationAggregateReservation aggregate_reservation = 291567948;

Parameter
Name Description
builderForValue AllocationAggregateReservation.Builder
Returns
Type Description
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
Name Description
value String

The commitment to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for commitment to set.

Returns
Type Description
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
Name Description
value String

The creationTimestamp to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for creationTimestamp to set.

Returns
Type Description
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
Name Description
value String

The description to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Reservation.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Reservation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
value long

The id to set.

Returns
Type Description
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
Name Description
value String

The kind to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for kind to set.

Returns
Type Description
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
Name Description
value String

The name to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
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
Name Description
value AllocationResourceStatus
Returns
Type Description
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
Name Description
builderForValue AllocationResourceStatus.Builder
Returns
Type Description
Reservation.Builder

setSatisfiesPzs(boolean value)

public Reservation.Builder setSatisfiesPzs(boolean value)

[Output Only] Reserved for future use.

optional bool satisfies_pzs = 480964267;

Parameter
Name Description
value boolean

The satisfiesPzs to set.

Returns
Type Description
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
Name Description
value String

The selfLink to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for selfLink to set.

Returns
Type Description
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
Name Description
value ShareSettings
Returns
Type Description
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
Name Description
builderForValue ShareSettings.Builder
Returns
Type Description
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
Name Description
value AllocationSpecificSKUReservation
Returns
Type Description
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
Name Description
builderForValue AllocationSpecificSKUReservation.Builder
Returns
Type Description
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
Name Description
value boolean

The specificReservationRequired to set.

Returns
Type Description
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
Name Description
value String

The status to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for status to set.

Returns
Type Description
Reservation.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Reservation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
value String

The zone to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for zone to set.

Returns
Type Description
Reservation.Builder

This builder for chaining.