Class CustomerConstraints.Builder (3.19.0)

public static final class CustomerConstraints.Builder extends GeneratedMessageV3.Builder<CustomerConstraints.Builder> implements CustomerConstraintsOrBuilder

Represents constraints required to purchase the Offer for a customer.

Protobuf type google.cloud.channel.v1.CustomerConstraints

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllAllowedCustomerTypes(Iterable<? extends CloudIdentityInfo.CustomerType> values)

public CustomerConstraints.Builder addAllAllowedCustomerTypes(Iterable<? extends CloudIdentityInfo.CustomerType> values)

Allowed Customer Type.

repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType>

The allowedCustomerTypes to add.

Returns
TypeDescription
CustomerConstraints.Builder

This builder for chaining.

addAllAllowedCustomerTypesValue(Iterable<Integer> values)

public CustomerConstraints.Builder addAllAllowedCustomerTypesValue(Iterable<Integer> values)

Allowed Customer Type.

repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;

Parameter
NameDescription
valuesIterable<Integer>

The enum numeric values on the wire for allowedCustomerTypes to add.

Returns
TypeDescription
CustomerConstraints.Builder

This builder for chaining.

addAllAllowedRegions(Iterable<String> values)

public CustomerConstraints.Builder addAllAllowedRegions(Iterable<String> values)

Allowed geographical regions of the customer.

repeated string allowed_regions = 1;

Parameter
NameDescription
valuesIterable<String>

The allowedRegions to add.

Returns
TypeDescription
CustomerConstraints.Builder

This builder for chaining.

addAllPromotionalOrderTypes(Iterable<? extends PromotionalOrderType> values)

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;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.channel.v1.PromotionalOrderType>

The promotionalOrderTypes to add.

Returns
TypeDescription
CustomerConstraints.Builder

This builder for chaining.

addAllPromotionalOrderTypesValue(Iterable<Integer> values)

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;

Parameter
NameDescription
valuesIterable<Integer>

The enum numeric values on the wire for promotionalOrderTypes to add.

Returns
TypeDescription
CustomerConstraints.Builder

This builder for chaining.

addAllowedCustomerTypes(CloudIdentityInfo.CustomerType value)

public CustomerConstraints.Builder addAllowedCustomerTypes(CloudIdentityInfo.CustomerType value)

Allowed Customer Type.

repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;

Parameter
NameDescription
valueCloudIdentityInfo.CustomerType

The allowedCustomerTypes to add.

Returns
TypeDescription
CustomerConstraints.Builder

This builder for chaining.

addAllowedCustomerTypesValue(int value)

public CustomerConstraints.Builder addAllowedCustomerTypesValue(int value)

Allowed Customer Type.

repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;

Parameter
NameDescription
valueint

The enum numeric value on the wire for allowedCustomerTypes to add.

Returns
TypeDescription
CustomerConstraints.Builder

This builder for chaining.

addAllowedRegions(String value)

public CustomerConstraints.Builder addAllowedRegions(String value)

Allowed geographical regions of the customer.

repeated string allowed_regions = 1;

Parameter
NameDescription
valueString

The allowedRegions to add.

Returns
TypeDescription
CustomerConstraints.Builder

This builder for chaining.

addAllowedRegionsBytes(ByteString value)

public CustomerConstraints.Builder addAllowedRegionsBytes(ByteString value)

Allowed geographical regions of the customer.

repeated string allowed_regions = 1;

Parameter
NameDescription
valueByteString

The bytes of the allowedRegions to add.

Returns
TypeDescription
CustomerConstraints.Builder

This builder for chaining.

addPromotionalOrderTypes(PromotionalOrderType value)

public CustomerConstraints.Builder addPromotionalOrderTypes(PromotionalOrderType value)

Allowed Promotional Order Type. Present for Promotional offers.

repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;

Parameter
NameDescription
valuePromotionalOrderType

The promotionalOrderTypes to add.

Returns
TypeDescription
CustomerConstraints.Builder

This builder for chaining.

addPromotionalOrderTypesValue(int value)

public CustomerConstraints.Builder addPromotionalOrderTypesValue(int value)

Allowed Promotional Order Type. Present for Promotional offers.

repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;

Parameter
NameDescription
valueint

The enum numeric value on the wire for promotionalOrderTypes to add.

Returns
TypeDescription
CustomerConstraints.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CustomerConstraints.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
CustomerConstraints.Builder
Overrides

build()

public CustomerConstraints build()
Returns
TypeDescription
CustomerConstraints

buildPartial()

public CustomerConstraints buildPartial()
Returns
TypeDescription
CustomerConstraints

clear()

public CustomerConstraints.Builder clear()
Returns
TypeDescription
CustomerConstraints.Builder
Overrides

clearAllowedCustomerTypes()

public CustomerConstraints.Builder clearAllowedCustomerTypes()

Allowed Customer Type.

repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;

Returns
TypeDescription
CustomerConstraints.Builder

This builder for chaining.

clearAllowedRegions()

public CustomerConstraints.Builder clearAllowedRegions()

Allowed geographical regions of the customer.

repeated string allowed_regions = 1;

Returns
TypeDescription
CustomerConstraints.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public CustomerConstraints.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
CustomerConstraints.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public CustomerConstraints.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
CustomerConstraints.Builder
Overrides

clearPromotionalOrderTypes()

public CustomerConstraints.Builder clearPromotionalOrderTypes()

Allowed Promotional Order Type. Present for Promotional offers.

repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;

Returns
TypeDescription
CustomerConstraints.Builder

This builder for chaining.

clone()

public CustomerConstraints.Builder clone()
Returns
TypeDescription
CustomerConstraints.Builder
Overrides

getAllowedCustomerTypes(int index)

public CloudIdentityInfo.CustomerType getAllowedCustomerTypes(int index)

Allowed Customer Type.

repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
CloudIdentityInfo.CustomerType

The allowedCustomerTypes at the given index.

getAllowedCustomerTypesCount()

public int getAllowedCustomerTypesCount()

Allowed Customer Type.

repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;

Returns
TypeDescription
int

The count of allowedCustomerTypes.

getAllowedCustomerTypesList()

public List<CloudIdentityInfo.CustomerType> getAllowedCustomerTypesList()

Allowed Customer Type.

repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;

Returns
TypeDescription
List<CustomerType>

A list containing the allowedCustomerTypes.

getAllowedCustomerTypesValue(int index)

public int getAllowedCustomerTypesValue(int index)

Allowed Customer Type.

repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
int

The enum numeric value on the wire of allowedCustomerTypes at the given index.

getAllowedCustomerTypesValueList()

public List<Integer> getAllowedCustomerTypesValueList()

Allowed Customer Type.

repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;

Returns
TypeDescription
List<Integer>

A list containing the enum numeric values on the wire for allowedCustomerTypes.

getAllowedRegions(int index)

public String getAllowedRegions(int index)

Allowed geographical regions of the customer.

repeated string allowed_regions = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The allowedRegions at the given index.

getAllowedRegionsBytes(int index)

public ByteString getAllowedRegionsBytes(int index)

Allowed geographical regions of the customer.

repeated string allowed_regions = 1;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the allowedRegions at the given index.

getAllowedRegionsCount()

public int getAllowedRegionsCount()

Allowed geographical regions of the customer.

repeated string allowed_regions = 1;

Returns
TypeDescription
int

The count of allowedRegions.

getAllowedRegionsList()

public ProtocolStringList getAllowedRegionsList()

Allowed geographical regions of the customer.

repeated string allowed_regions = 1;

Returns
TypeDescription
ProtocolStringList

A list containing the allowedRegions.

getDefaultInstanceForType()

public CustomerConstraints getDefaultInstanceForType()
Returns
TypeDescription
CustomerConstraints

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getPromotionalOrderTypes(int index)

public PromotionalOrderType getPromotionalOrderTypes(int index)

Allowed Promotional Order Type. Present for Promotional offers.

repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
PromotionalOrderType

The promotionalOrderTypes at the given index.

getPromotionalOrderTypesCount()

public int getPromotionalOrderTypesCount()

Allowed Promotional Order Type. Present for Promotional offers.

repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;

Returns
TypeDescription
int

The count of promotionalOrderTypes.

getPromotionalOrderTypesList()

public List<PromotionalOrderType> getPromotionalOrderTypesList()

Allowed Promotional Order Type. Present for Promotional offers.

repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;

Returns
TypeDescription
List<PromotionalOrderType>

A list containing the promotionalOrderTypes.

getPromotionalOrderTypesValue(int index)

public int getPromotionalOrderTypesValue(int index)

Allowed Promotional Order Type. Present for Promotional offers.

repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
int

The enum numeric value on the wire of promotionalOrderTypes at the given index.

getPromotionalOrderTypesValueList()

public List<Integer> getPromotionalOrderTypesValueList()

Allowed Promotional Order Type. Present for Promotional offers.

repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3;

Returns
TypeDescription
List<Integer>

A list containing the enum numeric values on the wire for promotionalOrderTypes.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CustomerConstraints other)

public CustomerConstraints.Builder mergeFrom(CustomerConstraints other)
Parameter
NameDescription
otherCustomerConstraints
Returns
TypeDescription
CustomerConstraints.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CustomerConstraints.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CustomerConstraints.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public CustomerConstraints.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
CustomerConstraints.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CustomerConstraints.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
CustomerConstraints.Builder
Overrides

setAllowedCustomerTypes(int index, CloudIdentityInfo.CustomerType value)

public CustomerConstraints.Builder setAllowedCustomerTypes(int index, CloudIdentityInfo.CustomerType value)

Allowed Customer Type.

repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;

Parameters
NameDescription
indexint

The index to set the value at.

valueCloudIdentityInfo.CustomerType

The allowedCustomerTypes to set.

Returns
TypeDescription
CustomerConstraints.Builder

This builder for chaining.

setAllowedCustomerTypesValue(int index, int value)

public CustomerConstraints.Builder setAllowedCustomerTypesValue(int index, int value)

Allowed Customer Type.

repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2;

Parameters
NameDescription
indexint

The index to set the value at.

valueint

The enum numeric value on the wire for allowedCustomerTypes to set.

Returns
TypeDescription
CustomerConstraints.Builder

This builder for chaining.

setAllowedRegions(int index, String value)

public CustomerConstraints.Builder setAllowedRegions(int index, String value)

Allowed geographical regions of the customer.

repeated string allowed_regions = 1;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The allowedRegions to set.

Returns
TypeDescription
CustomerConstraints.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public CustomerConstraints.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
CustomerConstraints.Builder
Overrides

setPromotionalOrderTypes(int index, PromotionalOrderType value)

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

The index to set the value at.

valuePromotionalOrderType

The promotionalOrderTypes to set.

Returns
TypeDescription
CustomerConstraints.Builder

This builder for chaining.

setPromotionalOrderTypesValue(int index, int value)

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

The index to set the value at.

valueint

The enum numeric value on the wire for promotionalOrderTypes to set.

Returns
TypeDescription
CustomerConstraints.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public CustomerConstraints.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
CustomerConstraints.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final CustomerConstraints.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
CustomerConstraints.Builder
Overrides