Class CartData.Builder (0.1.0)

public static final class CartData.Builder extends GeneratedMessageV3.Builder<CartData.Builder> implements CartDataOrBuilder

The cart data associated with the event.

Protobuf type google.ads.datamanager.v1.CartData

Implements

CartDataOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllItems(Iterable<? extends Item> values)

public CartData.Builder addAllItems(Iterable<? extends Item> values)

Optional. The list of items associated with the event.

repeated .google.ads.datamanager.v1.Item items = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.ads.datamanager.v1.Item>
Returns
Type Description
CartData.Builder

addItems(Item value)

public CartData.Builder addItems(Item value)

Optional. The list of items associated with the event.

repeated .google.ads.datamanager.v1.Item items = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Item
Returns
Type Description
CartData.Builder

addItems(Item.Builder builderForValue)

public CartData.Builder addItems(Item.Builder builderForValue)

Optional. The list of items associated with the event.

repeated .google.ads.datamanager.v1.Item items = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Item.Builder
Returns
Type Description
CartData.Builder

addItems(int index, Item value)

public CartData.Builder addItems(int index, Item value)

Optional. The list of items associated with the event.

repeated .google.ads.datamanager.v1.Item items = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value Item
Returns
Type Description
CartData.Builder

addItems(int index, Item.Builder builderForValue)

public CartData.Builder addItems(int index, Item.Builder builderForValue)

Optional. The list of items associated with the event.

repeated .google.ads.datamanager.v1.Item items = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue Item.Builder
Returns
Type Description
CartData.Builder

addItemsBuilder()

public Item.Builder addItemsBuilder()

Optional. The list of items associated with the event.

repeated .google.ads.datamanager.v1.Item items = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Item.Builder

addItemsBuilder(int index)

public Item.Builder addItemsBuilder(int index)

Optional. The list of items associated with the event.

repeated .google.ads.datamanager.v1.Item items = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Item.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CartData.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CartData.Builder
Overrides

build()

public CartData build()
Returns
Type Description
CartData

buildPartial()

public CartData buildPartial()
Returns
Type Description
CartData

clear()

public CartData.Builder clear()
Returns
Type Description
CartData.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public CartData.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
CartData.Builder
Overrides

clearItems()

public CartData.Builder clearItems()

Optional. The list of items associated with the event.

repeated .google.ads.datamanager.v1.Item items = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CartData.Builder

clearMerchantFeedLabel()

public CartData.Builder clearMerchantFeedLabel()

Optional. The Merchant Center feed label associated with the feed of the items.

string merchant_feed_label = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CartData.Builder

This builder for chaining.

clearMerchantFeedLanguageCode()

public CartData.Builder clearMerchantFeedLanguageCode()

Optional. The language code in ISO 639-1 associated with the Merchant Center feed of the items.where your items are uploaded.

string merchant_feed_language_code = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CartData.Builder

This builder for chaining.

clearMerchantId()

public CartData.Builder clearMerchantId()

Optional. The Merchant Center ID associated with the items.

string merchant_id = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CartData.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public CartData.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
CartData.Builder
Overrides

clearTransactionDiscount()

public CartData.Builder clearTransactionDiscount()

Optional. The sum of all discounts associated with the transaction.

double transaction_discount = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CartData.Builder

This builder for chaining.

clone()

public CartData.Builder clone()
Returns
Type Description
CartData.Builder
Overrides

getDefaultInstanceForType()

public CartData getDefaultInstanceForType()
Returns
Type Description
CartData

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getItems(int index)

public Item getItems(int index)

Optional. The list of items associated with the event.

repeated .google.ads.datamanager.v1.Item items = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Item

getItemsBuilder(int index)

public Item.Builder getItemsBuilder(int index)

Optional. The list of items associated with the event.

repeated .google.ads.datamanager.v1.Item items = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Item.Builder

getItemsBuilderList()

public List<Item.Builder> getItemsBuilderList()

Optional. The list of items associated with the event.

repeated .google.ads.datamanager.v1.Item items = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getItemsCount()

public int getItemsCount()

Optional. The list of items associated with the event.

repeated .google.ads.datamanager.v1.Item items = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getItemsList()

public List<Item> getItemsList()

Optional. The list of items associated with the event.

repeated .google.ads.datamanager.v1.Item items = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Item>

getItemsOrBuilder(int index)

public ItemOrBuilder getItemsOrBuilder(int index)

Optional. The list of items associated with the event.

repeated .google.ads.datamanager.v1.Item items = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
ItemOrBuilder

getItemsOrBuilderList()

public List<? extends ItemOrBuilder> getItemsOrBuilderList()

Optional. The list of items associated with the event.

repeated .google.ads.datamanager.v1.Item items = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.ads.datamanager.v1.ItemOrBuilder>

getMerchantFeedLabel()

public String getMerchantFeedLabel()

Optional. The Merchant Center feed label associated with the feed of the items.

string merchant_feed_label = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The merchantFeedLabel.

getMerchantFeedLabelBytes()

public ByteString getMerchantFeedLabelBytes()

Optional. The Merchant Center feed label associated with the feed of the items.

string merchant_feed_label = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for merchantFeedLabel.

getMerchantFeedLanguageCode()

public String getMerchantFeedLanguageCode()

Optional. The language code in ISO 639-1 associated with the Merchant Center feed of the items.where your items are uploaded.

string merchant_feed_language_code = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The merchantFeedLanguageCode.

getMerchantFeedLanguageCodeBytes()

public ByteString getMerchantFeedLanguageCodeBytes()

Optional. The language code in ISO 639-1 associated with the Merchant Center feed of the items.where your items are uploaded.

string merchant_feed_language_code = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for merchantFeedLanguageCode.

getMerchantId()

public String getMerchantId()

Optional. The Merchant Center ID associated with the items.

string merchant_id = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The merchantId.

getMerchantIdBytes()

public ByteString getMerchantIdBytes()

Optional. The Merchant Center ID associated with the items.

string merchant_id = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for merchantId.

getTransactionDiscount()

public double getTransactionDiscount()

Optional. The sum of all discounts associated with the transaction.

double transaction_discount = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
double

The transactionDiscount.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CartData other)

public CartData.Builder mergeFrom(CartData other)
Parameter
Name Description
other CartData
Returns
Type Description
CartData.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CartData.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CartData.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CartData.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CartData.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CartData.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CartData.Builder
Overrides

removeItems(int index)

public CartData.Builder removeItems(int index)

Optional. The list of items associated with the event.

repeated .google.ads.datamanager.v1.Item items = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
CartData.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public CartData.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CartData.Builder
Overrides

setItems(int index, Item value)

public CartData.Builder setItems(int index, Item value)

Optional. The list of items associated with the event.

repeated .google.ads.datamanager.v1.Item items = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value Item
Returns
Type Description
CartData.Builder

setItems(int index, Item.Builder builderForValue)

public CartData.Builder setItems(int index, Item.Builder builderForValue)

Optional. The list of items associated with the event.

repeated .google.ads.datamanager.v1.Item items = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue Item.Builder
Returns
Type Description
CartData.Builder

setMerchantFeedLabel(String value)

public CartData.Builder setMerchantFeedLabel(String value)

Optional. The Merchant Center feed label associated with the feed of the items.

string merchant_feed_label = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The merchantFeedLabel to set.

Returns
Type Description
CartData.Builder

This builder for chaining.

setMerchantFeedLabelBytes(ByteString value)

public CartData.Builder setMerchantFeedLabelBytes(ByteString value)

Optional. The Merchant Center feed label associated with the feed of the items.

string merchant_feed_label = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for merchantFeedLabel to set.

Returns
Type Description
CartData.Builder

This builder for chaining.

setMerchantFeedLanguageCode(String value)

public CartData.Builder setMerchantFeedLanguageCode(String value)

Optional. The language code in ISO 639-1 associated with the Merchant Center feed of the items.where your items are uploaded.

string merchant_feed_language_code = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The merchantFeedLanguageCode to set.

Returns
Type Description
CartData.Builder

This builder for chaining.

setMerchantFeedLanguageCodeBytes(ByteString value)

public CartData.Builder setMerchantFeedLanguageCodeBytes(ByteString value)

Optional. The language code in ISO 639-1 associated with the Merchant Center feed of the items.where your items are uploaded.

string merchant_feed_language_code = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for merchantFeedLanguageCode to set.

Returns
Type Description
CartData.Builder

This builder for chaining.

setMerchantId(String value)

public CartData.Builder setMerchantId(String value)

Optional. The Merchant Center ID associated with the items.

string merchant_id = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The merchantId to set.

Returns
Type Description
CartData.Builder

This builder for chaining.

setMerchantIdBytes(ByteString value)

public CartData.Builder setMerchantIdBytes(ByteString value)

Optional. The Merchant Center ID associated with the items.

string merchant_id = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for merchantId to set.

Returns
Type Description
CartData.Builder

This builder for chaining.

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

public CartData.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
CartData.Builder
Overrides

setTransactionDiscount(double value)

public CartData.Builder setTransactionDiscount(double value)

Optional. The sum of all discounts associated with the transaction.

double transaction_discount = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value double

The transactionDiscount to set.

Returns
Type Description
CartData.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final CartData.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CartData.Builder
Overrides