Package com.google.cloud.compute.v1
Class ReservationAffinity.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<ReservationAffinity.Builder>
-
- com.google.cloud.compute.v1.ReservationAffinity.Builder
-
- All Implemented Interfaces:
ReservationAffinityOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- ReservationAffinity
public static final class ReservationAffinity.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<ReservationAffinity.Builder> implements ReservationAffinityOrBuilder
Specifies the reservations that this instance can consume from.
Protobuf typegoogle.cloud.compute.v1.ReservationAffinity
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ReservationAffinity.Builder
addAllValues(Iterable<String> values)
Corresponds to the label values of a reservation resource.ReservationAffinity.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
ReservationAffinity.Builder
addValues(String value)
Corresponds to the label values of a reservation resource.ReservationAffinity.Builder
addValuesBytes(com.google.protobuf.ByteString value)
Corresponds to the label values of a reservation resource.ReservationAffinity
build()
ReservationAffinity
buildPartial()
ReservationAffinity.Builder
clear()
ReservationAffinity.Builder
clearConsumeReservationType()
Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION.ReservationAffinity.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
ReservationAffinity.Builder
clearKey()
Corresponds to the label key of a reservation resource.ReservationAffinity.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
ReservationAffinity.Builder
clearValues()
Corresponds to the label values of a reservation resource.ReservationAffinity.Builder
clone()
String
getConsumeReservationType()
Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION.com.google.protobuf.ByteString
getConsumeReservationTypeBytes()
Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION.ReservationAffinity
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
String
getKey()
Corresponds to the label key of a reservation resource.com.google.protobuf.ByteString
getKeyBytes()
Corresponds to the label key of a reservation resource.String
getValues(int index)
Corresponds to the label values of a reservation resource.com.google.protobuf.ByteString
getValuesBytes(int index)
Corresponds to the label values of a reservation resource.int
getValuesCount()
Corresponds to the label values of a reservation resource.com.google.protobuf.ProtocolStringList
getValuesList()
Corresponds to the label values of a reservation resource.boolean
hasConsumeReservationType()
Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION.boolean
hasKey()
Corresponds to the label key of a reservation resource.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
ReservationAffinity.Builder
mergeFrom(ReservationAffinity other)
ReservationAffinity.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
ReservationAffinity.Builder
mergeFrom(com.google.protobuf.Message other)
ReservationAffinity.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
ReservationAffinity.Builder
setConsumeReservationType(String value)
Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION.ReservationAffinity.Builder
setConsumeReservationTypeBytes(com.google.protobuf.ByteString value)
Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION.ReservationAffinity.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
ReservationAffinity.Builder
setKey(String value)
Corresponds to the label key of a reservation resource.ReservationAffinity.Builder
setKeyBytes(com.google.protobuf.ByteString value)
Corresponds to the label key of a reservation resource.ReservationAffinity.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
ReservationAffinity.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
ReservationAffinity.Builder
setValues(int index, String value)
Corresponds to the label values of a reservation resource.-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<ReservationAffinity.Builder>
-
clear
public ReservationAffinity.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<ReservationAffinity.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<ReservationAffinity.Builder>
-
getDefaultInstanceForType
public ReservationAffinity getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public ReservationAffinity build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public ReservationAffinity buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public ReservationAffinity.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<ReservationAffinity.Builder>
-
setField
public ReservationAffinity.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ReservationAffinity.Builder>
-
clearField
public ReservationAffinity.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ReservationAffinity.Builder>
-
clearOneof
public ReservationAffinity.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<ReservationAffinity.Builder>
-
setRepeatedField
public ReservationAffinity.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ReservationAffinity.Builder>
-
addRepeatedField
public ReservationAffinity.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ReservationAffinity.Builder>
-
mergeFrom
public ReservationAffinity.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<ReservationAffinity.Builder>
-
mergeFrom
public ReservationAffinity.Builder mergeFrom(ReservationAffinity other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<ReservationAffinity.Builder>
-
mergeFrom
public ReservationAffinity.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<ReservationAffinity.Builder>
- Throws:
IOException
-
hasConsumeReservationType
public 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;
- Specified by:
hasConsumeReservationType
in interfaceReservationAffinityOrBuilder
- Returns:
- Whether the consumeReservationType field is set.
-
getConsumeReservationType
public 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;
- Specified by:
getConsumeReservationType
in interfaceReservationAffinityOrBuilder
- Returns:
- The consumeReservationType.
-
getConsumeReservationTypeBytes
public com.google.protobuf.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;
- Specified by:
getConsumeReservationTypeBytes
in interfaceReservationAffinityOrBuilder
- Returns:
- The bytes for consumeReservationType.
-
setConsumeReservationType
public ReservationAffinity.Builder setConsumeReservationType(String value)
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;
- Parameters:
value
- The consumeReservationType to set.- Returns:
- This builder for chaining.
-
clearConsumeReservationType
public ReservationAffinity.Builder clearConsumeReservationType()
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:
- This builder for chaining.
-
setConsumeReservationTypeBytes
public ReservationAffinity.Builder setConsumeReservationTypeBytes(com.google.protobuf.ByteString value)
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;
- Parameters:
value
- The bytes for consumeReservationType to set.- Returns:
- This builder for chaining.
-
hasKey
public 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;
- Specified by:
hasKey
in interfaceReservationAffinityOrBuilder
- Returns:
- Whether the key field is set.
-
getKey
public 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;
- Specified by:
getKey
in interfaceReservationAffinityOrBuilder
- Returns:
- The key.
-
getKeyBytes
public com.google.protobuf.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;
- Specified by:
getKeyBytes
in interfaceReservationAffinityOrBuilder
- Returns:
- The bytes for key.
-
setKey
public ReservationAffinity.Builder setKey(String value)
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;
- Parameters:
value
- The key to set.- Returns:
- This builder for chaining.
-
clearKey
public ReservationAffinity.Builder clearKey()
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:
- This builder for chaining.
-
setKeyBytes
public ReservationAffinity.Builder setKeyBytes(com.google.protobuf.ByteString value)
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;
- Parameters:
value
- The bytes for key to set.- Returns:
- This builder for chaining.
-
getValuesList
public com.google.protobuf.ProtocolStringList 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;
- Specified by:
getValuesList
in interfaceReservationAffinityOrBuilder
- Returns:
- A list containing the values.
-
getValuesCount
public 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;
- Specified by:
getValuesCount
in interfaceReservationAffinityOrBuilder
- Returns:
- The count of values.
-
getValues
public 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;
- Specified by:
getValues
in interfaceReservationAffinityOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The values at the given index.
-
getValuesBytes
public com.google.protobuf.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;
- Specified by:
getValuesBytes
in interfaceReservationAffinityOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the values at the given index.
-
setValues
public ReservationAffinity.Builder setValues(int index, String value)
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;
- Parameters:
index
- The index to set the value at.value
- The values to set.- Returns:
- This builder for chaining.
-
addValues
public ReservationAffinity.Builder addValues(String value)
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;
- Parameters:
value
- The values to add.- Returns:
- This builder for chaining.
-
addAllValues
public ReservationAffinity.Builder addAllValues(Iterable<String> values)
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;
- Parameters:
values
- The values to add.- Returns:
- This builder for chaining.
-
clearValues
public ReservationAffinity.Builder clearValues()
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:
- This builder for chaining.
-
addValuesBytes
public ReservationAffinity.Builder addValuesBytes(com.google.protobuf.ByteString value)
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;
- Parameters:
value
- The bytes of the values to add.- Returns:
- This builder for chaining.
-
setUnknownFields
public final ReservationAffinity.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<ReservationAffinity.Builder>
-
mergeUnknownFields
public final ReservationAffinity.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<ReservationAffinity.Builder>
-
-