Class CustomerConstraints.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CustomerConstraints.Builder>
com.google.cloud.channel.v1.CustomerConstraints.Builder
All Implemented Interfaces:
CustomerConstraintsOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
CustomerConstraints

public static final class CustomerConstraints.Builder extends com.google.protobuf.GeneratedMessage.Builder<CustomerConstraints.Builder> implements CustomerConstraintsOrBuilder
 Represents constraints required to purchase the Offer for a customer.
 
Protobuf type google.cloud.channel.v1.CustomerConstraints
  • 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<CustomerConstraints.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<CustomerConstraints.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<CustomerConstraints.Builder>
    • getDefaultInstanceForType

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

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

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

      public CustomerConstraints.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<CustomerConstraints.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<CustomerConstraints.Builder>
    • mergeFrom

      public CustomerConstraints.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<CustomerConstraints.Builder>
      Throws:
      IOException
    • getAllowedRegionsList

      public com.google.protobuf.ProtocolStringList getAllowedRegionsList()
       Allowed geographical regions of the customer.
       
      repeated string allowed_regions = 1;
      Specified by:
      getAllowedRegionsList in interface CustomerConstraintsOrBuilder
      Returns:
      A list containing the allowedRegions.
    • getAllowedRegionsCount

      public int getAllowedRegionsCount()
       Allowed geographical regions of the customer.
       
      repeated string allowed_regions = 1;
      Specified by:
      getAllowedRegionsCount in interface CustomerConstraintsOrBuilder
      Returns:
      The count of allowedRegions.
    • getAllowedRegions

      public String getAllowedRegions(int index)
       Allowed geographical regions of the customer.
       
      repeated string allowed_regions = 1;
      Specified by:
      getAllowedRegions in interface CustomerConstraintsOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The allowedRegions at the given index.
    • getAllowedRegionsBytes

      public com.google.protobuf.ByteString getAllowedRegionsBytes(int index)
       Allowed geographical regions of the customer.
       
      repeated string allowed_regions = 1;
      Specified by:
      getAllowedRegionsBytes in interface CustomerConstraintsOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the allowedRegions at the given index.
    • setAllowedRegions

      public CustomerConstraints.Builder setAllowedRegions(int index, String value)
       Allowed geographical regions of the customer.
       
      repeated string allowed_regions = 1;
      Parameters:
      index - The index to set the value at.
      value - The allowedRegions to set.
      Returns:
      This builder for chaining.
    • addAllowedRegions

      public CustomerConstraints.Builder addAllowedRegions(String value)
       Allowed geographical regions of the customer.
       
      repeated string allowed_regions = 1;
      Parameters:
      value - The allowedRegions to add.
      Returns:
      This builder for chaining.
    • addAllAllowedRegions

      public CustomerConstraints.Builder addAllAllowedRegions(Iterable<String> values)
       Allowed geographical regions of the customer.
       
      repeated string allowed_regions = 1;
      Parameters:
      values - The allowedRegions to add.
      Returns:
      This builder for chaining.
    • clearAllowedRegions

      public CustomerConstraints.Builder clearAllowedRegions()
       Allowed geographical regions of the customer.
       
      repeated string allowed_regions = 1;
      Returns:
      This builder for chaining.
    • addAllowedRegionsBytes

      public CustomerConstraints.Builder addAllowedRegionsBytes(com.google.protobuf.ByteString value)
       Allowed geographical regions of the customer.
       
      repeated string allowed_regions = 1;
      Parameters:
      value - The bytes of the allowedRegions to add.
      Returns:
      This builder for chaining.
    • getAllowedCustomerTypesList

      public List<CloudIdentityInfo.CustomerType> getAllowedCustomerTypesList()
       Allowed Customer Type.
       
      repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;
      Specified by:
      getAllowedCustomerTypesList in interface CustomerConstraintsOrBuilder
      Returns:
      A list containing the allowedCustomerTypes.
    • getAllowedCustomerTypesCount

      public int getAllowedCustomerTypesCount()
       Allowed Customer Type.
       
      repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;
      Specified by:
      getAllowedCustomerTypesCount in interface CustomerConstraintsOrBuilder
      Returns:
      The count of allowedCustomerTypes.
    • getAllowedCustomerTypes

      public CloudIdentityInfo.CustomerType getAllowedCustomerTypes(int index)
       Allowed Customer Type.
       
      repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;
      Specified by:
      getAllowedCustomerTypes in interface CustomerConstraintsOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The allowedCustomerTypes at the given index.
    • setAllowedCustomerTypes

      public CustomerConstraints.Builder setAllowedCustomerTypes(int index, CloudIdentityInfo.CustomerType value)
       Allowed Customer Type.
       
      repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;
      Parameters:
      index - The index to set the value at.
      value - The allowedCustomerTypes to set.
      Returns:
      This builder for chaining.
    • addAllowedCustomerTypes

      public CustomerConstraints.Builder addAllowedCustomerTypes(CloudIdentityInfo.CustomerType value)
       Allowed Customer Type.
       
      repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;
      Parameters:
      value - The allowedCustomerTypes to add.
      Returns:
      This builder for chaining.
    • addAllAllowedCustomerTypes

      public CustomerConstraints.Builder addAllAllowedCustomerTypes(Iterable<? extends CloudIdentityInfo.CustomerType> values)
       Allowed Customer Type.
       
      repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;
      Parameters:
      values - The allowedCustomerTypes to add.
      Returns:
      This builder for chaining.
    • clearAllowedCustomerTypes

      public CustomerConstraints.Builder clearAllowedCustomerTypes()
       Allowed Customer Type.
       
      repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;
      Returns:
      This builder for chaining.
    • getAllowedCustomerTypesValueList

      public List<Integer> getAllowedCustomerTypesValueList()
       Allowed Customer Type.
       
      repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;
      Specified by:
      getAllowedCustomerTypesValueList in interface CustomerConstraintsOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for allowedCustomerTypes.
    • getAllowedCustomerTypesValue

      public int getAllowedCustomerTypesValue(int index)
       Allowed Customer Type.
       
      repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;
      Specified by:
      getAllowedCustomerTypesValue in interface CustomerConstraintsOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of allowedCustomerTypes at the given index.
    • setAllowedCustomerTypesValue

      public CustomerConstraints.Builder setAllowedCustomerTypesValue(int index, int value)
       Allowed Customer Type.
       
      repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;
      Parameters:
      index - The index to set the value at.
      value - The enum numeric value on the wire for allowedCustomerTypes to set.
      Returns:
      This builder for chaining.
    • addAllowedCustomerTypesValue

      public CustomerConstraints.Builder addAllowedCustomerTypesValue(int value)
       Allowed Customer Type.
       
      repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;
      Parameters:
      value - The enum numeric value on the wire for allowedCustomerTypes to add.
      Returns:
      This builder for chaining.
    • addAllAllowedCustomerTypesValue

      public CustomerConstraints.Builder addAllAllowedCustomerTypesValue(Iterable<Integer> values)
       Allowed Customer Type.
       
      repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;
      Parameters:
      values - The enum numeric values on the wire for allowedCustomerTypes to add.
      Returns:
      This builder for chaining.
    • getPromotionalOrderTypesList

      public List<PromotionalOrderType> getPromotionalOrderTypesList()
       Allowed Promotional Order Type. Present for Promotional offers.
       
      repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;
      Specified by:
      getPromotionalOrderTypesList in interface CustomerConstraintsOrBuilder
      Returns:
      A list containing the promotionalOrderTypes.
    • getPromotionalOrderTypesCount

      public int getPromotionalOrderTypesCount()
       Allowed Promotional Order Type. Present for Promotional offers.
       
      repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;
      Specified by:
      getPromotionalOrderTypesCount in interface CustomerConstraintsOrBuilder
      Returns:
      The count of promotionalOrderTypes.
    • getPromotionalOrderTypes

      public PromotionalOrderType getPromotionalOrderTypes(int index)
       Allowed Promotional Order Type. Present for Promotional offers.
       
      repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;
      Specified by:
      getPromotionalOrderTypes in interface CustomerConstraintsOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The promotionalOrderTypes at the given index.
    • setPromotionalOrderTypes

      public CustomerConstraints.Builder setPromotionalOrderTypes(int index, PromotionalOrderType value)
       Allowed Promotional Order Type. Present for Promotional offers.
       
      repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;
      Parameters:
      index - The index to set the value at.
      value - The promotionalOrderTypes to set.
      Returns:
      This builder for chaining.
    • addPromotionalOrderTypes

      public CustomerConstraints.Builder addPromotionalOrderTypes(PromotionalOrderType value)
       Allowed Promotional Order Type. Present for Promotional offers.
       
      repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;
      Parameters:
      value - The promotionalOrderTypes to add.
      Returns:
      This builder for chaining.
    • addAllPromotionalOrderTypes

      public CustomerConstraints.Builder addAllPromotionalOrderTypes(Iterable<? extends PromotionalOrderType> values)
       Allowed Promotional Order Type. Present for Promotional offers.
       
      repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;
      Parameters:
      values - The promotionalOrderTypes to add.
      Returns:
      This builder for chaining.
    • clearPromotionalOrderTypes

      public CustomerConstraints.Builder clearPromotionalOrderTypes()
       Allowed Promotional Order Type. Present for Promotional offers.
       
      repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;
      Returns:
      This builder for chaining.
    • getPromotionalOrderTypesValueList

      public List<Integer> getPromotionalOrderTypesValueList()
       Allowed Promotional Order Type. Present for Promotional offers.
       
      repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;
      Specified by:
      getPromotionalOrderTypesValueList in interface CustomerConstraintsOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for promotionalOrderTypes.
    • getPromotionalOrderTypesValue

      public int getPromotionalOrderTypesValue(int index)
       Allowed Promotional Order Type. Present for Promotional offers.
       
      repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;
      Specified by:
      getPromotionalOrderTypesValue in interface CustomerConstraintsOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of promotionalOrderTypes at the given index.
    • setPromotionalOrderTypesValue

      public CustomerConstraints.Builder setPromotionalOrderTypesValue(int index, int value)
       Allowed Promotional Order Type. Present for Promotional offers.
       
      repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;
      Parameters:
      index - The index to set the value at.
      value - The enum numeric value on the wire for promotionalOrderTypes to set.
      Returns:
      This builder for chaining.
    • addPromotionalOrderTypesValue

      public CustomerConstraints.Builder addPromotionalOrderTypesValue(int value)
       Allowed Promotional Order Type. Present for Promotional offers.
       
      repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;
      Parameters:
      value - The enum numeric value on the wire for promotionalOrderTypes to add.
      Returns:
      This builder for chaining.
    • addAllPromotionalOrderTypesValue

      public CustomerConstraints.Builder addAllPromotionalOrderTypesValue(Iterable<Integer> values)
       Allowed Promotional Order Type. Present for Promotional offers.
       
      repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;
      Parameters:
      values - The enum numeric values on the wire for promotionalOrderTypes to add.
      Returns:
      This builder for chaining.