Interface ReservationAffinityOrBuilder (1.52.0)

public interface ReservationAffinityOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getConsumeReservationType()

public abstract String getConsumeReservationType()

Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples. Check the ConsumeReservationType enum for the list of possible values.

optional string consume_reservation_type = 300736944;

Returns
Type Description
String

The consumeReservationType.

getConsumeReservationTypeBytes()

public abstract ByteString getConsumeReservationTypeBytes()

Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples. Check the ConsumeReservationType enum for the list of possible values.

optional string consume_reservation_type = 300736944;

Returns
Type Description
ByteString

The bytes for consumeReservationType.

getKey()

public abstract String getKey()

Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.

optional string key = 106079;

Returns
Type Description
String

The key.

getKeyBytes()

public abstract ByteString getKeyBytes()

Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.

optional string key = 106079;

Returns
Type Description
ByteString

The bytes for key.

getValues(int index)

public abstract String getValues(int index)

Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.

repeated string values = 249928994;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The values at the given index.

getValuesBytes(int index)

public abstract ByteString getValuesBytes(int index)

Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.

repeated string values = 249928994;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the values at the given index.

getValuesCount()

public abstract int getValuesCount()

Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.

repeated string values = 249928994;

Returns
Type Description
int

The count of values.

getValuesList()

public abstract List<String> getValuesList()

Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.

repeated string values = 249928994;

Returns
Type Description
List<String>

A list containing the values.

hasConsumeReservationType()

public abstract boolean hasConsumeReservationType()

Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples. Check the ConsumeReservationType enum for the list of possible values.

optional string consume_reservation_type = 300736944;

Returns
Type Description
boolean

Whether the consumeReservationType field is set.

hasKey()

public abstract boolean hasKey()

Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.

optional string key = 106079;

Returns
Type Description
boolean

Whether the key field is set.