Class Attributes.Builder (0.10.0)

public static final class Attributes.Builder extends GeneratedMessageV3.Builder<Attributes.Builder> implements AttributesOrBuilder

Attributes.

Protobuf type google.shopping.merchant.promotions.v1beta.Attributes

Implements

AttributesOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllBrandExclusion(Iterable<String> values)

public Attributes.Builder addAllBrandExclusion(Iterable<String> values)

Optional. Product filter by brand exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The brandExclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addAllBrandInclusion(Iterable<String> values)

public Attributes.Builder addAllBrandInclusion(Iterable<String> values)

Optional. Product filter by brand for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The brandInclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addAllItemGroupIdExclusion(Iterable<String> values)

public Attributes.Builder addAllItemGroupIdExclusion(Iterable<String> values)

Optional. Product filter by item group ID. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products. exclusion for the promotion.

repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The itemGroupIdExclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addAllItemGroupIdInclusion(Iterable<String> values)

public Attributes.Builder addAllItemGroupIdInclusion(Iterable<String> values)

Optional. Product filter by item group ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability [product_applicability] attribute is set to specific_products.

repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The itemGroupIdInclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addAllItemIdExclusion(Iterable<String> values)

public Attributes.Builder addAllItemIdExclusion(Iterable<String> values)

Optional. Product filter by item ID exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The itemIdExclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addAllItemIdInclusion(Iterable<String> values)

public Attributes.Builder addAllItemIdInclusion(Iterable<String> values)

Optional. Product filter by item ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The itemIdInclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addAllProductTypeExclusion(Iterable<String> values)

public Attributes.Builder addAllProductTypeExclusion(Iterable<String> values)

Optional. Product filter by product type exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The productTypeExclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addAllProductTypeInclusion(Iterable<String> values)

public Attributes.Builder addAllProductTypeInclusion(Iterable<String> values)

Optional. Product filter by product type for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The productTypeInclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addAllPromotionDestinations(Iterable<? extends Destination.DestinationEnum> values)

public Attributes.Builder addAllPromotionDestinations(Iterable<? extends Destination.DestinationEnum> values)

Required. The list of destinations where the promotion applies to. If you don't specify a destination by including a supported value in your data source, your promotion will display in Shopping ads and free listings by default.

You may have previously submitted the following values as destinations for your products: Shopping Actions, Surfaces across Google, Local surfaces across Google. To represent these values use FREE_LISTINGS, FREE_LOCAL_LISTINGS, LOCAL_INVENTORY_ADS. For more details see Promotion destination

repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<? extends com.google.shopping.type.Destination.DestinationEnum>

The promotionDestinations to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addAllPromotionDestinationsValue(Iterable<Integer> values)

public Attributes.Builder addAllPromotionDestinationsValue(Iterable<Integer> values)

Required. The list of destinations where the promotion applies to. If you don't specify a destination by including a supported value in your data source, your promotion will display in Shopping ads and free listings by default.

You may have previously submitted the following values as destinations for your products: Shopping Actions, Surfaces across Google, Local surfaces across Google. To represent these values use FREE_LISTINGS, FREE_LOCAL_LISTINGS, LOCAL_INVENTORY_ADS. For more details see Promotion destination

repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<Integer>

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

Returns
Type Description
Attributes.Builder

This builder for chaining.

addAllStoreCodesExclusion(Iterable<String> values)

public Attributes.Builder addAllStoreCodesExclusion(Iterable<String> values)

Optional. Store codes to exclude for the promotion. The store filter attributes only applies when the store_applicability attribute is set to specific_stores.

repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The storeCodesExclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addAllStoreCodesInclusion(Iterable<String> values)

public Attributes.Builder addAllStoreCodesInclusion(Iterable<String> values)

Optional. Store codes to include for the promotion. The store filter attributes only applies when the store_applicability attribute is set to specific_stores.

Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.

repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The storeCodesInclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addBrandExclusion(String value)

public Attributes.Builder addBrandExclusion(String value)

Optional. Product filter by brand exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The brandExclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addBrandExclusionBytes(ByteString value)

public Attributes.Builder addBrandExclusionBytes(ByteString value)

Optional. Product filter by brand exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the brandExclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addBrandInclusion(String value)

public Attributes.Builder addBrandInclusion(String value)

Optional. Product filter by brand for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The brandInclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addBrandInclusionBytes(ByteString value)

public Attributes.Builder addBrandInclusionBytes(ByteString value)

Optional. Product filter by brand for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the brandInclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addItemGroupIdExclusion(String value)

public Attributes.Builder addItemGroupIdExclusion(String value)

Optional. Product filter by item group ID. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products. exclusion for the promotion.

repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The itemGroupIdExclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addItemGroupIdExclusionBytes(ByteString value)

public Attributes.Builder addItemGroupIdExclusionBytes(ByteString value)

Optional. Product filter by item group ID. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products. exclusion for the promotion.

repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the itemGroupIdExclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addItemGroupIdInclusion(String value)

public Attributes.Builder addItemGroupIdInclusion(String value)

Optional. Product filter by item group ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability [product_applicability] attribute is set to specific_products.

repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The itemGroupIdInclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addItemGroupIdInclusionBytes(ByteString value)

public Attributes.Builder addItemGroupIdInclusionBytes(ByteString value)

Optional. Product filter by item group ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability [product_applicability] attribute is set to specific_products.

repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the itemGroupIdInclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addItemIdExclusion(String value)

public Attributes.Builder addItemIdExclusion(String value)

Optional. Product filter by item ID exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The itemIdExclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addItemIdExclusionBytes(ByteString value)

public Attributes.Builder addItemIdExclusionBytes(ByteString value)

Optional. Product filter by item ID exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the itemIdExclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addItemIdInclusion(String value)

public Attributes.Builder addItemIdInclusion(String value)

Optional. Product filter by item ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The itemIdInclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addItemIdInclusionBytes(ByteString value)

public Attributes.Builder addItemIdInclusionBytes(ByteString value)

Optional. Product filter by item ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the itemIdInclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addProductTypeExclusion(String value)

public Attributes.Builder addProductTypeExclusion(String value)

Optional. Product filter by product type exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The productTypeExclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addProductTypeExclusionBytes(ByteString value)

public Attributes.Builder addProductTypeExclusionBytes(ByteString value)

Optional. Product filter by product type exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the productTypeExclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addProductTypeInclusion(String value)

public Attributes.Builder addProductTypeInclusion(String value)

Optional. Product filter by product type for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The productTypeInclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addProductTypeInclusionBytes(ByteString value)

public Attributes.Builder addProductTypeInclusionBytes(ByteString value)

Optional. Product filter by product type for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the productTypeInclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addPromotionDestinations(Destination.DestinationEnum value)

public Attributes.Builder addPromotionDestinations(Destination.DestinationEnum value)

Required. The list of destinations where the promotion applies to. If you don't specify a destination by including a supported value in your data source, your promotion will display in Shopping ads and free listings by default.

You may have previously submitted the following values as destinations for your products: Shopping Actions, Surfaces across Google, Local surfaces across Google. To represent these values use FREE_LISTINGS, FREE_LOCAL_LISTINGS, LOCAL_INVENTORY_ADS. For more details see Promotion destination

repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value com.google.shopping.type.Destination.DestinationEnum

The promotionDestinations to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addPromotionDestinationsValue(int value)

public Attributes.Builder addPromotionDestinationsValue(int value)

Required. The list of destinations where the promotion applies to. If you don't specify a destination by including a supported value in your data source, your promotion will display in Shopping ads and free listings by default.

You may have previously submitted the following values as destinations for your products: Shopping Actions, Surfaces across Google, Local surfaces across Google. To represent these values use FREE_LISTINGS, FREE_LOCAL_LISTINGS, LOCAL_INVENTORY_ADS. For more details see Promotion destination

repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

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

Returns
Type Description
Attributes.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addStoreCodesExclusion(String value)

public Attributes.Builder addStoreCodesExclusion(String value)

Optional. Store codes to exclude for the promotion. The store filter attributes only applies when the store_applicability attribute is set to specific_stores.

repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The storeCodesExclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addStoreCodesExclusionBytes(ByteString value)

public Attributes.Builder addStoreCodesExclusionBytes(ByteString value)

Optional. Store codes to exclude for the promotion. The store filter attributes only applies when the store_applicability attribute is set to specific_stores.

repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the storeCodesExclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addStoreCodesInclusion(String value)

public Attributes.Builder addStoreCodesInclusion(String value)

Optional. Store codes to include for the promotion. The store filter attributes only applies when the store_applicability attribute is set to specific_stores.

Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.

repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The storeCodesInclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

addStoreCodesInclusionBytes(ByteString value)

public Attributes.Builder addStoreCodesInclusionBytes(ByteString value)

Optional. Store codes to include for the promotion. The store filter attributes only applies when the store_applicability attribute is set to specific_stores.

Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.

repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the storeCodesInclusion to add.

Returns
Type Description
Attributes.Builder

This builder for chaining.

build()

public Attributes build()
Returns
Type Description
Attributes

buildPartial()

public Attributes buildPartial()
Returns
Type Description
Attributes

clear()

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

clearBrandExclusion()

public Attributes.Builder clearBrandExclusion()

Optional. Product filter by brand exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearBrandInclusion()

public Attributes.Builder clearBrandInclusion()

Optional. Product filter by brand for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearCouponValueType()

public Attributes.Builder clearCouponValueType()

Required. The coupon value type attribute to signal the type of promotion that you are running. Depending on type of the selected coupon value some attributes are required.

.google.shopping.merchant.promotions.v1beta.CouponValueType coupon_value_type = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearFreeGiftDescription()

public Attributes.Builder clearFreeGiftDescription()

Optional. Free gift description for the promotion.

string free_gift_description = 23 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearFreeGiftItemId()

public Attributes.Builder clearFreeGiftItemId()

Optional. Free gift item ID for the promotion.

string free_gift_item_id = 24 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearFreeGiftValue()

public Attributes.Builder clearFreeGiftValue()

Optional. Free gift value for the promotion.

.google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

clearGenericRedemptionCode()

public Attributes.Builder clearGenericRedemptionCode()

Optional. Generic redemption code for the promotion. To be used with the offerType field and must meet the minimum requirements.

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

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearGetThisQuantityDiscounted()

public Attributes.Builder clearGetThisQuantityDiscounted()

Optional. The number of items discounted in the promotion. The attribute is set when couponValueType is equal to buy_m_get_n_money_off or buy_m_get_n_percent_off.

int64 get_this_quantity_discounted = 21 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearItemGroupIdExclusion()

public Attributes.Builder clearItemGroupIdExclusion()

Optional. Product filter by item group ID. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products. exclusion for the promotion.

repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearItemGroupIdInclusion()

public Attributes.Builder clearItemGroupIdInclusion()

Optional. Product filter by item group ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability [product_applicability] attribute is set to specific_products.

repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearItemIdExclusion()

public Attributes.Builder clearItemIdExclusion()

Optional. Product filter by item ID exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearItemIdInclusion()

public Attributes.Builder clearItemIdInclusion()

Optional. Product filter by item ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearLimitQuantity()

public Attributes.Builder clearLimitQuantity()

Optional. Maximum purchase quantity for the promotion.

int64 limit_quantity = 17 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearLimitValue()

public Attributes.Builder clearLimitValue()

Optional. Maximum product price for promotion.

.google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

clearLongTitle()

public Attributes.Builder clearLongTitle()

Required. Long title for the promotion.

string long_title = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearMinimumPurchaseAmount()

public Attributes.Builder clearMinimumPurchaseAmount()

Optional. Minimum purchase amount for the promotion.

.google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

clearMinimumPurchaseQuantity()

public Attributes.Builder clearMinimumPurchaseQuantity()

Optional. Minimum purchase quantity for the promotion.

int64 minimum_purchase_quantity = 16 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearMoneyOffAmount()

public Attributes.Builder clearMoneyOffAmount()

Optional. The money off amount offered in the promotion.

.google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

clearOfferType()

public Attributes.Builder clearOfferType()

Required. Type of the promotion. Use this attribute to indicate whether or not customers need a coupon code to redeem your promotion.

.google.shopping.merchant.promotions.v1beta.OfferType offer_type = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPercentOff()

public Attributes.Builder clearPercentOff()

Optional. The percentage discount offered in the promotion.

int64 percent_off = 19 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearProductApplicability()

public Attributes.Builder clearProductApplicability()

Required. Applicability of the promotion to either all products or only specific products.

.google.shopping.merchant.promotions.v1beta.ProductApplicability product_applicability = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearProductTypeExclusion()

public Attributes.Builder clearProductTypeExclusion()

Optional. Product filter by product type exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearProductTypeInclusion()

public Attributes.Builder clearProductTypeInclusion()

Optional. Product filter by product type for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearPromotionDestinations()

public Attributes.Builder clearPromotionDestinations()

Required. The list of destinations where the promotion applies to. If you don't specify a destination by including a supported value in your data source, your promotion will display in Shopping ads and free listings by default.

You may have previously submitted the following values as destinations for your products: Shopping Actions, Surfaces across Google, Local surfaces across Google. To represent these values use FREE_LISTINGS, FREE_LOCAL_LISTINGS, LOCAL_INVENTORY_ADS. For more details see Promotion destination

repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearPromotionDisplayTimePeriod()

public Attributes.Builder clearPromotionDisplayTimePeriod()

Optional. TimePeriod representation of the promotion's display dates. This attribute specifies the date and time frame when the promotion will be live on Google.com and Shopping ads. If the display time period for promotion promotion_display_time_period attribute is not specified, the promotion effective time period promotion_effective_time_period determines the date and time frame when the promotion will be live on Google.com and Shopping ads.

.google.type.Interval promotion_display_time_period = 26 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

clearPromotionEffectiveTimePeriod()

public Attributes.Builder clearPromotionEffectiveTimePeriod()

Required. TimePeriod representation of the promotion's effective dates. This attribute specifies that the promotion can be tested on your online store during this time period.

.google.type.Interval promotion_effective_time_period = 25 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Attributes.Builder

clearPromotionUrl()

public Attributes.Builder clearPromotionUrl()

Optional. URL to the page on the merchant's site where the promotion shows. Local Inventory ads promotions throw an error if no promotion_url is included. URL is used to confirm that the promotion is valid and can be redeemed.

string promotion_url = 31 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearStoreApplicability()

public Attributes.Builder clearStoreApplicability()

Optional. Whether the promotion applies to all stores, or only specified stores. Local Inventory ads promotions throw an error if no store applicability is included. An INVALID_ARGUMENT error is thrown if store_applicability is set to ALL_STORES and store_codes_inclusion or score_code_exclusion is set to a value.

.google.shopping.merchant.promotions.v1beta.StoreApplicability store_applicability = 28 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearStoreCodesExclusion()

public Attributes.Builder clearStoreCodesExclusion()

Optional. Store codes to exclude for the promotion. The store filter attributes only applies when the store_applicability attribute is set to specific_stores.

repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clearStoreCodesInclusion()

public Attributes.Builder clearStoreCodesInclusion()

Optional. Store codes to include for the promotion. The store filter attributes only applies when the store_applicability attribute is set to specific_stores.

Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.

repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes.Builder

This builder for chaining.

clone()

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

getBrandExclusion(int index)

public String getBrandExclusion(int index)

Optional. Product filter by brand exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The brandExclusion at the given index.

getBrandExclusionBytes(int index)

public ByteString getBrandExclusionBytes(int index)

Optional. Product filter by brand exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the brandExclusion at the given index.

getBrandExclusionCount()

public int getBrandExclusionCount()

Optional. Product filter by brand exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of brandExclusion.

getBrandExclusionList()

public ProtocolStringList getBrandExclusionList()

Optional. Product filter by brand exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the brandExclusion.

getBrandInclusion(int index)

public String getBrandInclusion(int index)

Optional. Product filter by brand for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The brandInclusion at the given index.

getBrandInclusionBytes(int index)

public ByteString getBrandInclusionBytes(int index)

Optional. Product filter by brand for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the brandInclusion at the given index.

getBrandInclusionCount()

public int getBrandInclusionCount()

Optional. Product filter by brand for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of brandInclusion.

getBrandInclusionList()

public ProtocolStringList getBrandInclusionList()

Optional. Product filter by brand for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the brandInclusion.

getCouponValueType()

public CouponValueType getCouponValueType()

Required. The coupon value type attribute to signal the type of promotion that you are running. Depending on type of the selected coupon value some attributes are required.

.google.shopping.merchant.promotions.v1beta.CouponValueType coupon_value_type = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CouponValueType

The couponValueType.

getCouponValueTypeValue()

public int getCouponValueTypeValue()

Required. The coupon value type attribute to signal the type of promotion that you are running. Depending on type of the selected coupon value some attributes are required.

.google.shopping.merchant.promotions.v1beta.CouponValueType coupon_value_type = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for couponValueType.

getDefaultInstanceForType()

public Attributes getDefaultInstanceForType()
Returns
Type Description
Attributes

getDescriptorForType()

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

getFreeGiftDescription()

public String getFreeGiftDescription()

Optional. Free gift description for the promotion.

string free_gift_description = 23 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The freeGiftDescription.

getFreeGiftDescriptionBytes()

public ByteString getFreeGiftDescriptionBytes()

Optional. Free gift description for the promotion.

string free_gift_description = 23 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for freeGiftDescription.

getFreeGiftItemId()

public String getFreeGiftItemId()

Optional. Free gift item ID for the promotion.

string free_gift_item_id = 24 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The freeGiftItemId.

getFreeGiftItemIdBytes()

public ByteString getFreeGiftItemIdBytes()

Optional. Free gift item ID for the promotion.

string free_gift_item_id = 24 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for freeGiftItemId.

getFreeGiftValue()

public Price getFreeGiftValue()

Optional. Free gift value for the promotion.

.google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.shopping.type.Price

The freeGiftValue.

getFreeGiftValueBuilder()

public Price.Builder getFreeGiftValueBuilder()

Optional. Free gift value for the promotion.

.google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.shopping.type.Price.Builder

getFreeGiftValueOrBuilder()

public PriceOrBuilder getFreeGiftValueOrBuilder()

Optional. Free gift value for the promotion.

.google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.shopping.type.PriceOrBuilder

getGenericRedemptionCode()

public String getGenericRedemptionCode()

Optional. Generic redemption code for the promotion. To be used with the offerType field and must meet the minimum requirements.

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

Returns
Type Description
String

The genericRedemptionCode.

getGenericRedemptionCodeBytes()

public ByteString getGenericRedemptionCodeBytes()

Optional. Generic redemption code for the promotion. To be used with the offerType field and must meet the minimum requirements.

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

Returns
Type Description
ByteString

The bytes for genericRedemptionCode.

getGetThisQuantityDiscounted()

public long getGetThisQuantityDiscounted()

Optional. The number of items discounted in the promotion. The attribute is set when couponValueType is equal to buy_m_get_n_money_off or buy_m_get_n_percent_off.

int64 get_this_quantity_discounted = 21 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
long

The getThisQuantityDiscounted.

getItemGroupIdExclusion(int index)

public String getItemGroupIdExclusion(int index)

Optional. Product filter by item group ID. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products. exclusion for the promotion.

repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The itemGroupIdExclusion at the given index.

getItemGroupIdExclusionBytes(int index)

public ByteString getItemGroupIdExclusionBytes(int index)

Optional. Product filter by item group ID. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products. exclusion for the promotion.

repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the itemGroupIdExclusion at the given index.

getItemGroupIdExclusionCount()

public int getItemGroupIdExclusionCount()

Optional. Product filter by item group ID. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products. exclusion for the promotion.

repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of itemGroupIdExclusion.

getItemGroupIdExclusionList()

public ProtocolStringList getItemGroupIdExclusionList()

Optional. Product filter by item group ID. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products. exclusion for the promotion.

repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the itemGroupIdExclusion.

getItemGroupIdInclusion(int index)

public String getItemGroupIdInclusion(int index)

Optional. Product filter by item group ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability [product_applicability] attribute is set to specific_products.

repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The itemGroupIdInclusion at the given index.

getItemGroupIdInclusionBytes(int index)

public ByteString getItemGroupIdInclusionBytes(int index)

Optional. Product filter by item group ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability [product_applicability] attribute is set to specific_products.

repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the itemGroupIdInclusion at the given index.

getItemGroupIdInclusionCount()

public int getItemGroupIdInclusionCount()

Optional. Product filter by item group ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability [product_applicability] attribute is set to specific_products.

repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of itemGroupIdInclusion.

getItemGroupIdInclusionList()

public ProtocolStringList getItemGroupIdInclusionList()

Optional. Product filter by item group ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability [product_applicability] attribute is set to specific_products.

repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the itemGroupIdInclusion.

getItemIdExclusion(int index)

public String getItemIdExclusion(int index)

Optional. Product filter by item ID exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The itemIdExclusion at the given index.

getItemIdExclusionBytes(int index)

public ByteString getItemIdExclusionBytes(int index)

Optional. Product filter by item ID exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the itemIdExclusion at the given index.

getItemIdExclusionCount()

public int getItemIdExclusionCount()

Optional. Product filter by item ID exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of itemIdExclusion.

getItemIdExclusionList()

public ProtocolStringList getItemIdExclusionList()

Optional. Product filter by item ID exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the itemIdExclusion.

getItemIdInclusion(int index)

public String getItemIdInclusion(int index)

Optional. Product filter by item ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The itemIdInclusion at the given index.

getItemIdInclusionBytes(int index)

public ByteString getItemIdInclusionBytes(int index)

Optional. Product filter by item ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the itemIdInclusion at the given index.

getItemIdInclusionCount()

public int getItemIdInclusionCount()

Optional. Product filter by item ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of itemIdInclusion.

getItemIdInclusionList()

public ProtocolStringList getItemIdInclusionList()

Optional. Product filter by item ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the itemIdInclusion.

getLimitQuantity()

public long getLimitQuantity()

Optional. Maximum purchase quantity for the promotion.

int64 limit_quantity = 17 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
long

The limitQuantity.

getLimitValue()

public Price getLimitValue()

Optional. Maximum product price for promotion.

.google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.shopping.type.Price

The limitValue.

getLimitValueBuilder()

public Price.Builder getLimitValueBuilder()

Optional. Maximum product price for promotion.

.google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.shopping.type.Price.Builder

getLimitValueOrBuilder()

public PriceOrBuilder getLimitValueOrBuilder()

Optional. Maximum product price for promotion.

.google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.shopping.type.PriceOrBuilder

getLongTitle()

public String getLongTitle()

Required. Long title for the promotion.

string long_title = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The longTitle.

getLongTitleBytes()

public ByteString getLongTitleBytes()

Required. Long title for the promotion.

string long_title = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for longTitle.

getMinimumPurchaseAmount()

public Price getMinimumPurchaseAmount()

Optional. Minimum purchase amount for the promotion.

.google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.shopping.type.Price

The minimumPurchaseAmount.

getMinimumPurchaseAmountBuilder()

public Price.Builder getMinimumPurchaseAmountBuilder()

Optional. Minimum purchase amount for the promotion.

.google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.shopping.type.Price.Builder

getMinimumPurchaseAmountOrBuilder()

public PriceOrBuilder getMinimumPurchaseAmountOrBuilder()

Optional. Minimum purchase amount for the promotion.

.google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.shopping.type.PriceOrBuilder

getMinimumPurchaseQuantity()

public long getMinimumPurchaseQuantity()

Optional. Minimum purchase quantity for the promotion.

int64 minimum_purchase_quantity = 16 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
long

The minimumPurchaseQuantity.

getMoneyOffAmount()

public Price getMoneyOffAmount()

Optional. The money off amount offered in the promotion.

.google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.shopping.type.Price

The moneyOffAmount.

getMoneyOffAmountBuilder()

public Price.Builder getMoneyOffAmountBuilder()

Optional. The money off amount offered in the promotion.

.google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.shopping.type.Price.Builder

getMoneyOffAmountOrBuilder()

public PriceOrBuilder getMoneyOffAmountOrBuilder()

Optional. The money off amount offered in the promotion.

.google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.shopping.type.PriceOrBuilder

getOfferType()

public OfferType getOfferType()

Required. Type of the promotion. Use this attribute to indicate whether or not customers need a coupon code to redeem your promotion.

.google.shopping.merchant.promotions.v1beta.OfferType offer_type = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
OfferType

The offerType.

getOfferTypeValue()

public int getOfferTypeValue()

Required. Type of the promotion. Use this attribute to indicate whether or not customers need a coupon code to redeem your promotion.

.google.shopping.merchant.promotions.v1beta.OfferType offer_type = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for offerType.

getPercentOff()

public long getPercentOff()

Optional. The percentage discount offered in the promotion.

int64 percent_off = 19 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
long

The percentOff.

getProductApplicability()

public ProductApplicability getProductApplicability()

Required. Applicability of the promotion to either all products or only specific products.

.google.shopping.merchant.promotions.v1beta.ProductApplicability product_applicability = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProductApplicability

The productApplicability.

getProductApplicabilityValue()

public int getProductApplicabilityValue()

Required. Applicability of the promotion to either all products or only specific products.

.google.shopping.merchant.promotions.v1beta.ProductApplicability product_applicability = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for productApplicability.

getProductTypeExclusion(int index)

public String getProductTypeExclusion(int index)

Optional. Product filter by product type exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The productTypeExclusion at the given index.

getProductTypeExclusionBytes(int index)

public ByteString getProductTypeExclusionBytes(int index)

Optional. Product filter by product type exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the productTypeExclusion at the given index.

getProductTypeExclusionCount()

public int getProductTypeExclusionCount()

Optional. Product filter by product type exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of productTypeExclusion.

getProductTypeExclusionList()

public ProtocolStringList getProductTypeExclusionList()

Optional. Product filter by product type exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the productTypeExclusion.

getProductTypeInclusion(int index)

public String getProductTypeInclusion(int index)

Optional. Product filter by product type for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The productTypeInclusion at the given index.

getProductTypeInclusionBytes(int index)

public ByteString getProductTypeInclusionBytes(int index)

Optional. Product filter by product type for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the productTypeInclusion at the given index.

getProductTypeInclusionCount()

public int getProductTypeInclusionCount()

Optional. Product filter by product type for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of productTypeInclusion.

getProductTypeInclusionList()

public ProtocolStringList getProductTypeInclusionList()

Optional. Product filter by product type for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the productTypeInclusion.

getPromotionDestinations(int index)

public Destination.DestinationEnum getPromotionDestinations(int index)

Required. The list of destinations where the promotion applies to. If you don't specify a destination by including a supported value in your data source, your promotion will display in Shopping ads and free listings by default.

You may have previously submitted the following values as destinations for your products: Shopping Actions, Surfaces across Google, Local surfaces across Google. To represent these values use FREE_LISTINGS, FREE_LOCAL_LISTINGS, LOCAL_INVENTORY_ADS. For more details see Promotion destination

repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
com.google.shopping.type.Destination.DestinationEnum

The promotionDestinations at the given index.

getPromotionDestinationsCount()

public int getPromotionDestinationsCount()

Required. The list of destinations where the promotion applies to. If you don't specify a destination by including a supported value in your data source, your promotion will display in Shopping ads and free listings by default.

You may have previously submitted the following values as destinations for your products: Shopping Actions, Surfaces across Google, Local surfaces across Google. To represent these values use FREE_LISTINGS, FREE_LOCAL_LISTINGS, LOCAL_INVENTORY_ADS. For more details see Promotion destination

repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The count of promotionDestinations.

getPromotionDestinationsList()

public List<Destination.DestinationEnum> getPromotionDestinationsList()

Required. The list of destinations where the promotion applies to. If you don't specify a destination by including a supported value in your data source, your promotion will display in Shopping ads and free listings by default.

You may have previously submitted the following values as destinations for your products: Shopping Actions, Surfaces across Google, Local surfaces across Google. To represent these values use FREE_LISTINGS, FREE_LOCAL_LISTINGS, LOCAL_INVENTORY_ADS. For more details see Promotion destination

repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<com.google.shopping.type.Destination.DestinationEnum>

A list containing the promotionDestinations.

getPromotionDestinationsValue(int index)

public int getPromotionDestinationsValue(int index)

Required. The list of destinations where the promotion applies to. If you don't specify a destination by including a supported value in your data source, your promotion will display in Shopping ads and free listings by default.

You may have previously submitted the following values as destinations for your products: Shopping Actions, Surfaces across Google, Local surfaces across Google. To represent these values use FREE_LISTINGS, FREE_LOCAL_LISTINGS, LOCAL_INVENTORY_ADS. For more details see Promotion destination

repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

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

getPromotionDestinationsValueList()

public List<Integer> getPromotionDestinationsValueList()

Required. The list of destinations where the promotion applies to. If you don't specify a destination by including a supported value in your data source, your promotion will display in Shopping ads and free listings by default.

You may have previously submitted the following values as destinations for your products: Shopping Actions, Surfaces across Google, Local surfaces across Google. To represent these values use FREE_LISTINGS, FREE_LOCAL_LISTINGS, LOCAL_INVENTORY_ADS. For more details see Promotion destination

repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Integer>

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

getPromotionDisplayTimePeriod()

public Interval getPromotionDisplayTimePeriod()

Optional. TimePeriod representation of the promotion's display dates. This attribute specifies the date and time frame when the promotion will be live on Google.com and Shopping ads. If the display time period for promotion promotion_display_time_period attribute is not specified, the promotion effective time period promotion_effective_time_period determines the date and time frame when the promotion will be live on Google.com and Shopping ads.

.google.type.Interval promotion_display_time_period = 26 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.type.Interval

The promotionDisplayTimePeriod.

getPromotionDisplayTimePeriodBuilder()

public Interval.Builder getPromotionDisplayTimePeriodBuilder()

Optional. TimePeriod representation of the promotion's display dates. This attribute specifies the date and time frame when the promotion will be live on Google.com and Shopping ads. If the display time period for promotion promotion_display_time_period attribute is not specified, the promotion effective time period promotion_effective_time_period determines the date and time frame when the promotion will be live on Google.com and Shopping ads.

.google.type.Interval promotion_display_time_period = 26 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.type.Interval.Builder

getPromotionDisplayTimePeriodOrBuilder()

public IntervalOrBuilder getPromotionDisplayTimePeriodOrBuilder()

Optional. TimePeriod representation of the promotion's display dates. This attribute specifies the date and time frame when the promotion will be live on Google.com and Shopping ads. If the display time period for promotion promotion_display_time_period attribute is not specified, the promotion effective time period promotion_effective_time_period determines the date and time frame when the promotion will be live on Google.com and Shopping ads.

.google.type.Interval promotion_display_time_period = 26 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.type.IntervalOrBuilder

getPromotionEffectiveTimePeriod()

public Interval getPromotionEffectiveTimePeriod()

Required. TimePeriod representation of the promotion's effective dates. This attribute specifies that the promotion can be tested on your online store during this time period.

.google.type.Interval promotion_effective_time_period = 25 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.Interval

The promotionEffectiveTimePeriod.

getPromotionEffectiveTimePeriodBuilder()

public Interval.Builder getPromotionEffectiveTimePeriodBuilder()

Required. TimePeriod representation of the promotion's effective dates. This attribute specifies that the promotion can be tested on your online store during this time period.

.google.type.Interval promotion_effective_time_period = 25 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.Interval.Builder

getPromotionEffectiveTimePeriodOrBuilder()

public IntervalOrBuilder getPromotionEffectiveTimePeriodOrBuilder()

Required. TimePeriod representation of the promotion's effective dates. This attribute specifies that the promotion can be tested on your online store during this time period.

.google.type.Interval promotion_effective_time_period = 25 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.IntervalOrBuilder

getPromotionUrl()

public String getPromotionUrl()

Optional. URL to the page on the merchant's site where the promotion shows. Local Inventory ads promotions throw an error if no promotion_url is included. URL is used to confirm that the promotion is valid and can be redeemed.

string promotion_url = 31 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The promotionUrl.

getPromotionUrlBytes()

public ByteString getPromotionUrlBytes()

Optional. URL to the page on the merchant's site where the promotion shows. Local Inventory ads promotions throw an error if no promotion_url is included. URL is used to confirm that the promotion is valid and can be redeemed.

string promotion_url = 31 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for promotionUrl.

getStoreApplicability()

public StoreApplicability getStoreApplicability()

Optional. Whether the promotion applies to all stores, or only specified stores. Local Inventory ads promotions throw an error if no store applicability is included. An INVALID_ARGUMENT error is thrown if store_applicability is set to ALL_STORES and store_codes_inclusion or score_code_exclusion is set to a value.

.google.shopping.merchant.promotions.v1beta.StoreApplicability store_applicability = 28 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
StoreApplicability

The storeApplicability.

getStoreApplicabilityValue()

public int getStoreApplicabilityValue()

Optional. Whether the promotion applies to all stores, or only specified stores. Local Inventory ads promotions throw an error if no store applicability is included. An INVALID_ARGUMENT error is thrown if store_applicability is set to ALL_STORES and store_codes_inclusion or score_code_exclusion is set to a value.

.google.shopping.merchant.promotions.v1beta.StoreApplicability store_applicability = 28 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for storeApplicability.

getStoreCodesExclusion(int index)

public String getStoreCodesExclusion(int index)

Optional. Store codes to exclude for the promotion. The store filter attributes only applies when the store_applicability attribute is set to specific_stores.

repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The storeCodesExclusion at the given index.

getStoreCodesExclusionBytes(int index)

public ByteString getStoreCodesExclusionBytes(int index)

Optional. Store codes to exclude for the promotion. The store filter attributes only applies when the store_applicability attribute is set to specific_stores.

repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the storeCodesExclusion at the given index.

getStoreCodesExclusionCount()

public int getStoreCodesExclusionCount()

Optional. Store codes to exclude for the promotion. The store filter attributes only applies when the store_applicability attribute is set to specific_stores.

repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of storeCodesExclusion.

getStoreCodesExclusionList()

public ProtocolStringList getStoreCodesExclusionList()

Optional. Store codes to exclude for the promotion. The store filter attributes only applies when the store_applicability attribute is set to specific_stores.

repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the storeCodesExclusion.

getStoreCodesInclusion(int index)

public String getStoreCodesInclusion(int index)

Optional. Store codes to include for the promotion. The store filter attributes only applies when the store_applicability attribute is set to specific_stores.

Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.

repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The storeCodesInclusion at the given index.

getStoreCodesInclusionBytes(int index)

public ByteString getStoreCodesInclusionBytes(int index)

Optional. Store codes to include for the promotion. The store filter attributes only applies when the store_applicability attribute is set to specific_stores.

Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.

repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the storeCodesInclusion at the given index.

getStoreCodesInclusionCount()

public int getStoreCodesInclusionCount()

Optional. Store codes to include for the promotion. The store filter attributes only applies when the store_applicability attribute is set to specific_stores.

Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.

repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of storeCodesInclusion.

getStoreCodesInclusionList()

public ProtocolStringList getStoreCodesInclusionList()

Optional. Store codes to include for the promotion. The store filter attributes only applies when the store_applicability attribute is set to specific_stores.

Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.

repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the storeCodesInclusion.

hasFreeGiftValue()

public boolean hasFreeGiftValue()

Optional. Free gift value for the promotion.

.google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the freeGiftValue field is set.

hasLimitValue()

public boolean hasLimitValue()

Optional. Maximum product price for promotion.

.google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the limitValue field is set.

hasMinimumPurchaseAmount()

public boolean hasMinimumPurchaseAmount()

Optional. Minimum purchase amount for the promotion.

.google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the minimumPurchaseAmount field is set.

hasMoneyOffAmount()

public boolean hasMoneyOffAmount()

Optional. The money off amount offered in the promotion.

.google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the moneyOffAmount field is set.

hasPromotionDisplayTimePeriod()

public boolean hasPromotionDisplayTimePeriod()

Optional. TimePeriod representation of the promotion's display dates. This attribute specifies the date and time frame when the promotion will be live on Google.com and Shopping ads. If the display time period for promotion promotion_display_time_period attribute is not specified, the promotion effective time period promotion_effective_time_period determines the date and time frame when the promotion will be live on Google.com and Shopping ads.

.google.type.Interval promotion_display_time_period = 26 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the promotionDisplayTimePeriod field is set.

hasPromotionEffectiveTimePeriod()

public boolean hasPromotionEffectiveTimePeriod()

Required. TimePeriod representation of the promotion's effective dates. This attribute specifies that the promotion can be tested on your online store during this time period.

.google.type.Interval promotion_effective_time_period = 25 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the promotionEffectiveTimePeriod field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFreeGiftValue(Price value)

public Attributes.Builder mergeFreeGiftValue(Price value)

Optional. Free gift value for the promotion.

.google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
Attributes.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(Attributes other)

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

mergeLimitValue(Price value)

public Attributes.Builder mergeLimitValue(Price value)

Optional. Maximum product price for promotion.

.google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
Attributes.Builder

mergeMinimumPurchaseAmount(Price value)

public Attributes.Builder mergeMinimumPurchaseAmount(Price value)

Optional. Minimum purchase amount for the promotion.

.google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
Attributes.Builder

mergeMoneyOffAmount(Price value)

public Attributes.Builder mergeMoneyOffAmount(Price value)

Optional. The money off amount offered in the promotion.

.google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
Attributes.Builder

mergePromotionDisplayTimePeriod(Interval value)

public Attributes.Builder mergePromotionDisplayTimePeriod(Interval value)

Optional. TimePeriod representation of the promotion's display dates. This attribute specifies the date and time frame when the promotion will be live on Google.com and Shopping ads. If the display time period for promotion promotion_display_time_period attribute is not specified, the promotion effective time period promotion_effective_time_period determines the date and time frame when the promotion will be live on Google.com and Shopping ads.

.google.type.Interval promotion_display_time_period = 26 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value com.google.type.Interval
Returns
Type Description
Attributes.Builder

mergePromotionEffectiveTimePeriod(Interval value)

public Attributes.Builder mergePromotionEffectiveTimePeriod(Interval value)

Required. TimePeriod representation of the promotion's effective dates. This attribute specifies that the promotion can be tested on your online store during this time period.

.google.type.Interval promotion_effective_time_period = 25 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value com.google.type.Interval
Returns
Type Description
Attributes.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setBrandExclusion(int index, String value)

public Attributes.Builder setBrandExclusion(int index, String value)

Optional. Product filter by brand exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The brandExclusion to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setBrandInclusion(int index, String value)

public Attributes.Builder setBrandInclusion(int index, String value)

Optional. Product filter by brand for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The brandInclusion to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setCouponValueType(CouponValueType value)

public Attributes.Builder setCouponValueType(CouponValueType value)

Required. The coupon value type attribute to signal the type of promotion that you are running. Depending on type of the selected coupon value some attributes are required.

.google.shopping.merchant.promotions.v1beta.CouponValueType coupon_value_type = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value CouponValueType

The couponValueType to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setCouponValueTypeValue(int value)

public Attributes.Builder setCouponValueTypeValue(int value)

Required. The coupon value type attribute to signal the type of promotion that you are running. Depending on type of the selected coupon value some attributes are required.

.google.shopping.merchant.promotions.v1beta.CouponValueType coupon_value_type = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

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

Returns
Type Description
Attributes.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setFreeGiftDescription(String value)

public Attributes.Builder setFreeGiftDescription(String value)

Optional. Free gift description for the promotion.

string free_gift_description = 23 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The freeGiftDescription to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setFreeGiftDescriptionBytes(ByteString value)

public Attributes.Builder setFreeGiftDescriptionBytes(ByteString value)

Optional. Free gift description for the promotion.

string free_gift_description = 23 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for freeGiftDescription to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setFreeGiftItemId(String value)

public Attributes.Builder setFreeGiftItemId(String value)

Optional. Free gift item ID for the promotion.

string free_gift_item_id = 24 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The freeGiftItemId to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setFreeGiftItemIdBytes(ByteString value)

public Attributes.Builder setFreeGiftItemIdBytes(ByteString value)

Optional. Free gift item ID for the promotion.

string free_gift_item_id = 24 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for freeGiftItemId to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setFreeGiftValue(Price value)

public Attributes.Builder setFreeGiftValue(Price value)

Optional. Free gift value for the promotion.

.google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
Attributes.Builder

setFreeGiftValue(Price.Builder builderForValue)

public Attributes.Builder setFreeGiftValue(Price.Builder builderForValue)

Optional. Free gift value for the promotion.

.google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue com.google.shopping.type.Price.Builder
Returns
Type Description
Attributes.Builder

setGenericRedemptionCode(String value)

public Attributes.Builder setGenericRedemptionCode(String value)

Optional. Generic redemption code for the promotion. To be used with the offerType field and must meet the minimum requirements.

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

Parameter
Name Description
value String

The genericRedemptionCode to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setGenericRedemptionCodeBytes(ByteString value)

public Attributes.Builder setGenericRedemptionCodeBytes(ByteString value)

Optional. Generic redemption code for the promotion. To be used with the offerType field and must meet the minimum requirements.

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

Parameter
Name Description
value ByteString

The bytes for genericRedemptionCode to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setGetThisQuantityDiscounted(long value)

public Attributes.Builder setGetThisQuantityDiscounted(long value)

Optional. The number of items discounted in the promotion. The attribute is set when couponValueType is equal to buy_m_get_n_money_off or buy_m_get_n_percent_off.

int64 get_this_quantity_discounted = 21 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value long

The getThisQuantityDiscounted to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setItemGroupIdExclusion(int index, String value)

public Attributes.Builder setItemGroupIdExclusion(int index, String value)

Optional. Product filter by item group ID. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products. exclusion for the promotion.

repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The itemGroupIdExclusion to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setItemGroupIdInclusion(int index, String value)

public Attributes.Builder setItemGroupIdInclusion(int index, String value)

Optional. Product filter by item group ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability [product_applicability] attribute is set to specific_products.

repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The itemGroupIdInclusion to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setItemIdExclusion(int index, String value)

public Attributes.Builder setItemIdExclusion(int index, String value)

Optional. Product filter by item ID exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The itemIdExclusion to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setItemIdInclusion(int index, String value)

public Attributes.Builder setItemIdInclusion(int index, String value)

Optional. Product filter by item ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The itemIdInclusion to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setLimitQuantity(long value)

public Attributes.Builder setLimitQuantity(long value)

Optional. Maximum purchase quantity for the promotion.

int64 limit_quantity = 17 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value long

The limitQuantity to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setLimitValue(Price value)

public Attributes.Builder setLimitValue(Price value)

Optional. Maximum product price for promotion.

.google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
Attributes.Builder

setLimitValue(Price.Builder builderForValue)

public Attributes.Builder setLimitValue(Price.Builder builderForValue)

Optional. Maximum product price for promotion.

.google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue com.google.shopping.type.Price.Builder
Returns
Type Description
Attributes.Builder

setLongTitle(String value)

public Attributes.Builder setLongTitle(String value)

Required. Long title for the promotion.

string long_title = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The longTitle to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setLongTitleBytes(ByteString value)

public Attributes.Builder setLongTitleBytes(ByteString value)

Required. Long title for the promotion.

string long_title = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for longTitle to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setMinimumPurchaseAmount(Price value)

public Attributes.Builder setMinimumPurchaseAmount(Price value)

Optional. Minimum purchase amount for the promotion.

.google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
Attributes.Builder

setMinimumPurchaseAmount(Price.Builder builderForValue)

public Attributes.Builder setMinimumPurchaseAmount(Price.Builder builderForValue)

Optional. Minimum purchase amount for the promotion.

.google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue com.google.shopping.type.Price.Builder
Returns
Type Description
Attributes.Builder

setMinimumPurchaseQuantity(long value)

public Attributes.Builder setMinimumPurchaseQuantity(long value)

Optional. Minimum purchase quantity for the promotion.

int64 minimum_purchase_quantity = 16 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value long

The minimumPurchaseQuantity to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setMoneyOffAmount(Price value)

public Attributes.Builder setMoneyOffAmount(Price value)

Optional. The money off amount offered in the promotion.

.google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
Attributes.Builder

setMoneyOffAmount(Price.Builder builderForValue)

public Attributes.Builder setMoneyOffAmount(Price.Builder builderForValue)

Optional. The money off amount offered in the promotion.

.google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue com.google.shopping.type.Price.Builder
Returns
Type Description
Attributes.Builder

setOfferType(OfferType value)

public Attributes.Builder setOfferType(OfferType value)

Required. Type of the promotion. Use this attribute to indicate whether or not customers need a coupon code to redeem your promotion.

.google.shopping.merchant.promotions.v1beta.OfferType offer_type = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value OfferType

The offerType to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setOfferTypeValue(int value)

public Attributes.Builder setOfferTypeValue(int value)

Required. Type of the promotion. Use this attribute to indicate whether or not customers need a coupon code to redeem your promotion.

.google.shopping.merchant.promotions.v1beta.OfferType offer_type = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

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

Returns
Type Description
Attributes.Builder

This builder for chaining.

setPercentOff(long value)

public Attributes.Builder setPercentOff(long value)

Optional. The percentage discount offered in the promotion.

int64 percent_off = 19 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value long

The percentOff to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setProductApplicability(ProductApplicability value)

public Attributes.Builder setProductApplicability(ProductApplicability value)

Required. Applicability of the promotion to either all products or only specific products.

.google.shopping.merchant.promotions.v1beta.ProductApplicability product_applicability = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ProductApplicability

The productApplicability to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setProductApplicabilityValue(int value)

public Attributes.Builder setProductApplicabilityValue(int value)

Required. Applicability of the promotion to either all products or only specific products.

.google.shopping.merchant.promotions.v1beta.ProductApplicability product_applicability = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

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

Returns
Type Description
Attributes.Builder

This builder for chaining.

setProductTypeExclusion(int index, String value)

public Attributes.Builder setProductTypeExclusion(int index, String value)

Optional. Product filter by product type exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The productTypeExclusion to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setProductTypeInclusion(int index, String value)

public Attributes.Builder setProductTypeInclusion(int index, String value)

Optional. Product filter by product type for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability product_applicability attribute is set to specific_products.

repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The productTypeInclusion to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setPromotionDestinations(int index, Destination.DestinationEnum value)

public Attributes.Builder setPromotionDestinations(int index, Destination.DestinationEnum value)

Required. The list of destinations where the promotion applies to. If you don't specify a destination by including a supported value in your data source, your promotion will display in Shopping ads and free listings by default.

You may have previously submitted the following values as destinations for your products: Shopping Actions, Surfaces across Google, Local surfaces across Google. To represent these values use FREE_LISTINGS, FREE_LOCAL_LISTINGS, LOCAL_INVENTORY_ADS. For more details see Promotion destination

repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int

The index to set the value at.

value com.google.shopping.type.Destination.DestinationEnum

The promotionDestinations to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setPromotionDestinationsValue(int index, int value)

public Attributes.Builder setPromotionDestinationsValue(int index, int value)

Required. The list of destinations where the promotion applies to. If you don't specify a destination by including a supported value in your data source, your promotion will display in Shopping ads and free listings by default.

You may have previously submitted the following values as destinations for your products: Shopping Actions, Surfaces across Google, Local surfaces across Google. To represent these values use FREE_LISTINGS, FREE_LOCAL_LISTINGS, LOCAL_INVENTORY_ADS. For more details see Promotion destination

repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int

The index to set the value at.

value int

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

Returns
Type Description
Attributes.Builder

This builder for chaining.

setPromotionDisplayTimePeriod(Interval value)

public Attributes.Builder setPromotionDisplayTimePeriod(Interval value)

Optional. TimePeriod representation of the promotion's display dates. This attribute specifies the date and time frame when the promotion will be live on Google.com and Shopping ads. If the display time period for promotion promotion_display_time_period attribute is not specified, the promotion effective time period promotion_effective_time_period determines the date and time frame when the promotion will be live on Google.com and Shopping ads.

.google.type.Interval promotion_display_time_period = 26 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value com.google.type.Interval
Returns
Type Description
Attributes.Builder

setPromotionDisplayTimePeriod(Interval.Builder builderForValue)

public Attributes.Builder setPromotionDisplayTimePeriod(Interval.Builder builderForValue)

Optional. TimePeriod representation of the promotion's display dates. This attribute specifies the date and time frame when the promotion will be live on Google.com and Shopping ads. If the display time period for promotion promotion_display_time_period attribute is not specified, the promotion effective time period promotion_effective_time_period determines the date and time frame when the promotion will be live on Google.com and Shopping ads.

.google.type.Interval promotion_display_time_period = 26 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue com.google.type.Interval.Builder
Returns
Type Description
Attributes.Builder

setPromotionEffectiveTimePeriod(Interval value)

public Attributes.Builder setPromotionEffectiveTimePeriod(Interval value)

Required. TimePeriod representation of the promotion's effective dates. This attribute specifies that the promotion can be tested on your online store during this time period.

.google.type.Interval promotion_effective_time_period = 25 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value com.google.type.Interval
Returns
Type Description
Attributes.Builder

setPromotionEffectiveTimePeriod(Interval.Builder builderForValue)

public Attributes.Builder setPromotionEffectiveTimePeriod(Interval.Builder builderForValue)

Required. TimePeriod representation of the promotion's effective dates. This attribute specifies that the promotion can be tested on your online store during this time period.

.google.type.Interval promotion_effective_time_period = 25 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue com.google.type.Interval.Builder
Returns
Type Description
Attributes.Builder

setPromotionUrl(String value)

public Attributes.Builder setPromotionUrl(String value)

Optional. URL to the page on the merchant's site where the promotion shows. Local Inventory ads promotions throw an error if no promotion_url is included. URL is used to confirm that the promotion is valid and can be redeemed.

string promotion_url = 31 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The promotionUrl to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setPromotionUrlBytes(ByteString value)

public Attributes.Builder setPromotionUrlBytes(ByteString value)

Optional. URL to the page on the merchant's site where the promotion shows. Local Inventory ads promotions throw an error if no promotion_url is included. URL is used to confirm that the promotion is valid and can be redeemed.

string promotion_url = 31 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for promotionUrl to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

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

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

setStoreApplicability(StoreApplicability value)

public Attributes.Builder setStoreApplicability(StoreApplicability value)

Optional. Whether the promotion applies to all stores, or only specified stores. Local Inventory ads promotions throw an error if no store applicability is included. An INVALID_ARGUMENT error is thrown if store_applicability is set to ALL_STORES and store_codes_inclusion or score_code_exclusion is set to a value.

.google.shopping.merchant.promotions.v1beta.StoreApplicability store_applicability = 28 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value StoreApplicability

The storeApplicability to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setStoreApplicabilityValue(int value)

public Attributes.Builder setStoreApplicabilityValue(int value)

Optional. Whether the promotion applies to all stores, or only specified stores. Local Inventory ads promotions throw an error if no store applicability is included. An INVALID_ARGUMENT error is thrown if store_applicability is set to ALL_STORES and store_codes_inclusion or score_code_exclusion is set to a value.

.google.shopping.merchant.promotions.v1beta.StoreApplicability store_applicability = 28 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

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

Returns
Type Description
Attributes.Builder

This builder for chaining.

setStoreCodesExclusion(int index, String value)

public Attributes.Builder setStoreCodesExclusion(int index, String value)

Optional. Store codes to exclude for the promotion. The store filter attributes only applies when the store_applicability attribute is set to specific_stores.

repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The storeCodesExclusion to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setStoreCodesInclusion(int index, String value)

public Attributes.Builder setStoreCodesInclusion(int index, String value)

Optional. Store codes to include for the promotion. The store filter attributes only applies when the store_applicability attribute is set to specific_stores.

Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.

repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The storeCodesInclusion to set.

Returns
Type Description
Attributes.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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