Interface ReservationAffinityOrBuilder (1.16.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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

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

Whether the key field is set.