Class ReservationAffinity.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ReservationAffinity.Builder>
com.google.cloud.aiplatform.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.GeneratedMessage.Builder<ReservationAffinity.Builder> implements ReservationAffinityOrBuilder
 A ReservationAffinity can be used to configure a Vertex AI resource (e.g., a
 DeployedModel) to draw its Compute Engine resources from a Shared
 Reservation, or exclusively from on-demand capacity.
 
Protobuf type google.cloud.aiplatform.v1.ReservationAffinity
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ReservationAffinity.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<ReservationAffinity.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<ReservationAffinity.Builder>
    • getDefaultInstanceForType

      public ReservationAffinity getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public ReservationAffinity build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public ReservationAffinity buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public ReservationAffinity.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ReservationAffinity.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<ReservationAffinity.Builder>
    • mergeFrom

      public ReservationAffinity.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ReservationAffinity.Builder>
      Throws:
      IOException
    • getReservationAffinityTypeValue

      public int getReservationAffinityTypeValue()
       Required. Specifies the reservation affinity type.
       
      .google.cloud.aiplatform.v1.ReservationAffinity.Type reservation_affinity_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getReservationAffinityTypeValue in interface ReservationAffinityOrBuilder
      Returns:
      The enum numeric value on the wire for reservationAffinityType.
    • setReservationAffinityTypeValue

      public ReservationAffinity.Builder setReservationAffinityTypeValue(int value)
       Required. Specifies the reservation affinity type.
       
      .google.cloud.aiplatform.v1.ReservationAffinity.Type reservation_affinity_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for reservationAffinityType to set.
      Returns:
      This builder for chaining.
    • getReservationAffinityType

      public ReservationAffinity.Type getReservationAffinityType()
       Required. Specifies the reservation affinity type.
       
      .google.cloud.aiplatform.v1.ReservationAffinity.Type reservation_affinity_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getReservationAffinityType in interface ReservationAffinityOrBuilder
      Returns:
      The reservationAffinityType.
    • setReservationAffinityType

      public ReservationAffinity.Builder setReservationAffinityType(ReservationAffinity.Type value)
       Required. Specifies the reservation affinity type.
       
      .google.cloud.aiplatform.v1.ReservationAffinity.Type reservation_affinity_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The reservationAffinityType to set.
      Returns:
      This builder for chaining.
    • clearReservationAffinityType

      public ReservationAffinity.Builder clearReservationAffinityType()
       Required. Specifies the reservation affinity type.
       
      .google.cloud.aiplatform.v1.ReservationAffinity.Type reservation_affinity_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • getKey

      public String getKey()
       Optional. Corresponds to the label key of a reservation resource. To target
       a SPECIFIC_RESERVATION by name, use
       `compute.googleapis.com/reservation-name` as the key and specify the name
       of your reservation as its value.
       
      string key = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getKey in interface ReservationAffinityOrBuilder
      Returns:
      The key.
    • getKeyBytes

      public com.google.protobuf.ByteString getKeyBytes()
       Optional. Corresponds to the label key of a reservation resource. To target
       a SPECIFIC_RESERVATION by name, use
       `compute.googleapis.com/reservation-name` as the key and specify the name
       of your reservation as its value.
       
      string key = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getKeyBytes in interface ReservationAffinityOrBuilder
      Returns:
      The bytes for key.
    • setKey

      public ReservationAffinity.Builder setKey(String value)
       Optional. Corresponds to the label key of a reservation resource. To target
       a SPECIFIC_RESERVATION by name, use
       `compute.googleapis.com/reservation-name` as the key and specify the name
       of your reservation as its value.
       
      string key = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The key to set.
      Returns:
      This builder for chaining.
    • clearKey

      public ReservationAffinity.Builder clearKey()
       Optional. Corresponds to the label key of a reservation resource. To target
       a SPECIFIC_RESERVATION by name, use
       `compute.googleapis.com/reservation-name` as the key and specify the name
       of your reservation as its value.
       
      string key = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setKeyBytes

      public ReservationAffinity.Builder setKeyBytes(com.google.protobuf.ByteString value)
       Optional. Corresponds to the label key of a reservation resource. To target
       a SPECIFIC_RESERVATION by name, use
       `compute.googleapis.com/reservation-name` as the key and specify the name
       of your reservation as its value.
       
      string key = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for key to set.
      Returns:
      This builder for chaining.
    • getValuesList

      public com.google.protobuf.ProtocolStringList getValuesList()
       Optional. Corresponds to the label values of a reservation resource. This
       must be the full resource name of the reservation.
       
      repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getValuesList in interface ReservationAffinityOrBuilder
      Returns:
      A list containing the values.
    • getValuesCount

      public int getValuesCount()
       Optional. Corresponds to the label values of a reservation resource. This
       must be the full resource name of the reservation.
       
      repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getValuesCount in interface ReservationAffinityOrBuilder
      Returns:
      The count of values.
    • getValues

      public String getValues(int index)
       Optional. Corresponds to the label values of a reservation resource. This
       must be the full resource name of the reservation.
       
      repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getValues in interface ReservationAffinityOrBuilder
      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)
       Optional. Corresponds to the label values of a reservation resource. This
       must be the full resource name of the reservation.
       
      repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getValuesBytes in interface ReservationAffinityOrBuilder
      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)
       Optional. Corresponds to the label values of a reservation resource. This
       must be the full resource name of the reservation.
       
      repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      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)
       Optional. Corresponds to the label values of a reservation resource. This
       must be the full resource name of the reservation.
       
      repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The values to add.
      Returns:
      This builder for chaining.
    • addAllValues

      public ReservationAffinity.Builder addAllValues(Iterable<String> values)
       Optional. Corresponds to the label values of a reservation resource. This
       must be the full resource name of the reservation.
       
      repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      values - The values to add.
      Returns:
      This builder for chaining.
    • clearValues

      public ReservationAffinity.Builder clearValues()
       Optional. Corresponds to the label values of a reservation resource. This
       must be the full resource name of the reservation.
       
      repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • addValuesBytes

      public ReservationAffinity.Builder addValuesBytes(com.google.protobuf.ByteString value)
       Optional. Corresponds to the label values of a reservation resource. This
       must be the full resource name of the reservation.
       
      repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes of the values to add.
      Returns:
      This builder for chaining.