com.google.shopping.merchant.promotions.v1beta.Attributes Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-shopping-merchant-promotions-v1beta Show documentation
Show all versions of proto-google-shopping-merchant-promotions-v1beta Show documentation
Proto library for google-shopping-merchant-promotions
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/shopping/merchant/promotions/v1beta/promotions_common.proto
// Protobuf Java Version: 3.25.5
package com.google.shopping.merchant.promotions.v1beta;
/**
*
*
*
* Attributes.
*
*
* Protobuf type {@code google.shopping.merchant.promotions.v1beta.Attributes}
*/
public final class Attributes extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.shopping.merchant.promotions.v1beta.Attributes)
AttributesOrBuilder {
private static final long serialVersionUID = 0L;
// Use Attributes.newBuilder() to construct.
private Attributes(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Attributes() {
productApplicability_ = 0;
offerType_ = 0;
genericRedemptionCode_ = "";
longTitle_ = "";
couponValueType_ = 0;
promotionDestinations_ = java.util.Collections.emptyList();
itemIdInclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
brandInclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
itemGroupIdInclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
productTypeInclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
itemIdExclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
brandExclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
itemGroupIdExclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
productTypeExclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
freeGiftDescription_ = "";
freeGiftItemId_ = "";
storeApplicability_ = 0;
storeCodesInclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
storeCodesExclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
promotionUrl_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Attributes();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.shopping.merchant.promotions.v1beta.PromotionsCommonProto
.internal_static_google_shopping_merchant_promotions_v1beta_Attributes_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.shopping.merchant.promotions.v1beta.PromotionsCommonProto
.internal_static_google_shopping_merchant_promotions_v1beta_Attributes_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.shopping.merchant.promotions.v1beta.Attributes.class,
com.google.shopping.merchant.promotions.v1beta.Attributes.Builder.class);
}
private int bitField0_;
public static final int PRODUCT_APPLICABILITY_FIELD_NUMBER = 1;
private int productApplicability_ = 0;
/**
*
*
*
* Required. Applicability of the promotion to either all products or
* [only specific
* products](https://support.google.com/merchants/answer/6396257?ref_topic=6396150&sjid=17642868584668136159-NC).
*
*
*
* .google.shopping.merchant.promotions.v1beta.ProductApplicability product_applicability = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for productApplicability.
*/
@java.lang.Override
public int getProductApplicabilityValue() {
return productApplicability_;
}
/**
*
*
*
* Required. Applicability of the promotion to either all products or
* [only specific
* products](https://support.google.com/merchants/answer/6396257?ref_topic=6396150&sjid=17642868584668136159-NC).
*
*
*
* .google.shopping.merchant.promotions.v1beta.ProductApplicability product_applicability = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The productApplicability.
*/
@java.lang.Override
public com.google.shopping.merchant.promotions.v1beta.ProductApplicability
getProductApplicability() {
com.google.shopping.merchant.promotions.v1beta.ProductApplicability result =
com.google.shopping.merchant.promotions.v1beta.ProductApplicability.forNumber(
productApplicability_);
return result == null
? com.google.shopping.merchant.promotions.v1beta.ProductApplicability.UNRECOGNIZED
: result;
}
public static final int OFFER_TYPE_FIELD_NUMBER = 2;
private int offerType_ = 0;
/**
*
*
*
* Required.
* [Type](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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];
*
*
* @return The enum numeric value on the wire for offerType.
*/
@java.lang.Override
public int getOfferTypeValue() {
return offerType_;
}
/**
*
*
*
* Required.
* [Type](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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];
*
*
* @return The offerType.
*/
@java.lang.Override
public com.google.shopping.merchant.promotions.v1beta.OfferType getOfferType() {
com.google.shopping.merchant.promotions.v1beta.OfferType result =
com.google.shopping.merchant.promotions.v1beta.OfferType.forNumber(offerType_);
return result == null
? com.google.shopping.merchant.promotions.v1beta.OfferType.UNRECOGNIZED
: result;
}
public static final int GENERIC_REDEMPTION_CODE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object genericRedemptionCode_ = "";
/**
*
*
*
* Optional. Generic redemption code for the promotion. To be used with the
* `offerType` field and must meet the [minimum
* requirements](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* string generic_redemption_code = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The genericRedemptionCode.
*/
@java.lang.Override
public java.lang.String getGenericRedemptionCode() {
java.lang.Object ref = genericRedemptionCode_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
genericRedemptionCode_ = s;
return s;
}
}
/**
*
*
*
* Optional. Generic redemption code for the promotion. To be used with the
* `offerType` field and must meet the [minimum
* requirements](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* string generic_redemption_code = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for genericRedemptionCode.
*/
@java.lang.Override
public com.google.protobuf.ByteString getGenericRedemptionCodeBytes() {
java.lang.Object ref = genericRedemptionCode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
genericRedemptionCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LONG_TITLE_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object longTitle_ = "";
/**
*
*
*
* Required. [Long
* title](https://support.google.com/merchants/answer/13838102?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string long_title = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The longTitle.
*/
@java.lang.Override
public java.lang.String getLongTitle() {
java.lang.Object ref = longTitle_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
longTitle_ = s;
return s;
}
}
/**
*
*
*
* Required. [Long
* title](https://support.google.com/merchants/answer/13838102?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string long_title = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for longTitle.
*/
@java.lang.Override
public com.google.protobuf.ByteString getLongTitleBytes() {
java.lang.Object ref = longTitle_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
longTitle_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int COUPON_VALUE_TYPE_FIELD_NUMBER = 5;
private int couponValueType_ = 0;
/**
*
*
*
* Required. The [coupon value type]
* (https://support.google.com/merchants/answer/13861986?ref_topic=13773355&sjid=17642868584668136159-NC)
* attribute to signal the type of promotion that you are running. Depending
* on type of the selected coupon value [some attributes are
* required](https://support.google.com/merchants/answer/6393006?ref_topic=7322920).
*
*
*
* .google.shopping.merchant.promotions.v1beta.CouponValueType coupon_value_type = 5 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for couponValueType.
*/
@java.lang.Override
public int getCouponValueTypeValue() {
return couponValueType_;
}
/**
*
*
*
* Required. The [coupon value type]
* (https://support.google.com/merchants/answer/13861986?ref_topic=13773355&sjid=17642868584668136159-NC)
* attribute to signal the type of promotion that you are running. Depending
* on type of the selected coupon value [some attributes are
* required](https://support.google.com/merchants/answer/6393006?ref_topic=7322920).
*
*
*
* .google.shopping.merchant.promotions.v1beta.CouponValueType coupon_value_type = 5 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The couponValueType.
*/
@java.lang.Override
public com.google.shopping.merchant.promotions.v1beta.CouponValueType getCouponValueType() {
com.google.shopping.merchant.promotions.v1beta.CouponValueType result =
com.google.shopping.merchant.promotions.v1beta.CouponValueType.forNumber(couponValueType_);
return result == null
? com.google.shopping.merchant.promotions.v1beta.CouponValueType.UNRECOGNIZED
: result;
}
public static final int PROMOTION_DESTINATIONS_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private java.util.List promotionDestinations_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.google.shopping.type.Destination.DestinationEnum>
promotionDestinations_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.google.shopping.type.Destination.DestinationEnum>() {
public com.google.shopping.type.Destination.DestinationEnum convert(
java.lang.Integer from) {
com.google.shopping.type.Destination.DestinationEnum result =
com.google.shopping.type.Destination.DestinationEnum.forNumber(from);
return result == null
? com.google.shopping.type.Destination.DestinationEnum.UNRECOGNIZED
: result;
}
};
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC)
*
*
*
* repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return A list containing the promotionDestinations.
*/
@java.lang.Override
public java.util.List
getPromotionDestinationsList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.google.shopping.type.Destination.DestinationEnum>(
promotionDestinations_, promotionDestinations_converter_);
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC)
*
*
*
* repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The count of promotionDestinations.
*/
@java.lang.Override
public int getPromotionDestinationsCount() {
return promotionDestinations_.size();
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC)
*
*
*
* repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param index The index of the element to return.
* @return The promotionDestinations at the given index.
*/
@java.lang.Override
public com.google.shopping.type.Destination.DestinationEnum getPromotionDestinations(int index) {
return promotionDestinations_converter_.convert(promotionDestinations_.get(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](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC)
*
*
*
* repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return A list containing the enum numeric values on the wire for promotionDestinations.
*/
@java.lang.Override
public java.util.List getPromotionDestinationsValueList() {
return promotionDestinations_;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC)
*
*
*
* repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param index The index of the value to return.
* @return The enum numeric value on the wire of promotionDestinations at the given index.
*/
@java.lang.Override
public int getPromotionDestinationsValue(int index) {
return promotionDestinations_.get(index);
}
private int promotionDestinationsMemoizedSerializedSize;
public static final int ITEM_ID_INCLUSION_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList itemIdInclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Optional. Product filter by [item
* ID](https://support.google.com/merchants/answer/13861565?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the itemIdInclusion.
*/
public com.google.protobuf.ProtocolStringList getItemIdInclusionList() {
return itemIdInclusion_;
}
/**
*
*
*
* Optional. Product filter by [item
* ID](https://support.google.com/merchants/answer/13861565?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of itemIdInclusion.
*/
public int getItemIdInclusionCount() {
return itemIdInclusion_.size();
}
/**
*
*
*
* Optional. Product filter by [item
* ID](https://support.google.com/merchants/answer/13861565?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The itemIdInclusion at the given index.
*/
public java.lang.String getItemIdInclusion(int index) {
return itemIdInclusion_.get(index);
}
/**
*
*
*
* Optional. Product filter by [item
* ID](https://support.google.com/merchants/answer/13861565?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the itemIdInclusion at the given index.
*/
public com.google.protobuf.ByteString getItemIdInclusionBytes(int index) {
return itemIdInclusion_.getByteString(index);
}
public static final int BRAND_INCLUSION_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList brandInclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the brandInclusion.
*/
public com.google.protobuf.ProtocolStringList getBrandInclusionList() {
return brandInclusion_;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of brandInclusion.
*/
public int getBrandInclusionCount() {
return brandInclusion_.size();
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The brandInclusion at the given index.
*/
public java.lang.String getBrandInclusion(int index) {
return brandInclusion_.get(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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the brandInclusion at the given index.
*/
public com.google.protobuf.ByteString getBrandInclusionBytes(int index) {
return brandInclusion_.getByteString(index);
}
public static final int ITEM_GROUP_ID_INCLUSION_FIELD_NUMBER = 9;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList itemGroupIdInclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return A list containing the itemGroupIdInclusion.
*/
public com.google.protobuf.ProtocolStringList getItemGroupIdInclusionList() {
return itemGroupIdInclusion_;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The count of itemGroupIdInclusion.
*/
public int getItemGroupIdInclusionCount() {
return itemGroupIdInclusion_.size();
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the element to return.
* @return The itemGroupIdInclusion at the given index.
*/
public java.lang.String getItemGroupIdInclusion(int index) {
return itemGroupIdInclusion_.get(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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the value to return.
* @return The bytes of the itemGroupIdInclusion at the given index.
*/
public com.google.protobuf.ByteString getItemGroupIdInclusionBytes(int index) {
return itemGroupIdInclusion_.getByteString(index);
}
public static final int PRODUCT_TYPE_INCLUSION_FIELD_NUMBER = 10;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList productTypeInclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return A list containing the productTypeInclusion.
*/
public com.google.protobuf.ProtocolStringList getProductTypeInclusionList() {
return productTypeInclusion_;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The count of productTypeInclusion.
*/
public int getProductTypeInclusionCount() {
return productTypeInclusion_.size();
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the element to return.
* @return The productTypeInclusion at the given index.
*/
public java.lang.String getProductTypeInclusion(int index) {
return productTypeInclusion_.get(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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the value to return.
* @return The bytes of the productTypeInclusion at the given index.
*/
public com.google.protobuf.ByteString getProductTypeInclusionBytes(int index) {
return productTypeInclusion_.getByteString(index);
}
public static final int ITEM_ID_EXCLUSION_FIELD_NUMBER = 11;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList itemIdExclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Optional. Product filter by [item ID
* exclusion](https://support.google.com/merchants/answer/13863524?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the itemIdExclusion.
*/
public com.google.protobuf.ProtocolStringList getItemIdExclusionList() {
return itemIdExclusion_;
}
/**
*
*
*
* Optional. Product filter by [item ID
* exclusion](https://support.google.com/merchants/answer/13863524?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of itemIdExclusion.
*/
public int getItemIdExclusionCount() {
return itemIdExclusion_.size();
}
/**
*
*
*
* Optional. Product filter by [item ID
* exclusion](https://support.google.com/merchants/answer/13863524?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The itemIdExclusion at the given index.
*/
public java.lang.String getItemIdExclusion(int index) {
return itemIdExclusion_.get(index);
}
/**
*
*
*
* Optional. Product filter by [item ID
* exclusion](https://support.google.com/merchants/answer/13863524?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the itemIdExclusion at the given index.
*/
public com.google.protobuf.ByteString getItemIdExclusionBytes(int index) {
return itemIdExclusion_.getByteString(index);
}
public static final int BRAND_EXCLUSION_FIELD_NUMBER = 12;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList brandExclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Optional. Product filter by [brand
* exclusion](https://support.google.com/merchants/answer/13861679?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the brandExclusion.
*/
public com.google.protobuf.ProtocolStringList getBrandExclusionList() {
return brandExclusion_;
}
/**
*
*
*
* Optional. Product filter by [brand
* exclusion](https://support.google.com/merchants/answer/13861679?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of brandExclusion.
*/
public int getBrandExclusionCount() {
return brandExclusion_.size();
}
/**
*
*
*
* Optional. Product filter by [brand
* exclusion](https://support.google.com/merchants/answer/13861679?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The brandExclusion at the given index.
*/
public java.lang.String getBrandExclusion(int index) {
return brandExclusion_.get(index);
}
/**
*
*
*
* Optional. Product filter by [brand
* exclusion](https://support.google.com/merchants/answer/13861679?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the brandExclusion at the given index.
*/
public com.google.protobuf.ByteString getBrandExclusionBytes(int index) {
return brandExclusion_.getByteString(index);
}
public static final int ITEM_GROUP_ID_EXCLUSION_FIELD_NUMBER = 13;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList itemGroupIdExclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Optional. Product filter by [item group
* ID](https://support.google.com/merchants/answer/13837298?ref_topic=13773355&sjid=17642868584668136159-NC).
* The product filter attributes only applies when the products eligible for
* promotion product applicability `product_applicability` attribute is set to
* [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
* exclusion for the promotion.
*
*
* repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return A list containing the itemGroupIdExclusion.
*/
public com.google.protobuf.ProtocolStringList getItemGroupIdExclusionList() {
return itemGroupIdExclusion_;
}
/**
*
*
*
* Optional. Product filter by [item group
* ID](https://support.google.com/merchants/answer/13837298?ref_topic=13773355&sjid=17642868584668136159-NC).
* The product filter attributes only applies when the products eligible for
* promotion product applicability `product_applicability` attribute is set to
* [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
* exclusion for the promotion.
*
*
* repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The count of itemGroupIdExclusion.
*/
public int getItemGroupIdExclusionCount() {
return itemGroupIdExclusion_.size();
}
/**
*
*
*
* Optional. Product filter by [item group
* ID](https://support.google.com/merchants/answer/13837298?ref_topic=13773355&sjid=17642868584668136159-NC).
* The product filter attributes only applies when the products eligible for
* promotion product applicability `product_applicability` attribute is set to
* [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
* exclusion for the promotion.
*
*
* repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the element to return.
* @return The itemGroupIdExclusion at the given index.
*/
public java.lang.String getItemGroupIdExclusion(int index) {
return itemGroupIdExclusion_.get(index);
}
/**
*
*
*
* Optional. Product filter by [item group
* ID](https://support.google.com/merchants/answer/13837298?ref_topic=13773355&sjid=17642868584668136159-NC).
* The product filter attributes only applies when the products eligible for
* promotion product applicability `product_applicability` attribute is set to
* [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
* exclusion for the promotion.
*
*
* repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the value to return.
* @return The bytes of the itemGroupIdExclusion at the given index.
*/
public com.google.protobuf.ByteString getItemGroupIdExclusionBytes(int index) {
return itemGroupIdExclusion_.getByteString(index);
}
public static final int PRODUCT_TYPE_EXCLUSION_FIELD_NUMBER = 14;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList productTypeExclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Optional. Product filter by [product type
* exclusion](https://support.google.com/merchants/answer/13863746?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return A list containing the productTypeExclusion.
*/
public com.google.protobuf.ProtocolStringList getProductTypeExclusionList() {
return productTypeExclusion_;
}
/**
*
*
*
* Optional. Product filter by [product type
* exclusion](https://support.google.com/merchants/answer/13863746?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The count of productTypeExclusion.
*/
public int getProductTypeExclusionCount() {
return productTypeExclusion_.size();
}
/**
*
*
*
* Optional. Product filter by [product type
* exclusion](https://support.google.com/merchants/answer/13863746?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the element to return.
* @return The productTypeExclusion at the given index.
*/
public java.lang.String getProductTypeExclusion(int index) {
return productTypeExclusion_.get(index);
}
/**
*
*
*
* Optional. Product filter by [product type
* exclusion](https://support.google.com/merchants/answer/13863746?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the value to return.
* @return The bytes of the productTypeExclusion at the given index.
*/
public com.google.protobuf.ByteString getProductTypeExclusionBytes(int index) {
return productTypeExclusion_.getByteString(index);
}
public static final int MINIMUM_PURCHASE_AMOUNT_FIELD_NUMBER = 15;
private com.google.shopping.type.Price minimumPurchaseAmount_;
/**
*
*
*
* Optional. [Minimum purchase
* amount](https://support.google.com/merchants/answer/13837705?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the minimumPurchaseAmount field is set.
*/
@java.lang.Override
public boolean hasMinimumPurchaseAmount() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Optional. [Minimum purchase
* amount](https://support.google.com/merchants/answer/13837705?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The minimumPurchaseAmount.
*/
@java.lang.Override
public com.google.shopping.type.Price getMinimumPurchaseAmount() {
return minimumPurchaseAmount_ == null
? com.google.shopping.type.Price.getDefaultInstance()
: minimumPurchaseAmount_;
}
/**
*
*
*
* Optional. [Minimum purchase
* amount](https://support.google.com/merchants/answer/13837705?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.shopping.type.PriceOrBuilder getMinimumPurchaseAmountOrBuilder() {
return minimumPurchaseAmount_ == null
? com.google.shopping.type.Price.getDefaultInstance()
: minimumPurchaseAmount_;
}
public static final int MINIMUM_PURCHASE_QUANTITY_FIELD_NUMBER = 16;
private long minimumPurchaseQuantity_ = 0L;
/**
*
*
*
* Optional. [Minimum purchase
* quantity](https://support.google.com/merchants/answer/13838182?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* int64 minimum_purchase_quantity = 16 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The minimumPurchaseQuantity.
*/
@java.lang.Override
public long getMinimumPurchaseQuantity() {
return minimumPurchaseQuantity_;
}
public static final int LIMIT_QUANTITY_FIELD_NUMBER = 17;
private long limitQuantity_ = 0L;
/**
*
*
*
* Optional. [Maximum purchase
* quantity](https://support.google.com/merchants/answer/13861564?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* int64 limit_quantity = 17 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The limitQuantity.
*/
@java.lang.Override
public long getLimitQuantity() {
return limitQuantity_;
}
public static final int LIMIT_VALUE_FIELD_NUMBER = 18;
private com.google.shopping.type.Price limitValue_;
/**
*
*
*
* Optional. [Maximum product
* price](https://support.google.com/merchants/answer/2906014) for
* promotion.
*
*
* .google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the limitValue field is set.
*/
@java.lang.Override
public boolean hasLimitValue() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Optional. [Maximum product
* price](https://support.google.com/merchants/answer/2906014) for
* promotion.
*
*
* .google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The limitValue.
*/
@java.lang.Override
public com.google.shopping.type.Price getLimitValue() {
return limitValue_ == null ? com.google.shopping.type.Price.getDefaultInstance() : limitValue_;
}
/**
*
*
*
* Optional. [Maximum product
* price](https://support.google.com/merchants/answer/2906014) for
* promotion.
*
*
* .google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.shopping.type.PriceOrBuilder getLimitValueOrBuilder() {
return limitValue_ == null ? com.google.shopping.type.Price.getDefaultInstance() : limitValue_;
}
public static final int PERCENT_OFF_FIELD_NUMBER = 19;
private long percentOff_ = 0L;
/**
*
*
*
* Optional. The [percentage
* discount](https://support.google.com/merchants/answer/13837404?sjid=17642868584668136159-NC)
* offered in the promotion.
*
*
* int64 percent_off = 19 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The percentOff.
*/
@java.lang.Override
public long getPercentOff() {
return percentOff_;
}
public static final int MONEY_OFF_AMOUNT_FIELD_NUMBER = 20;
private com.google.shopping.type.Price moneyOffAmount_;
/**
*
*
*
* Optional. The [money off
* amount](https://support.google.com/merchants/answer/13838101?ref_topic=13773355&sjid=17642868584668136159-NC)
* offered in the promotion.
*
*
*
* .google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the moneyOffAmount field is set.
*/
@java.lang.Override
public boolean hasMoneyOffAmount() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Optional. The [money off
* amount](https://support.google.com/merchants/answer/13838101?ref_topic=13773355&sjid=17642868584668136159-NC)
* offered in the promotion.
*
*
*
* .google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The moneyOffAmount.
*/
@java.lang.Override
public com.google.shopping.type.Price getMoneyOffAmount() {
return moneyOffAmount_ == null
? com.google.shopping.type.Price.getDefaultInstance()
: moneyOffAmount_;
}
/**
*
*
*
* Optional. The [money off
* amount](https://support.google.com/merchants/answer/13838101?ref_topic=13773355&sjid=17642868584668136159-NC)
* offered in the promotion.
*
*
*
* .google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.shopping.type.PriceOrBuilder getMoneyOffAmountOrBuilder() {
return moneyOffAmount_ == null
? com.google.shopping.type.Price.getDefaultInstance()
: moneyOffAmount_;
}
public static final int GET_THIS_QUANTITY_DISCOUNTED_FIELD_NUMBER = 21;
private long getThisQuantityDiscounted_ = 0L;
/**
*
*
*
* 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];
*
* @return The getThisQuantityDiscounted.
*/
@java.lang.Override
public long getGetThisQuantityDiscounted() {
return getThisQuantityDiscounted_;
}
public static final int FREE_GIFT_VALUE_FIELD_NUMBER = 22;
private com.google.shopping.type.Price freeGiftValue_;
/**
*
*
*
* Optional. [Free gift
* value](https://support.google.com/merchants/answer/13844477?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the freeGiftValue field is set.
*/
@java.lang.Override
public boolean hasFreeGiftValue() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Optional. [Free gift
* value](https://support.google.com/merchants/answer/13844477?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The freeGiftValue.
*/
@java.lang.Override
public com.google.shopping.type.Price getFreeGiftValue() {
return freeGiftValue_ == null
? com.google.shopping.type.Price.getDefaultInstance()
: freeGiftValue_;
}
/**
*
*
*
* Optional. [Free gift
* value](https://support.google.com/merchants/answer/13844477?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.shopping.type.PriceOrBuilder getFreeGiftValueOrBuilder() {
return freeGiftValue_ == null
? com.google.shopping.type.Price.getDefaultInstance()
: freeGiftValue_;
}
public static final int FREE_GIFT_DESCRIPTION_FIELD_NUMBER = 23;
@SuppressWarnings("serial")
private volatile java.lang.Object freeGiftDescription_ = "";
/**
*
*
*
* Optional. [Free gift
* description](https://support.google.com/merchants/answer/13847245?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string free_gift_description = 23 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The freeGiftDescription.
*/
@java.lang.Override
public java.lang.String getFreeGiftDescription() {
java.lang.Object ref = freeGiftDescription_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
freeGiftDescription_ = s;
return s;
}
}
/**
*
*
*
* Optional. [Free gift
* description](https://support.google.com/merchants/answer/13847245?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string free_gift_description = 23 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for freeGiftDescription.
*/
@java.lang.Override
public com.google.protobuf.ByteString getFreeGiftDescriptionBytes() {
java.lang.Object ref = freeGiftDescription_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
freeGiftDescription_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FREE_GIFT_ITEM_ID_FIELD_NUMBER = 24;
@SuppressWarnings("serial")
private volatile java.lang.Object freeGiftItemId_ = "";
/**
*
*
*
* Optional. [Free gift item
* ID](https://support.google.com/merchants/answer/13857152?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string free_gift_item_id = 24 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The freeGiftItemId.
*/
@java.lang.Override
public java.lang.String getFreeGiftItemId() {
java.lang.Object ref = freeGiftItemId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
freeGiftItemId_ = s;
return s;
}
}
/**
*
*
*
* Optional. [Free gift item
* ID](https://support.google.com/merchants/answer/13857152?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string free_gift_item_id = 24 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for freeGiftItemId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getFreeGiftItemIdBytes() {
java.lang.Object ref = freeGiftItemId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
freeGiftItemId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PROMOTION_EFFECTIVE_TIME_PERIOD_FIELD_NUMBER = 25;
private com.google.type.Interval promotionEffectiveTimePeriod_;
/**
*
*
*
* 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];
*
*
* @return Whether the promotionEffectiveTimePeriod field is set.
*/
@java.lang.Override
public boolean hasPromotionEffectiveTimePeriod() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* 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];
*
*
* @return The promotionEffectiveTimePeriod.
*/
@java.lang.Override
public com.google.type.Interval getPromotionEffectiveTimePeriod() {
return promotionEffectiveTimePeriod_ == null
? com.google.type.Interval.getDefaultInstance()
: promotionEffectiveTimePeriod_;
}
/**
*
*
*
* 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];
*
*/
@java.lang.Override
public com.google.type.IntervalOrBuilder getPromotionEffectiveTimePeriodOrBuilder() {
return promotionEffectiveTimePeriod_ == null
? com.google.type.Interval.getDefaultInstance()
: promotionEffectiveTimePeriod_;
}
public static final int PROMOTION_DISPLAY_TIME_PERIOD_FIELD_NUMBER = 26;
private com.google.type.Interval promotionDisplayTimePeriod_;
/**
*
*
*
* 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];
*
*
* @return Whether the promotionDisplayTimePeriod field is set.
*/
@java.lang.Override
public boolean hasPromotionDisplayTimePeriod() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* 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];
*
*
* @return The promotionDisplayTimePeriod.
*/
@java.lang.Override
public com.google.type.Interval getPromotionDisplayTimePeriod() {
return promotionDisplayTimePeriod_ == null
? com.google.type.Interval.getDefaultInstance()
: promotionDisplayTimePeriod_;
}
/**
*
*
*
* 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];
*
*/
@java.lang.Override
public com.google.type.IntervalOrBuilder getPromotionDisplayTimePeriodOrBuilder() {
return promotionDisplayTimePeriod_ == null
? com.google.type.Interval.getDefaultInstance()
: promotionDisplayTimePeriod_;
}
public static final int STORE_APPLICABILITY_FIELD_NUMBER = 28;
private int storeApplicability_ = 0;
/**
*
*
*
* Optional. Whether the promotion applies to [all stores, or only specified
* stores](https://support.google.com/merchants/answer/13857563?sjid=17642868584668136159-NC).
* 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];
*
*
* @return The enum numeric value on the wire for storeApplicability.
*/
@java.lang.Override
public int getStoreApplicabilityValue() {
return storeApplicability_;
}
/**
*
*
*
* Optional. Whether the promotion applies to [all stores, or only specified
* stores](https://support.google.com/merchants/answer/13857563?sjid=17642868584668136159-NC).
* 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];
*
*
* @return The storeApplicability.
*/
@java.lang.Override
public com.google.shopping.merchant.promotions.v1beta.StoreApplicability getStoreApplicability() {
com.google.shopping.merchant.promotions.v1beta.StoreApplicability result =
com.google.shopping.merchant.promotions.v1beta.StoreApplicability.forNumber(
storeApplicability_);
return result == null
? com.google.shopping.merchant.promotions.v1beta.StoreApplicability.UNRECOGNIZED
: result;
}
public static final int STORE_CODES_INCLUSION_FIELD_NUMBER = 29;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList storeCodesInclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Optional. [Store codes to
* include](https://support.google.com/merchants/answer/13857470?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
* 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](https://support.google.com/merchants/answer/3061342) for
* more information.
*
*
* repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return A list containing the storeCodesInclusion.
*/
public com.google.protobuf.ProtocolStringList getStoreCodesInclusionList() {
return storeCodesInclusion_;
}
/**
*
*
*
* Optional. [Store codes to
* include](https://support.google.com/merchants/answer/13857470?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
* 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](https://support.google.com/merchants/answer/3061342) for
* more information.
*
*
* repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The count of storeCodesInclusion.
*/
public int getStoreCodesInclusionCount() {
return storeCodesInclusion_.size();
}
/**
*
*
*
* Optional. [Store codes to
* include](https://support.google.com/merchants/answer/13857470?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
* 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](https://support.google.com/merchants/answer/3061342) for
* more information.
*
*
* repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the element to return.
* @return The storeCodesInclusion at the given index.
*/
public java.lang.String getStoreCodesInclusion(int index) {
return storeCodesInclusion_.get(index);
}
/**
*
*
*
* Optional. [Store codes to
* include](https://support.google.com/merchants/answer/13857470?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
* 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](https://support.google.com/merchants/answer/3061342) for
* more information.
*
*
* repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the value to return.
* @return The bytes of the storeCodesInclusion at the given index.
*/
public com.google.protobuf.ByteString getStoreCodesInclusionBytes(int index) {
return storeCodesInclusion_.getByteString(index);
}
public static final int STORE_CODES_EXCLUSION_FIELD_NUMBER = 30;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList storeCodesExclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Optional. [Store codes to
* exclude](https://support.google.com/merchants/answer/13859586?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return A list containing the storeCodesExclusion.
*/
public com.google.protobuf.ProtocolStringList getStoreCodesExclusionList() {
return storeCodesExclusion_;
}
/**
*
*
*
* Optional. [Store codes to
* exclude](https://support.google.com/merchants/answer/13859586?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The count of storeCodesExclusion.
*/
public int getStoreCodesExclusionCount() {
return storeCodesExclusion_.size();
}
/**
*
*
*
* Optional. [Store codes to
* exclude](https://support.google.com/merchants/answer/13859586?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the element to return.
* @return The storeCodesExclusion at the given index.
*/
public java.lang.String getStoreCodesExclusion(int index) {
return storeCodesExclusion_.get(index);
}
/**
*
*
*
* Optional. [Store codes to
* exclude](https://support.google.com/merchants/answer/13859586?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the value to return.
* @return The bytes of the storeCodesExclusion at the given index.
*/
public com.google.protobuf.ByteString getStoreCodesExclusionBytes(int index) {
return storeCodesExclusion_.getByteString(index);
}
public static final int PROMOTION_URL_FIELD_NUMBER = 31;
@SuppressWarnings("serial")
private volatile java.lang.Object promotionUrl_ = "";
/**
*
*
*
* 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];
*
* @return The promotionUrl.
*/
@java.lang.Override
public java.lang.String getPromotionUrl() {
java.lang.Object ref = promotionUrl_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
promotionUrl_ = s;
return s;
}
}
/**
*
*
*
* 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];
*
* @return The bytes for promotionUrl.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPromotionUrlBytes() {
java.lang.Object ref = promotionUrl_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
promotionUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
getSerializedSize();
if (productApplicability_
!= com.google.shopping.merchant.promotions.v1beta.ProductApplicability
.PRODUCT_APPLICABILITY_UNSPECIFIED
.getNumber()) {
output.writeEnum(1, productApplicability_);
}
if (offerType_
!= com.google.shopping.merchant.promotions.v1beta.OfferType.OFFER_TYPE_UNSPECIFIED
.getNumber()) {
output.writeEnum(2, offerType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(genericRedemptionCode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, genericRedemptionCode_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longTitle_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, longTitle_);
}
if (couponValueType_
!= com.google.shopping.merchant.promotions.v1beta.CouponValueType
.COUPON_VALUE_TYPE_UNSPECIFIED
.getNumber()) {
output.writeEnum(5, couponValueType_);
}
if (getPromotionDestinationsList().size() > 0) {
output.writeUInt32NoTag(50);
output.writeUInt32NoTag(promotionDestinationsMemoizedSerializedSize);
}
for (int i = 0; i < promotionDestinations_.size(); i++) {
output.writeEnumNoTag(promotionDestinations_.get(i));
}
for (int i = 0; i < itemIdInclusion_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, itemIdInclusion_.getRaw(i));
}
for (int i = 0; i < brandInclusion_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, brandInclusion_.getRaw(i));
}
for (int i = 0; i < itemGroupIdInclusion_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(
output, 9, itemGroupIdInclusion_.getRaw(i));
}
for (int i = 0; i < productTypeInclusion_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(
output, 10, productTypeInclusion_.getRaw(i));
}
for (int i = 0; i < itemIdExclusion_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, itemIdExclusion_.getRaw(i));
}
for (int i = 0; i < brandExclusion_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, brandExclusion_.getRaw(i));
}
for (int i = 0; i < itemGroupIdExclusion_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(
output, 13, itemGroupIdExclusion_.getRaw(i));
}
for (int i = 0; i < productTypeExclusion_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(
output, 14, productTypeExclusion_.getRaw(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(15, getMinimumPurchaseAmount());
}
if (minimumPurchaseQuantity_ != 0L) {
output.writeInt64(16, minimumPurchaseQuantity_);
}
if (limitQuantity_ != 0L) {
output.writeInt64(17, limitQuantity_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(18, getLimitValue());
}
if (percentOff_ != 0L) {
output.writeInt64(19, percentOff_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(20, getMoneyOffAmount());
}
if (getThisQuantityDiscounted_ != 0L) {
output.writeInt64(21, getThisQuantityDiscounted_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(22, getFreeGiftValue());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(freeGiftDescription_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 23, freeGiftDescription_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(freeGiftItemId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 24, freeGiftItemId_);
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeMessage(25, getPromotionEffectiveTimePeriod());
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeMessage(26, getPromotionDisplayTimePeriod());
}
if (storeApplicability_
!= com.google.shopping.merchant.promotions.v1beta.StoreApplicability
.STORE_APPLICABILITY_UNSPECIFIED
.getNumber()) {
output.writeEnum(28, storeApplicability_);
}
for (int i = 0; i < storeCodesInclusion_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(
output, 29, storeCodesInclusion_.getRaw(i));
}
for (int i = 0; i < storeCodesExclusion_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(
output, 30, storeCodesExclusion_.getRaw(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promotionUrl_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 31, promotionUrl_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (productApplicability_
!= com.google.shopping.merchant.promotions.v1beta.ProductApplicability
.PRODUCT_APPLICABILITY_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, productApplicability_);
}
if (offerType_
!= com.google.shopping.merchant.promotions.v1beta.OfferType.OFFER_TYPE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, offerType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(genericRedemptionCode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, genericRedemptionCode_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longTitle_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, longTitle_);
}
if (couponValueType_
!= com.google.shopping.merchant.promotions.v1beta.CouponValueType
.COUPON_VALUE_TYPE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, couponValueType_);
}
{
int dataSize = 0;
for (int i = 0; i < promotionDestinations_.size(); i++) {
dataSize +=
com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(
promotionDestinations_.get(i));
}
size += dataSize;
if (!getPromotionDestinationsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize);
}
promotionDestinationsMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < itemIdInclusion_.size(); i++) {
dataSize += computeStringSizeNoTag(itemIdInclusion_.getRaw(i));
}
size += dataSize;
size += 1 * getItemIdInclusionList().size();
}
{
int dataSize = 0;
for (int i = 0; i < brandInclusion_.size(); i++) {
dataSize += computeStringSizeNoTag(brandInclusion_.getRaw(i));
}
size += dataSize;
size += 1 * getBrandInclusionList().size();
}
{
int dataSize = 0;
for (int i = 0; i < itemGroupIdInclusion_.size(); i++) {
dataSize += computeStringSizeNoTag(itemGroupIdInclusion_.getRaw(i));
}
size += dataSize;
size += 1 * getItemGroupIdInclusionList().size();
}
{
int dataSize = 0;
for (int i = 0; i < productTypeInclusion_.size(); i++) {
dataSize += computeStringSizeNoTag(productTypeInclusion_.getRaw(i));
}
size += dataSize;
size += 1 * getProductTypeInclusionList().size();
}
{
int dataSize = 0;
for (int i = 0; i < itemIdExclusion_.size(); i++) {
dataSize += computeStringSizeNoTag(itemIdExclusion_.getRaw(i));
}
size += dataSize;
size += 1 * getItemIdExclusionList().size();
}
{
int dataSize = 0;
for (int i = 0; i < brandExclusion_.size(); i++) {
dataSize += computeStringSizeNoTag(brandExclusion_.getRaw(i));
}
size += dataSize;
size += 1 * getBrandExclusionList().size();
}
{
int dataSize = 0;
for (int i = 0; i < itemGroupIdExclusion_.size(); i++) {
dataSize += computeStringSizeNoTag(itemGroupIdExclusion_.getRaw(i));
}
size += dataSize;
size += 1 * getItemGroupIdExclusionList().size();
}
{
int dataSize = 0;
for (int i = 0; i < productTypeExclusion_.size(); i++) {
dataSize += computeStringSizeNoTag(productTypeExclusion_.getRaw(i));
}
size += dataSize;
size += 1 * getProductTypeExclusionList().size();
}
if (((bitField0_ & 0x00000001) != 0)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(15, getMinimumPurchaseAmount());
}
if (minimumPurchaseQuantity_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(16, minimumPurchaseQuantity_);
}
if (limitQuantity_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(17, limitQuantity_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getLimitValue());
}
if (percentOff_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(19, percentOff_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getMoneyOffAmount());
}
if (getThisQuantityDiscounted_ != 0L) {
size +=
com.google.protobuf.CodedOutputStream.computeInt64Size(21, getThisQuantityDiscounted_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, getFreeGiftValue());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(freeGiftDescription_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(23, freeGiftDescription_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(freeGiftItemId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(24, freeGiftItemId_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
25, getPromotionEffectiveTimePeriod());
}
if (((bitField0_ & 0x00000020) != 0)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
26, getPromotionDisplayTimePeriod());
}
if (storeApplicability_
!= com.google.shopping.merchant.promotions.v1beta.StoreApplicability
.STORE_APPLICABILITY_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(28, storeApplicability_);
}
{
int dataSize = 0;
for (int i = 0; i < storeCodesInclusion_.size(); i++) {
dataSize += computeStringSizeNoTag(storeCodesInclusion_.getRaw(i));
}
size += dataSize;
size += 2 * getStoreCodesInclusionList().size();
}
{
int dataSize = 0;
for (int i = 0; i < storeCodesExclusion_.size(); i++) {
dataSize += computeStringSizeNoTag(storeCodesExclusion_.getRaw(i));
}
size += dataSize;
size += 2 * getStoreCodesExclusionList().size();
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promotionUrl_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(31, promotionUrl_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.shopping.merchant.promotions.v1beta.Attributes)) {
return super.equals(obj);
}
com.google.shopping.merchant.promotions.v1beta.Attributes other =
(com.google.shopping.merchant.promotions.v1beta.Attributes) obj;
if (productApplicability_ != other.productApplicability_) return false;
if (offerType_ != other.offerType_) return false;
if (!getGenericRedemptionCode().equals(other.getGenericRedemptionCode())) return false;
if (!getLongTitle().equals(other.getLongTitle())) return false;
if (couponValueType_ != other.couponValueType_) return false;
if (!promotionDestinations_.equals(other.promotionDestinations_)) return false;
if (!getItemIdInclusionList().equals(other.getItemIdInclusionList())) return false;
if (!getBrandInclusionList().equals(other.getBrandInclusionList())) return false;
if (!getItemGroupIdInclusionList().equals(other.getItemGroupIdInclusionList())) return false;
if (!getProductTypeInclusionList().equals(other.getProductTypeInclusionList())) return false;
if (!getItemIdExclusionList().equals(other.getItemIdExclusionList())) return false;
if (!getBrandExclusionList().equals(other.getBrandExclusionList())) return false;
if (!getItemGroupIdExclusionList().equals(other.getItemGroupIdExclusionList())) return false;
if (!getProductTypeExclusionList().equals(other.getProductTypeExclusionList())) return false;
if (hasMinimumPurchaseAmount() != other.hasMinimumPurchaseAmount()) return false;
if (hasMinimumPurchaseAmount()) {
if (!getMinimumPurchaseAmount().equals(other.getMinimumPurchaseAmount())) return false;
}
if (getMinimumPurchaseQuantity() != other.getMinimumPurchaseQuantity()) return false;
if (getLimitQuantity() != other.getLimitQuantity()) return false;
if (hasLimitValue() != other.hasLimitValue()) return false;
if (hasLimitValue()) {
if (!getLimitValue().equals(other.getLimitValue())) return false;
}
if (getPercentOff() != other.getPercentOff()) return false;
if (hasMoneyOffAmount() != other.hasMoneyOffAmount()) return false;
if (hasMoneyOffAmount()) {
if (!getMoneyOffAmount().equals(other.getMoneyOffAmount())) return false;
}
if (getGetThisQuantityDiscounted() != other.getGetThisQuantityDiscounted()) return false;
if (hasFreeGiftValue() != other.hasFreeGiftValue()) return false;
if (hasFreeGiftValue()) {
if (!getFreeGiftValue().equals(other.getFreeGiftValue())) return false;
}
if (!getFreeGiftDescription().equals(other.getFreeGiftDescription())) return false;
if (!getFreeGiftItemId().equals(other.getFreeGiftItemId())) return false;
if (hasPromotionEffectiveTimePeriod() != other.hasPromotionEffectiveTimePeriod()) return false;
if (hasPromotionEffectiveTimePeriod()) {
if (!getPromotionEffectiveTimePeriod().equals(other.getPromotionEffectiveTimePeriod()))
return false;
}
if (hasPromotionDisplayTimePeriod() != other.hasPromotionDisplayTimePeriod()) return false;
if (hasPromotionDisplayTimePeriod()) {
if (!getPromotionDisplayTimePeriod().equals(other.getPromotionDisplayTimePeriod()))
return false;
}
if (storeApplicability_ != other.storeApplicability_) return false;
if (!getStoreCodesInclusionList().equals(other.getStoreCodesInclusionList())) return false;
if (!getStoreCodesExclusionList().equals(other.getStoreCodesExclusionList())) return false;
if (!getPromotionUrl().equals(other.getPromotionUrl())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PRODUCT_APPLICABILITY_FIELD_NUMBER;
hash = (53 * hash) + productApplicability_;
hash = (37 * hash) + OFFER_TYPE_FIELD_NUMBER;
hash = (53 * hash) + offerType_;
hash = (37 * hash) + GENERIC_REDEMPTION_CODE_FIELD_NUMBER;
hash = (53 * hash) + getGenericRedemptionCode().hashCode();
hash = (37 * hash) + LONG_TITLE_FIELD_NUMBER;
hash = (53 * hash) + getLongTitle().hashCode();
hash = (37 * hash) + COUPON_VALUE_TYPE_FIELD_NUMBER;
hash = (53 * hash) + couponValueType_;
if (getPromotionDestinationsCount() > 0) {
hash = (37 * hash) + PROMOTION_DESTINATIONS_FIELD_NUMBER;
hash = (53 * hash) + promotionDestinations_.hashCode();
}
if (getItemIdInclusionCount() > 0) {
hash = (37 * hash) + ITEM_ID_INCLUSION_FIELD_NUMBER;
hash = (53 * hash) + getItemIdInclusionList().hashCode();
}
if (getBrandInclusionCount() > 0) {
hash = (37 * hash) + BRAND_INCLUSION_FIELD_NUMBER;
hash = (53 * hash) + getBrandInclusionList().hashCode();
}
if (getItemGroupIdInclusionCount() > 0) {
hash = (37 * hash) + ITEM_GROUP_ID_INCLUSION_FIELD_NUMBER;
hash = (53 * hash) + getItemGroupIdInclusionList().hashCode();
}
if (getProductTypeInclusionCount() > 0) {
hash = (37 * hash) + PRODUCT_TYPE_INCLUSION_FIELD_NUMBER;
hash = (53 * hash) + getProductTypeInclusionList().hashCode();
}
if (getItemIdExclusionCount() > 0) {
hash = (37 * hash) + ITEM_ID_EXCLUSION_FIELD_NUMBER;
hash = (53 * hash) + getItemIdExclusionList().hashCode();
}
if (getBrandExclusionCount() > 0) {
hash = (37 * hash) + BRAND_EXCLUSION_FIELD_NUMBER;
hash = (53 * hash) + getBrandExclusionList().hashCode();
}
if (getItemGroupIdExclusionCount() > 0) {
hash = (37 * hash) + ITEM_GROUP_ID_EXCLUSION_FIELD_NUMBER;
hash = (53 * hash) + getItemGroupIdExclusionList().hashCode();
}
if (getProductTypeExclusionCount() > 0) {
hash = (37 * hash) + PRODUCT_TYPE_EXCLUSION_FIELD_NUMBER;
hash = (53 * hash) + getProductTypeExclusionList().hashCode();
}
if (hasMinimumPurchaseAmount()) {
hash = (37 * hash) + MINIMUM_PURCHASE_AMOUNT_FIELD_NUMBER;
hash = (53 * hash) + getMinimumPurchaseAmount().hashCode();
}
hash = (37 * hash) + MINIMUM_PURCHASE_QUANTITY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinimumPurchaseQuantity());
hash = (37 * hash) + LIMIT_QUANTITY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLimitQuantity());
if (hasLimitValue()) {
hash = (37 * hash) + LIMIT_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getLimitValue().hashCode();
}
hash = (37 * hash) + PERCENT_OFF_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPercentOff());
if (hasMoneyOffAmount()) {
hash = (37 * hash) + MONEY_OFF_AMOUNT_FIELD_NUMBER;
hash = (53 * hash) + getMoneyOffAmount().hashCode();
}
hash = (37 * hash) + GET_THIS_QUANTITY_DISCOUNTED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGetThisQuantityDiscounted());
if (hasFreeGiftValue()) {
hash = (37 * hash) + FREE_GIFT_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getFreeGiftValue().hashCode();
}
hash = (37 * hash) + FREE_GIFT_DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getFreeGiftDescription().hashCode();
hash = (37 * hash) + FREE_GIFT_ITEM_ID_FIELD_NUMBER;
hash = (53 * hash) + getFreeGiftItemId().hashCode();
if (hasPromotionEffectiveTimePeriod()) {
hash = (37 * hash) + PROMOTION_EFFECTIVE_TIME_PERIOD_FIELD_NUMBER;
hash = (53 * hash) + getPromotionEffectiveTimePeriod().hashCode();
}
if (hasPromotionDisplayTimePeriod()) {
hash = (37 * hash) + PROMOTION_DISPLAY_TIME_PERIOD_FIELD_NUMBER;
hash = (53 * hash) + getPromotionDisplayTimePeriod().hashCode();
}
hash = (37 * hash) + STORE_APPLICABILITY_FIELD_NUMBER;
hash = (53 * hash) + storeApplicability_;
if (getStoreCodesInclusionCount() > 0) {
hash = (37 * hash) + STORE_CODES_INCLUSION_FIELD_NUMBER;
hash = (53 * hash) + getStoreCodesInclusionList().hashCode();
}
if (getStoreCodesExclusionCount() > 0) {
hash = (37 * hash) + STORE_CODES_EXCLUSION_FIELD_NUMBER;
hash = (53 * hash) + getStoreCodesExclusionList().hashCode();
}
hash = (37 * hash) + PROMOTION_URL_FIELD_NUMBER;
hash = (53 * hash) + getPromotionUrl().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.shopping.merchant.promotions.v1beta.Attributes parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.shopping.merchant.promotions.v1beta.Attributes parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.shopping.merchant.promotions.v1beta.Attributes parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.shopping.merchant.promotions.v1beta.Attributes parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.shopping.merchant.promotions.v1beta.Attributes parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.shopping.merchant.promotions.v1beta.Attributes parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.shopping.merchant.promotions.v1beta.Attributes parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.shopping.merchant.promotions.v1beta.Attributes parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.shopping.merchant.promotions.v1beta.Attributes parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.shopping.merchant.promotions.v1beta.Attributes parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.shopping.merchant.promotions.v1beta.Attributes parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.shopping.merchant.promotions.v1beta.Attributes parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.shopping.merchant.promotions.v1beta.Attributes prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Attributes.
*
*
* Protobuf type {@code google.shopping.merchant.promotions.v1beta.Attributes}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.shopping.merchant.promotions.v1beta.Attributes)
com.google.shopping.merchant.promotions.v1beta.AttributesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.shopping.merchant.promotions.v1beta.PromotionsCommonProto
.internal_static_google_shopping_merchant_promotions_v1beta_Attributes_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.shopping.merchant.promotions.v1beta.PromotionsCommonProto
.internal_static_google_shopping_merchant_promotions_v1beta_Attributes_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.shopping.merchant.promotions.v1beta.Attributes.class,
com.google.shopping.merchant.promotions.v1beta.Attributes.Builder.class);
}
// Construct using com.google.shopping.merchant.promotions.v1beta.Attributes.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getMinimumPurchaseAmountFieldBuilder();
getLimitValueFieldBuilder();
getMoneyOffAmountFieldBuilder();
getFreeGiftValueFieldBuilder();
getPromotionEffectiveTimePeriodFieldBuilder();
getPromotionDisplayTimePeriodFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
productApplicability_ = 0;
offerType_ = 0;
genericRedemptionCode_ = "";
longTitle_ = "";
couponValueType_ = 0;
promotionDestinations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
itemIdInclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
brandInclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
itemGroupIdInclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
productTypeInclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
itemIdExclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
brandExclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
itemGroupIdExclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
productTypeExclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
minimumPurchaseAmount_ = null;
if (minimumPurchaseAmountBuilder_ != null) {
minimumPurchaseAmountBuilder_.dispose();
minimumPurchaseAmountBuilder_ = null;
}
minimumPurchaseQuantity_ = 0L;
limitQuantity_ = 0L;
limitValue_ = null;
if (limitValueBuilder_ != null) {
limitValueBuilder_.dispose();
limitValueBuilder_ = null;
}
percentOff_ = 0L;
moneyOffAmount_ = null;
if (moneyOffAmountBuilder_ != null) {
moneyOffAmountBuilder_.dispose();
moneyOffAmountBuilder_ = null;
}
getThisQuantityDiscounted_ = 0L;
freeGiftValue_ = null;
if (freeGiftValueBuilder_ != null) {
freeGiftValueBuilder_.dispose();
freeGiftValueBuilder_ = null;
}
freeGiftDescription_ = "";
freeGiftItemId_ = "";
promotionEffectiveTimePeriod_ = null;
if (promotionEffectiveTimePeriodBuilder_ != null) {
promotionEffectiveTimePeriodBuilder_.dispose();
promotionEffectiveTimePeriodBuilder_ = null;
}
promotionDisplayTimePeriod_ = null;
if (promotionDisplayTimePeriodBuilder_ != null) {
promotionDisplayTimePeriodBuilder_.dispose();
promotionDisplayTimePeriodBuilder_ = null;
}
storeApplicability_ = 0;
storeCodesInclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
storeCodesExclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
promotionUrl_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.shopping.merchant.promotions.v1beta.PromotionsCommonProto
.internal_static_google_shopping_merchant_promotions_v1beta_Attributes_descriptor;
}
@java.lang.Override
public com.google.shopping.merchant.promotions.v1beta.Attributes getDefaultInstanceForType() {
return com.google.shopping.merchant.promotions.v1beta.Attributes.getDefaultInstance();
}
@java.lang.Override
public com.google.shopping.merchant.promotions.v1beta.Attributes build() {
com.google.shopping.merchant.promotions.v1beta.Attributes result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.shopping.merchant.promotions.v1beta.Attributes buildPartial() {
com.google.shopping.merchant.promotions.v1beta.Attributes result =
new com.google.shopping.merchant.promotions.v1beta.Attributes(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.shopping.merchant.promotions.v1beta.Attributes result) {
if (((bitField0_ & 0x00000020) != 0)) {
promotionDestinations_ = java.util.Collections.unmodifiableList(promotionDestinations_);
bitField0_ = (bitField0_ & ~0x00000020);
}
result.promotionDestinations_ = promotionDestinations_;
}
private void buildPartial0(com.google.shopping.merchant.promotions.v1beta.Attributes result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.productApplicability_ = productApplicability_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.offerType_ = offerType_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.genericRedemptionCode_ = genericRedemptionCode_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.longTitle_ = longTitle_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.couponValueType_ = couponValueType_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
itemIdInclusion_.makeImmutable();
result.itemIdInclusion_ = itemIdInclusion_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
brandInclusion_.makeImmutable();
result.brandInclusion_ = brandInclusion_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
itemGroupIdInclusion_.makeImmutable();
result.itemGroupIdInclusion_ = itemGroupIdInclusion_;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
productTypeInclusion_.makeImmutable();
result.productTypeInclusion_ = productTypeInclusion_;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
itemIdExclusion_.makeImmutable();
result.itemIdExclusion_ = itemIdExclusion_;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
brandExclusion_.makeImmutable();
result.brandExclusion_ = brandExclusion_;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
itemGroupIdExclusion_.makeImmutable();
result.itemGroupIdExclusion_ = itemGroupIdExclusion_;
}
if (((from_bitField0_ & 0x00002000) != 0)) {
productTypeExclusion_.makeImmutable();
result.productTypeExclusion_ = productTypeExclusion_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00004000) != 0)) {
result.minimumPurchaseAmount_ =
minimumPurchaseAmountBuilder_ == null
? minimumPurchaseAmount_
: minimumPurchaseAmountBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00008000) != 0)) {
result.minimumPurchaseQuantity_ = minimumPurchaseQuantity_;
}
if (((from_bitField0_ & 0x00010000) != 0)) {
result.limitQuantity_ = limitQuantity_;
}
if (((from_bitField0_ & 0x00020000) != 0)) {
result.limitValue_ = limitValueBuilder_ == null ? limitValue_ : limitValueBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00040000) != 0)) {
result.percentOff_ = percentOff_;
}
if (((from_bitField0_ & 0x00080000) != 0)) {
result.moneyOffAmount_ =
moneyOffAmountBuilder_ == null ? moneyOffAmount_ : moneyOffAmountBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00100000) != 0)) {
result.getThisQuantityDiscounted_ = getThisQuantityDiscounted_;
}
if (((from_bitField0_ & 0x00200000) != 0)) {
result.freeGiftValue_ =
freeGiftValueBuilder_ == null ? freeGiftValue_ : freeGiftValueBuilder_.build();
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00400000) != 0)) {
result.freeGiftDescription_ = freeGiftDescription_;
}
if (((from_bitField0_ & 0x00800000) != 0)) {
result.freeGiftItemId_ = freeGiftItemId_;
}
if (((from_bitField0_ & 0x01000000) != 0)) {
result.promotionEffectiveTimePeriod_ =
promotionEffectiveTimePeriodBuilder_ == null
? promotionEffectiveTimePeriod_
: promotionEffectiveTimePeriodBuilder_.build();
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x02000000) != 0)) {
result.promotionDisplayTimePeriod_ =
promotionDisplayTimePeriodBuilder_ == null
? promotionDisplayTimePeriod_
: promotionDisplayTimePeriodBuilder_.build();
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x04000000) != 0)) {
result.storeApplicability_ = storeApplicability_;
}
if (((from_bitField0_ & 0x08000000) != 0)) {
storeCodesInclusion_.makeImmutable();
result.storeCodesInclusion_ = storeCodesInclusion_;
}
if (((from_bitField0_ & 0x10000000) != 0)) {
storeCodesExclusion_.makeImmutable();
result.storeCodesExclusion_ = storeCodesExclusion_;
}
if (((from_bitField0_ & 0x20000000) != 0)) {
result.promotionUrl_ = promotionUrl_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.shopping.merchant.promotions.v1beta.Attributes) {
return mergeFrom((com.google.shopping.merchant.promotions.v1beta.Attributes) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.shopping.merchant.promotions.v1beta.Attributes other) {
if (other == com.google.shopping.merchant.promotions.v1beta.Attributes.getDefaultInstance())
return this;
if (other.productApplicability_ != 0) {
setProductApplicabilityValue(other.getProductApplicabilityValue());
}
if (other.offerType_ != 0) {
setOfferTypeValue(other.getOfferTypeValue());
}
if (!other.getGenericRedemptionCode().isEmpty()) {
genericRedemptionCode_ = other.genericRedemptionCode_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.getLongTitle().isEmpty()) {
longTitle_ = other.longTitle_;
bitField0_ |= 0x00000008;
onChanged();
}
if (other.couponValueType_ != 0) {
setCouponValueTypeValue(other.getCouponValueTypeValue());
}
if (!other.promotionDestinations_.isEmpty()) {
if (promotionDestinations_.isEmpty()) {
promotionDestinations_ = other.promotionDestinations_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensurePromotionDestinationsIsMutable();
promotionDestinations_.addAll(other.promotionDestinations_);
}
onChanged();
}
if (!other.itemIdInclusion_.isEmpty()) {
if (itemIdInclusion_.isEmpty()) {
itemIdInclusion_ = other.itemIdInclusion_;
bitField0_ |= 0x00000040;
} else {
ensureItemIdInclusionIsMutable();
itemIdInclusion_.addAll(other.itemIdInclusion_);
}
onChanged();
}
if (!other.brandInclusion_.isEmpty()) {
if (brandInclusion_.isEmpty()) {
brandInclusion_ = other.brandInclusion_;
bitField0_ |= 0x00000080;
} else {
ensureBrandInclusionIsMutable();
brandInclusion_.addAll(other.brandInclusion_);
}
onChanged();
}
if (!other.itemGroupIdInclusion_.isEmpty()) {
if (itemGroupIdInclusion_.isEmpty()) {
itemGroupIdInclusion_ = other.itemGroupIdInclusion_;
bitField0_ |= 0x00000100;
} else {
ensureItemGroupIdInclusionIsMutable();
itemGroupIdInclusion_.addAll(other.itemGroupIdInclusion_);
}
onChanged();
}
if (!other.productTypeInclusion_.isEmpty()) {
if (productTypeInclusion_.isEmpty()) {
productTypeInclusion_ = other.productTypeInclusion_;
bitField0_ |= 0x00000200;
} else {
ensureProductTypeInclusionIsMutable();
productTypeInclusion_.addAll(other.productTypeInclusion_);
}
onChanged();
}
if (!other.itemIdExclusion_.isEmpty()) {
if (itemIdExclusion_.isEmpty()) {
itemIdExclusion_ = other.itemIdExclusion_;
bitField0_ |= 0x00000400;
} else {
ensureItemIdExclusionIsMutable();
itemIdExclusion_.addAll(other.itemIdExclusion_);
}
onChanged();
}
if (!other.brandExclusion_.isEmpty()) {
if (brandExclusion_.isEmpty()) {
brandExclusion_ = other.brandExclusion_;
bitField0_ |= 0x00000800;
} else {
ensureBrandExclusionIsMutable();
brandExclusion_.addAll(other.brandExclusion_);
}
onChanged();
}
if (!other.itemGroupIdExclusion_.isEmpty()) {
if (itemGroupIdExclusion_.isEmpty()) {
itemGroupIdExclusion_ = other.itemGroupIdExclusion_;
bitField0_ |= 0x00001000;
} else {
ensureItemGroupIdExclusionIsMutable();
itemGroupIdExclusion_.addAll(other.itemGroupIdExclusion_);
}
onChanged();
}
if (!other.productTypeExclusion_.isEmpty()) {
if (productTypeExclusion_.isEmpty()) {
productTypeExclusion_ = other.productTypeExclusion_;
bitField0_ |= 0x00002000;
} else {
ensureProductTypeExclusionIsMutable();
productTypeExclusion_.addAll(other.productTypeExclusion_);
}
onChanged();
}
if (other.hasMinimumPurchaseAmount()) {
mergeMinimumPurchaseAmount(other.getMinimumPurchaseAmount());
}
if (other.getMinimumPurchaseQuantity() != 0L) {
setMinimumPurchaseQuantity(other.getMinimumPurchaseQuantity());
}
if (other.getLimitQuantity() != 0L) {
setLimitQuantity(other.getLimitQuantity());
}
if (other.hasLimitValue()) {
mergeLimitValue(other.getLimitValue());
}
if (other.getPercentOff() != 0L) {
setPercentOff(other.getPercentOff());
}
if (other.hasMoneyOffAmount()) {
mergeMoneyOffAmount(other.getMoneyOffAmount());
}
if (other.getGetThisQuantityDiscounted() != 0L) {
setGetThisQuantityDiscounted(other.getGetThisQuantityDiscounted());
}
if (other.hasFreeGiftValue()) {
mergeFreeGiftValue(other.getFreeGiftValue());
}
if (!other.getFreeGiftDescription().isEmpty()) {
freeGiftDescription_ = other.freeGiftDescription_;
bitField0_ |= 0x00400000;
onChanged();
}
if (!other.getFreeGiftItemId().isEmpty()) {
freeGiftItemId_ = other.freeGiftItemId_;
bitField0_ |= 0x00800000;
onChanged();
}
if (other.hasPromotionEffectiveTimePeriod()) {
mergePromotionEffectiveTimePeriod(other.getPromotionEffectiveTimePeriod());
}
if (other.hasPromotionDisplayTimePeriod()) {
mergePromotionDisplayTimePeriod(other.getPromotionDisplayTimePeriod());
}
if (other.storeApplicability_ != 0) {
setStoreApplicabilityValue(other.getStoreApplicabilityValue());
}
if (!other.storeCodesInclusion_.isEmpty()) {
if (storeCodesInclusion_.isEmpty()) {
storeCodesInclusion_ = other.storeCodesInclusion_;
bitField0_ |= 0x08000000;
} else {
ensureStoreCodesInclusionIsMutable();
storeCodesInclusion_.addAll(other.storeCodesInclusion_);
}
onChanged();
}
if (!other.storeCodesExclusion_.isEmpty()) {
if (storeCodesExclusion_.isEmpty()) {
storeCodesExclusion_ = other.storeCodesExclusion_;
bitField0_ |= 0x10000000;
} else {
ensureStoreCodesExclusionIsMutable();
storeCodesExclusion_.addAll(other.storeCodesExclusion_);
}
onChanged();
}
if (!other.getPromotionUrl().isEmpty()) {
promotionUrl_ = other.promotionUrl_;
bitField0_ |= 0x20000000;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
productApplicability_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16:
{
offerType_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26:
{
genericRedemptionCode_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
longTitle_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 40:
{
couponValueType_ = input.readEnum();
bitField0_ |= 0x00000010;
break;
} // case 40
case 48:
{
int tmpRaw = input.readEnum();
ensurePromotionDestinationsIsMutable();
promotionDestinations_.add(tmpRaw);
break;
} // case 48
case 50:
{
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
int tmpRaw = input.readEnum();
ensurePromotionDestinationsIsMutable();
promotionDestinations_.add(tmpRaw);
}
input.popLimit(oldLimit);
break;
} // case 50
case 58:
{
java.lang.String s = input.readStringRequireUtf8();
ensureItemIdInclusionIsMutable();
itemIdInclusion_.add(s);
break;
} // case 58
case 66:
{
java.lang.String s = input.readStringRequireUtf8();
ensureBrandInclusionIsMutable();
brandInclusion_.add(s);
break;
} // case 66
case 74:
{
java.lang.String s = input.readStringRequireUtf8();
ensureItemGroupIdInclusionIsMutable();
itemGroupIdInclusion_.add(s);
break;
} // case 74
case 82:
{
java.lang.String s = input.readStringRequireUtf8();
ensureProductTypeInclusionIsMutable();
productTypeInclusion_.add(s);
break;
} // case 82
case 90:
{
java.lang.String s = input.readStringRequireUtf8();
ensureItemIdExclusionIsMutable();
itemIdExclusion_.add(s);
break;
} // case 90
case 98:
{
java.lang.String s = input.readStringRequireUtf8();
ensureBrandExclusionIsMutable();
brandExclusion_.add(s);
break;
} // case 98
case 106:
{
java.lang.String s = input.readStringRequireUtf8();
ensureItemGroupIdExclusionIsMutable();
itemGroupIdExclusion_.add(s);
break;
} // case 106
case 114:
{
java.lang.String s = input.readStringRequireUtf8();
ensureProductTypeExclusionIsMutable();
productTypeExclusion_.add(s);
break;
} // case 114
case 122:
{
input.readMessage(
getMinimumPurchaseAmountFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00004000;
break;
} // case 122
case 128:
{
minimumPurchaseQuantity_ = input.readInt64();
bitField0_ |= 0x00008000;
break;
} // case 128
case 136:
{
limitQuantity_ = input.readInt64();
bitField0_ |= 0x00010000;
break;
} // case 136
case 146:
{
input.readMessage(getLimitValueFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00020000;
break;
} // case 146
case 152:
{
percentOff_ = input.readInt64();
bitField0_ |= 0x00040000;
break;
} // case 152
case 162:
{
input.readMessage(getMoneyOffAmountFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00080000;
break;
} // case 162
case 168:
{
getThisQuantityDiscounted_ = input.readInt64();
bitField0_ |= 0x00100000;
break;
} // case 168
case 178:
{
input.readMessage(getFreeGiftValueFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00200000;
break;
} // case 178
case 186:
{
freeGiftDescription_ = input.readStringRequireUtf8();
bitField0_ |= 0x00400000;
break;
} // case 186
case 194:
{
freeGiftItemId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00800000;
break;
} // case 194
case 202:
{
input.readMessage(
getPromotionEffectiveTimePeriodFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x01000000;
break;
} // case 202
case 210:
{
input.readMessage(
getPromotionDisplayTimePeriodFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x02000000;
break;
} // case 210
case 224:
{
storeApplicability_ = input.readEnum();
bitField0_ |= 0x04000000;
break;
} // case 224
case 234:
{
java.lang.String s = input.readStringRequireUtf8();
ensureStoreCodesInclusionIsMutable();
storeCodesInclusion_.add(s);
break;
} // case 234
case 242:
{
java.lang.String s = input.readStringRequireUtf8();
ensureStoreCodesExclusionIsMutable();
storeCodesExclusion_.add(s);
break;
} // case 242
case 250:
{
promotionUrl_ = input.readStringRequireUtf8();
bitField0_ |= 0x20000000;
break;
} // case 250
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int productApplicability_ = 0;
/**
*
*
*
* Required. Applicability of the promotion to either all products or
* [only specific
* products](https://support.google.com/merchants/answer/6396257?ref_topic=6396150&sjid=17642868584668136159-NC).
*
*
*
* .google.shopping.merchant.promotions.v1beta.ProductApplicability product_applicability = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for productApplicability.
*/
@java.lang.Override
public int getProductApplicabilityValue() {
return productApplicability_;
}
/**
*
*
*
* Required. Applicability of the promotion to either all products or
* [only specific
* products](https://support.google.com/merchants/answer/6396257?ref_topic=6396150&sjid=17642868584668136159-NC).
*
*
*
* .google.shopping.merchant.promotions.v1beta.ProductApplicability product_applicability = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The enum numeric value on the wire for productApplicability to set.
* @return This builder for chaining.
*/
public Builder setProductApplicabilityValue(int value) {
productApplicability_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. Applicability of the promotion to either all products or
* [only specific
* products](https://support.google.com/merchants/answer/6396257?ref_topic=6396150&sjid=17642868584668136159-NC).
*
*
*
* .google.shopping.merchant.promotions.v1beta.ProductApplicability product_applicability = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The productApplicability.
*/
@java.lang.Override
public com.google.shopping.merchant.promotions.v1beta.ProductApplicability
getProductApplicability() {
com.google.shopping.merchant.promotions.v1beta.ProductApplicability result =
com.google.shopping.merchant.promotions.v1beta.ProductApplicability.forNumber(
productApplicability_);
return result == null
? com.google.shopping.merchant.promotions.v1beta.ProductApplicability.UNRECOGNIZED
: result;
}
/**
*
*
*
* Required. Applicability of the promotion to either all products or
* [only specific
* products](https://support.google.com/merchants/answer/6396257?ref_topic=6396150&sjid=17642868584668136159-NC).
*
*
*
* .google.shopping.merchant.promotions.v1beta.ProductApplicability product_applicability = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The productApplicability to set.
* @return This builder for chaining.
*/
public Builder setProductApplicability(
com.google.shopping.merchant.promotions.v1beta.ProductApplicability value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
productApplicability_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Required. Applicability of the promotion to either all products or
* [only specific
* products](https://support.google.com/merchants/answer/6396257?ref_topic=6396150&sjid=17642868584668136159-NC).
*
*
*
* .google.shopping.merchant.promotions.v1beta.ProductApplicability product_applicability = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return This builder for chaining.
*/
public Builder clearProductApplicability() {
bitField0_ = (bitField0_ & ~0x00000001);
productApplicability_ = 0;
onChanged();
return this;
}
private int offerType_ = 0;
/**
*
*
*
* Required.
* [Type](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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];
*
*
* @return The enum numeric value on the wire for offerType.
*/
@java.lang.Override
public int getOfferTypeValue() {
return offerType_;
}
/**
*
*
*
* Required.
* [Type](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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];
*
*
* @param value The enum numeric value on the wire for offerType to set.
* @return This builder for chaining.
*/
public Builder setOfferTypeValue(int value) {
offerType_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required.
* [Type](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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];
*
*
* @return The offerType.
*/
@java.lang.Override
public com.google.shopping.merchant.promotions.v1beta.OfferType getOfferType() {
com.google.shopping.merchant.promotions.v1beta.OfferType result =
com.google.shopping.merchant.promotions.v1beta.OfferType.forNumber(offerType_);
return result == null
? com.google.shopping.merchant.promotions.v1beta.OfferType.UNRECOGNIZED
: result;
}
/**
*
*
*
* Required.
* [Type](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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];
*
*
* @param value The offerType to set.
* @return This builder for chaining.
*/
public Builder setOfferType(com.google.shopping.merchant.promotions.v1beta.OfferType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
offerType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Required.
* [Type](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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];
*
*
* @return This builder for chaining.
*/
public Builder clearOfferType() {
bitField0_ = (bitField0_ & ~0x00000002);
offerType_ = 0;
onChanged();
return this;
}
private java.lang.Object genericRedemptionCode_ = "";
/**
*
*
*
* Optional. Generic redemption code for the promotion. To be used with the
* `offerType` field and must meet the [minimum
* requirements](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* string generic_redemption_code = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The genericRedemptionCode.
*/
public java.lang.String getGenericRedemptionCode() {
java.lang.Object ref = genericRedemptionCode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
genericRedemptionCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Optional. Generic redemption code for the promotion. To be used with the
* `offerType` field and must meet the [minimum
* requirements](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* string generic_redemption_code = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for genericRedemptionCode.
*/
public com.google.protobuf.ByteString getGenericRedemptionCodeBytes() {
java.lang.Object ref = genericRedemptionCode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
genericRedemptionCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. Generic redemption code for the promotion. To be used with the
* `offerType` field and must meet the [minimum
* requirements](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* string generic_redemption_code = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The genericRedemptionCode to set.
* @return This builder for chaining.
*/
public Builder setGenericRedemptionCode(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
genericRedemptionCode_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. Generic redemption code for the promotion. To be used with the
* `offerType` field and must meet the [minimum
* requirements](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* string generic_redemption_code = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearGenericRedemptionCode() {
genericRedemptionCode_ = getDefaultInstance().getGenericRedemptionCode();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Optional. Generic redemption code for the promotion. To be used with the
* `offerType` field and must meet the [minimum
* requirements](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* string generic_redemption_code = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for genericRedemptionCode to set.
* @return This builder for chaining.
*/
public Builder setGenericRedemptionCodeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
genericRedemptionCode_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object longTitle_ = "";
/**
*
*
*
* Required. [Long
* title](https://support.google.com/merchants/answer/13838102?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string long_title = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The longTitle.
*/
public java.lang.String getLongTitle() {
java.lang.Object ref = longTitle_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
longTitle_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. [Long
* title](https://support.google.com/merchants/answer/13838102?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string long_title = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for longTitle.
*/
public com.google.protobuf.ByteString getLongTitleBytes() {
java.lang.Object ref = longTitle_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
longTitle_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. [Long
* title](https://support.google.com/merchants/answer/13838102?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string long_title = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The longTitle to set.
* @return This builder for chaining.
*/
public Builder setLongTitle(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
longTitle_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Required. [Long
* title](https://support.google.com/merchants/answer/13838102?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string long_title = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearLongTitle() {
longTitle_ = getDefaultInstance().getLongTitle();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* Required. [Long
* title](https://support.google.com/merchants/answer/13838102?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string long_title = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for longTitle to set.
* @return This builder for chaining.
*/
public Builder setLongTitleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
longTitle_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private int couponValueType_ = 0;
/**
*
*
*
* Required. The [coupon value type]
* (https://support.google.com/merchants/answer/13861986?ref_topic=13773355&sjid=17642868584668136159-NC)
* attribute to signal the type of promotion that you are running. Depending
* on type of the selected coupon value [some attributes are
* required](https://support.google.com/merchants/answer/6393006?ref_topic=7322920).
*
*
*
* .google.shopping.merchant.promotions.v1beta.CouponValueType coupon_value_type = 5 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for couponValueType.
*/
@java.lang.Override
public int getCouponValueTypeValue() {
return couponValueType_;
}
/**
*
*
*
* Required. The [coupon value type]
* (https://support.google.com/merchants/answer/13861986?ref_topic=13773355&sjid=17642868584668136159-NC)
* attribute to signal the type of promotion that you are running. Depending
* on type of the selected coupon value [some attributes are
* required](https://support.google.com/merchants/answer/6393006?ref_topic=7322920).
*
*
*
* .google.shopping.merchant.promotions.v1beta.CouponValueType coupon_value_type = 5 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The enum numeric value on the wire for couponValueType to set.
* @return This builder for chaining.
*/
public Builder setCouponValueTypeValue(int value) {
couponValueType_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Required. The [coupon value type]
* (https://support.google.com/merchants/answer/13861986?ref_topic=13773355&sjid=17642868584668136159-NC)
* attribute to signal the type of promotion that you are running. Depending
* on type of the selected coupon value [some attributes are
* required](https://support.google.com/merchants/answer/6393006?ref_topic=7322920).
*
*
*
* .google.shopping.merchant.promotions.v1beta.CouponValueType coupon_value_type = 5 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The couponValueType.
*/
@java.lang.Override
public com.google.shopping.merchant.promotions.v1beta.CouponValueType getCouponValueType() {
com.google.shopping.merchant.promotions.v1beta.CouponValueType result =
com.google.shopping.merchant.promotions.v1beta.CouponValueType.forNumber(
couponValueType_);
return result == null
? com.google.shopping.merchant.promotions.v1beta.CouponValueType.UNRECOGNIZED
: result;
}
/**
*
*
*
* Required. The [coupon value type]
* (https://support.google.com/merchants/answer/13861986?ref_topic=13773355&sjid=17642868584668136159-NC)
* attribute to signal the type of promotion that you are running. Depending
* on type of the selected coupon value [some attributes are
* required](https://support.google.com/merchants/answer/6393006?ref_topic=7322920).
*
*
*
* .google.shopping.merchant.promotions.v1beta.CouponValueType coupon_value_type = 5 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The couponValueType to set.
* @return This builder for chaining.
*/
public Builder setCouponValueType(
com.google.shopping.merchant.promotions.v1beta.CouponValueType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
couponValueType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Required. The [coupon value type]
* (https://support.google.com/merchants/answer/13861986?ref_topic=13773355&sjid=17642868584668136159-NC)
* attribute to signal the type of promotion that you are running. Depending
* on type of the selected coupon value [some attributes are
* required](https://support.google.com/merchants/answer/6393006?ref_topic=7322920).
*
*
*
* .google.shopping.merchant.promotions.v1beta.CouponValueType coupon_value_type = 5 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return This builder for chaining.
*/
public Builder clearCouponValueType() {
bitField0_ = (bitField0_ & ~0x00000010);
couponValueType_ = 0;
onChanged();
return this;
}
private java.util.List promotionDestinations_ =
java.util.Collections.emptyList();
private void ensurePromotionDestinationsIsMutable() {
if (!((bitField0_ & 0x00000020) != 0)) {
promotionDestinations_ = new java.util.ArrayList(promotionDestinations_);
bitField0_ |= 0x00000020;
}
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC)
*
*
*
* repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return A list containing the promotionDestinations.
*/
public java.util.List
getPromotionDestinationsList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.google.shopping.type.Destination.DestinationEnum>(
promotionDestinations_, promotionDestinations_converter_);
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC)
*
*
*
* repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The count of promotionDestinations.
*/
public int getPromotionDestinationsCount() {
return promotionDestinations_.size();
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC)
*
*
*
* repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param index The index of the element to return.
* @return The promotionDestinations at the given index.
*/
public com.google.shopping.type.Destination.DestinationEnum getPromotionDestinations(
int index) {
return promotionDestinations_converter_.convert(promotionDestinations_.get(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](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC)
*
*
*
* repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param index The index to set the value at.
* @param value The promotionDestinations to set.
* @return This builder for chaining.
*/
public Builder setPromotionDestinations(
int index, com.google.shopping.type.Destination.DestinationEnum value) {
if (value == null) {
throw new NullPointerException();
}
ensurePromotionDestinationsIsMutable();
promotionDestinations_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC)
*
*
*
* repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The promotionDestinations to add.
* @return This builder for chaining.
*/
public Builder addPromotionDestinations(
com.google.shopping.type.Destination.DestinationEnum value) {
if (value == null) {
throw new NullPointerException();
}
ensurePromotionDestinationsIsMutable();
promotionDestinations_.add(value.getNumber());
onChanged();
return this;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC)
*
*
*
* repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param values The promotionDestinations to add.
* @return This builder for chaining.
*/
public Builder addAllPromotionDestinations(
java.lang.Iterable extends com.google.shopping.type.Destination.DestinationEnum> values) {
ensurePromotionDestinationsIsMutable();
for (com.google.shopping.type.Destination.DestinationEnum value : values) {
promotionDestinations_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC)
*
*
*
* repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return This builder for chaining.
*/
public Builder clearPromotionDestinations() {
promotionDestinations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC)
*
*
*
* repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return A list containing the enum numeric values on the wire for promotionDestinations.
*/
public java.util.List getPromotionDestinationsValueList() {
return java.util.Collections.unmodifiableList(promotionDestinations_);
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC)
*
*
*
* repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param index The index of the value to return.
* @return The enum numeric value on the wire of promotionDestinations at the given index.
*/
public int getPromotionDestinationsValue(int index) {
return promotionDestinations_.get(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](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC)
*
*
*
* repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param index The index to set the value at.
* @param value The enum numeric value on the wire for promotionDestinations to set.
* @return This builder for chaining.
*/
public Builder setPromotionDestinationsValue(int index, int value) {
ensurePromotionDestinationsIsMutable();
promotionDestinations_.set(index, value);
onChanged();
return this;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC)
*
*
*
* repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The enum numeric value on the wire for promotionDestinations to add.
* @return This builder for chaining.
*/
public Builder addPromotionDestinationsValue(int value) {
ensurePromotionDestinationsIsMutable();
promotionDestinations_.add(value);
onChanged();
return this;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC)
*
*
*
* repeated .google.shopping.type.Destination.DestinationEnum promotion_destinations = 6 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param values The enum numeric values on the wire for promotionDestinations to add.
* @return This builder for chaining.
*/
public Builder addAllPromotionDestinationsValue(java.lang.Iterable values) {
ensurePromotionDestinationsIsMutable();
for (int value : values) {
promotionDestinations_.add(value);
}
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList itemIdInclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureItemIdInclusionIsMutable() {
if (!itemIdInclusion_.isModifiable()) {
itemIdInclusion_ = new com.google.protobuf.LazyStringArrayList(itemIdInclusion_);
}
bitField0_ |= 0x00000040;
}
/**
*
*
*
* Optional. Product filter by [item
* ID](https://support.google.com/merchants/answer/13861565?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the itemIdInclusion.
*/
public com.google.protobuf.ProtocolStringList getItemIdInclusionList() {
itemIdInclusion_.makeImmutable();
return itemIdInclusion_;
}
/**
*
*
*
* Optional. Product filter by [item
* ID](https://support.google.com/merchants/answer/13861565?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of itemIdInclusion.
*/
public int getItemIdInclusionCount() {
return itemIdInclusion_.size();
}
/**
*
*
*
* Optional. Product filter by [item
* ID](https://support.google.com/merchants/answer/13861565?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The itemIdInclusion at the given index.
*/
public java.lang.String getItemIdInclusion(int index) {
return itemIdInclusion_.get(index);
}
/**
*
*
*
* Optional. Product filter by [item
* ID](https://support.google.com/merchants/answer/13861565?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the itemIdInclusion at the given index.
*/
public com.google.protobuf.ByteString getItemIdInclusionBytes(int index) {
return itemIdInclusion_.getByteString(index);
}
/**
*
*
*
* Optional. Product filter by [item
* ID](https://support.google.com/merchants/answer/13861565?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index to set the value at.
* @param value The itemIdInclusion to set.
* @return This builder for chaining.
*/
public Builder setItemIdInclusion(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureItemIdInclusionIsMutable();
itemIdInclusion_.set(index, value);
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [item
* ID](https://support.google.com/merchants/answer/13861565?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The itemIdInclusion to add.
* @return This builder for chaining.
*/
public Builder addItemIdInclusion(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureItemIdInclusionIsMutable();
itemIdInclusion_.add(value);
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [item
* ID](https://support.google.com/merchants/answer/13861565?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param values The itemIdInclusion to add.
* @return This builder for chaining.
*/
public Builder addAllItemIdInclusion(java.lang.Iterable values) {
ensureItemIdInclusionIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, itemIdInclusion_);
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [item
* ID](https://support.google.com/merchants/answer/13861565?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearItemIdInclusion() {
itemIdInclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000040);
;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [item
* ID](https://support.google.com/merchants/answer/13861565?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_inclusion = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes of the itemIdInclusion to add.
* @return This builder for chaining.
*/
public Builder addItemIdInclusionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureItemIdInclusionIsMutable();
itemIdInclusion_.add(value);
bitField0_ |= 0x00000040;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList brandInclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureBrandInclusionIsMutable() {
if (!brandInclusion_.isModifiable()) {
brandInclusion_ = new com.google.protobuf.LazyStringArrayList(brandInclusion_);
}
bitField0_ |= 0x00000080;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the brandInclusion.
*/
public com.google.protobuf.ProtocolStringList getBrandInclusionList() {
brandInclusion_.makeImmutable();
return brandInclusion_;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of brandInclusion.
*/
public int getBrandInclusionCount() {
return brandInclusion_.size();
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The brandInclusion at the given index.
*/
public java.lang.String getBrandInclusion(int index) {
return brandInclusion_.get(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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the brandInclusion at the given index.
*/
public com.google.protobuf.ByteString getBrandInclusionBytes(int index) {
return brandInclusion_.getByteString(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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index to set the value at.
* @param value The brandInclusion to set.
* @return This builder for chaining.
*/
public Builder setBrandInclusion(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureBrandInclusionIsMutable();
brandInclusion_.set(index, value);
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The brandInclusion to add.
* @return This builder for chaining.
*/
public Builder addBrandInclusion(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureBrandInclusionIsMutable();
brandInclusion_.add(value);
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @param values The brandInclusion to add.
* @return This builder for chaining.
*/
public Builder addAllBrandInclusion(java.lang.Iterable values) {
ensureBrandInclusionIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, brandInclusion_);
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearBrandInclusion() {
brandInclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000080);
;
onChanged();
return this;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_inclusion = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes of the brandInclusion to add.
* @return This builder for chaining.
*/
public Builder addBrandInclusionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureBrandInclusionIsMutable();
brandInclusion_.add(value);
bitField0_ |= 0x00000080;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList itemGroupIdInclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureItemGroupIdInclusionIsMutable() {
if (!itemGroupIdInclusion_.isModifiable()) {
itemGroupIdInclusion_ = new com.google.protobuf.LazyStringArrayList(itemGroupIdInclusion_);
}
bitField0_ |= 0x00000100;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return A list containing the itemGroupIdInclusion.
*/
public com.google.protobuf.ProtocolStringList getItemGroupIdInclusionList() {
itemGroupIdInclusion_.makeImmutable();
return itemGroupIdInclusion_;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The count of itemGroupIdInclusion.
*/
public int getItemGroupIdInclusionCount() {
return itemGroupIdInclusion_.size();
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the element to return.
* @return The itemGroupIdInclusion at the given index.
*/
public java.lang.String getItemGroupIdInclusion(int index) {
return itemGroupIdInclusion_.get(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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the value to return.
* @return The bytes of the itemGroupIdInclusion at the given index.
*/
public com.google.protobuf.ByteString getItemGroupIdInclusionBytes(int index) {
return itemGroupIdInclusion_.getByteString(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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index to set the value at.
* @param value The itemGroupIdInclusion to set.
* @return This builder for chaining.
*/
public Builder setItemGroupIdInclusion(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureItemGroupIdInclusionIsMutable();
itemGroupIdInclusion_.set(index, value);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The itemGroupIdInclusion to add.
* @return This builder for chaining.
*/
public Builder addItemGroupIdInclusion(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureItemGroupIdInclusionIsMutable();
itemGroupIdInclusion_.add(value);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param values The itemGroupIdInclusion to add.
* @return This builder for chaining.
*/
public Builder addAllItemGroupIdInclusion(java.lang.Iterable values) {
ensureItemGroupIdInclusionIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, itemGroupIdInclusion_);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearItemGroupIdInclusion() {
itemGroupIdInclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
;
onChanged();
return this;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_group_id_inclusion = 9 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The bytes of the itemGroupIdInclusion to add.
* @return This builder for chaining.
*/
public Builder addItemGroupIdInclusionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureItemGroupIdInclusionIsMutable();
itemGroupIdInclusion_.add(value);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList productTypeInclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureProductTypeInclusionIsMutable() {
if (!productTypeInclusion_.isModifiable()) {
productTypeInclusion_ = new com.google.protobuf.LazyStringArrayList(productTypeInclusion_);
}
bitField0_ |= 0x00000200;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return A list containing the productTypeInclusion.
*/
public com.google.protobuf.ProtocolStringList getProductTypeInclusionList() {
productTypeInclusion_.makeImmutable();
return productTypeInclusion_;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The count of productTypeInclusion.
*/
public int getProductTypeInclusionCount() {
return productTypeInclusion_.size();
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the element to return.
* @return The productTypeInclusion at the given index.
*/
public java.lang.String getProductTypeInclusion(int index) {
return productTypeInclusion_.get(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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the value to return.
* @return The bytes of the productTypeInclusion at the given index.
*/
public com.google.protobuf.ByteString getProductTypeInclusionBytes(int index) {
return productTypeInclusion_.getByteString(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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index to set the value at.
* @param value The productTypeInclusion to set.
* @return This builder for chaining.
*/
public Builder setProductTypeInclusion(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureProductTypeInclusionIsMutable();
productTypeInclusion_.set(index, value);
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The productTypeInclusion to add.
* @return This builder for chaining.
*/
public Builder addProductTypeInclusion(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureProductTypeInclusionIsMutable();
productTypeInclusion_.add(value);
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param values The productTypeInclusion to add.
* @return This builder for chaining.
*/
public Builder addAllProductTypeInclusion(java.lang.Iterable values) {
ensureProductTypeInclusionIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, productTypeInclusion_);
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearProductTypeInclusion() {
productTypeInclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000200);
;
onChanged();
return this;
}
/**
*
*
*
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_inclusion = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The bytes of the productTypeInclusion to add.
* @return This builder for chaining.
*/
public Builder addProductTypeInclusionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureProductTypeInclusionIsMutable();
productTypeInclusion_.add(value);
bitField0_ |= 0x00000200;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList itemIdExclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureItemIdExclusionIsMutable() {
if (!itemIdExclusion_.isModifiable()) {
itemIdExclusion_ = new com.google.protobuf.LazyStringArrayList(itemIdExclusion_);
}
bitField0_ |= 0x00000400;
}
/**
*
*
*
* Optional. Product filter by [item ID
* exclusion](https://support.google.com/merchants/answer/13863524?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return A list containing the itemIdExclusion.
*/
public com.google.protobuf.ProtocolStringList getItemIdExclusionList() {
itemIdExclusion_.makeImmutable();
return itemIdExclusion_;
}
/**
*
*
*
* Optional. Product filter by [item ID
* exclusion](https://support.google.com/merchants/answer/13863524?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The count of itemIdExclusion.
*/
public int getItemIdExclusionCount() {
return itemIdExclusion_.size();
}
/**
*
*
*
* Optional. Product filter by [item ID
* exclusion](https://support.google.com/merchants/answer/13863524?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the element to return.
* @return The itemIdExclusion at the given index.
*/
public java.lang.String getItemIdExclusion(int index) {
return itemIdExclusion_.get(index);
}
/**
*
*
*
* Optional. Product filter by [item ID
* exclusion](https://support.google.com/merchants/answer/13863524?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the value to return.
* @return The bytes of the itemIdExclusion at the given index.
*/
public com.google.protobuf.ByteString getItemIdExclusionBytes(int index) {
return itemIdExclusion_.getByteString(index);
}
/**
*
*
*
* Optional. Product filter by [item ID
* exclusion](https://support.google.com/merchants/answer/13863524?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index to set the value at.
* @param value The itemIdExclusion to set.
* @return This builder for chaining.
*/
public Builder setItemIdExclusion(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureItemIdExclusionIsMutable();
itemIdExclusion_.set(index, value);
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [item ID
* exclusion](https://support.google.com/merchants/answer/13863524?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The itemIdExclusion to add.
* @return This builder for chaining.
*/
public Builder addItemIdExclusion(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureItemIdExclusionIsMutable();
itemIdExclusion_.add(value);
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [item ID
* exclusion](https://support.google.com/merchants/answer/13863524?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param values The itemIdExclusion to add.
* @return This builder for chaining.
*/
public Builder addAllItemIdExclusion(java.lang.Iterable values) {
ensureItemIdExclusionIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, itemIdExclusion_);
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [item ID
* exclusion](https://support.google.com/merchants/answer/13863524?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearItemIdExclusion() {
itemIdExclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000400);
;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [item ID
* exclusion](https://support.google.com/merchants/answer/13863524?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string item_id_exclusion = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The bytes of the itemIdExclusion to add.
* @return This builder for chaining.
*/
public Builder addItemIdExclusionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureItemIdExclusionIsMutable();
itemIdExclusion_.add(value);
bitField0_ |= 0x00000400;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList brandExclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureBrandExclusionIsMutable() {
if (!brandExclusion_.isModifiable()) {
brandExclusion_ = new com.google.protobuf.LazyStringArrayList(brandExclusion_);
}
bitField0_ |= 0x00000800;
}
/**
*
*
*
* Optional. Product filter by [brand
* exclusion](https://support.google.com/merchants/answer/13861679?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the brandExclusion.
*/
public com.google.protobuf.ProtocolStringList getBrandExclusionList() {
brandExclusion_.makeImmutable();
return brandExclusion_;
}
/**
*
*
*
* Optional. Product filter by [brand
* exclusion](https://support.google.com/merchants/answer/13861679?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of brandExclusion.
*/
public int getBrandExclusionCount() {
return brandExclusion_.size();
}
/**
*
*
*
* Optional. Product filter by [brand
* exclusion](https://support.google.com/merchants/answer/13861679?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The brandExclusion at the given index.
*/
public java.lang.String getBrandExclusion(int index) {
return brandExclusion_.get(index);
}
/**
*
*
*
* Optional. Product filter by [brand
* exclusion](https://support.google.com/merchants/answer/13861679?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the brandExclusion at the given index.
*/
public com.google.protobuf.ByteString getBrandExclusionBytes(int index) {
return brandExclusion_.getByteString(index);
}
/**
*
*
*
* Optional. Product filter by [brand
* exclusion](https://support.google.com/merchants/answer/13861679?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index to set the value at.
* @param value The brandExclusion to set.
* @return This builder for chaining.
*/
public Builder setBrandExclusion(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureBrandExclusionIsMutable();
brandExclusion_.set(index, value);
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [brand
* exclusion](https://support.google.com/merchants/answer/13861679?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The brandExclusion to add.
* @return This builder for chaining.
*/
public Builder addBrandExclusion(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureBrandExclusionIsMutable();
brandExclusion_.add(value);
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [brand
* exclusion](https://support.google.com/merchants/answer/13861679?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @param values The brandExclusion to add.
* @return This builder for chaining.
*/
public Builder addAllBrandExclusion(java.lang.Iterable values) {
ensureBrandExclusionIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, brandExclusion_);
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [brand
* exclusion](https://support.google.com/merchants/answer/13861679?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearBrandExclusion() {
brandExclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000800);
;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [brand
* exclusion](https://support.google.com/merchants/answer/13861679?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string brand_exclusion = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes of the brandExclusion to add.
* @return This builder for chaining.
*/
public Builder addBrandExclusionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureBrandExclusionIsMutable();
brandExclusion_.add(value);
bitField0_ |= 0x00000800;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList itemGroupIdExclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureItemGroupIdExclusionIsMutable() {
if (!itemGroupIdExclusion_.isModifiable()) {
itemGroupIdExclusion_ = new com.google.protobuf.LazyStringArrayList(itemGroupIdExclusion_);
}
bitField0_ |= 0x00001000;
}
/**
*
*
*
* Optional. Product filter by [item group
* ID](https://support.google.com/merchants/answer/13837298?ref_topic=13773355&sjid=17642868584668136159-NC).
* The product filter attributes only applies when the products eligible for
* promotion product applicability `product_applicability` attribute is set to
* [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
* exclusion for the promotion.
*
*
* repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return A list containing the itemGroupIdExclusion.
*/
public com.google.protobuf.ProtocolStringList getItemGroupIdExclusionList() {
itemGroupIdExclusion_.makeImmutable();
return itemGroupIdExclusion_;
}
/**
*
*
*
* Optional. Product filter by [item group
* ID](https://support.google.com/merchants/answer/13837298?ref_topic=13773355&sjid=17642868584668136159-NC).
* The product filter attributes only applies when the products eligible for
* promotion product applicability `product_applicability` attribute is set to
* [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
* exclusion for the promotion.
*
*
* repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The count of itemGroupIdExclusion.
*/
public int getItemGroupIdExclusionCount() {
return itemGroupIdExclusion_.size();
}
/**
*
*
*
* Optional. Product filter by [item group
* ID](https://support.google.com/merchants/answer/13837298?ref_topic=13773355&sjid=17642868584668136159-NC).
* The product filter attributes only applies when the products eligible for
* promotion product applicability `product_applicability` attribute is set to
* [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
* exclusion for the promotion.
*
*
* repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the element to return.
* @return The itemGroupIdExclusion at the given index.
*/
public java.lang.String getItemGroupIdExclusion(int index) {
return itemGroupIdExclusion_.get(index);
}
/**
*
*
*
* Optional. Product filter by [item group
* ID](https://support.google.com/merchants/answer/13837298?ref_topic=13773355&sjid=17642868584668136159-NC).
* The product filter attributes only applies when the products eligible for
* promotion product applicability `product_applicability` attribute is set to
* [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
* exclusion for the promotion.
*
*
* repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the value to return.
* @return The bytes of the itemGroupIdExclusion at the given index.
*/
public com.google.protobuf.ByteString getItemGroupIdExclusionBytes(int index) {
return itemGroupIdExclusion_.getByteString(index);
}
/**
*
*
*
* Optional. Product filter by [item group
* ID](https://support.google.com/merchants/answer/13837298?ref_topic=13773355&sjid=17642868584668136159-NC).
* The product filter attributes only applies when the products eligible for
* promotion product applicability `product_applicability` attribute is set to
* [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
* exclusion for the promotion.
*
*
* repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index to set the value at.
* @param value The itemGroupIdExclusion to set.
* @return This builder for chaining.
*/
public Builder setItemGroupIdExclusion(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureItemGroupIdExclusionIsMutable();
itemGroupIdExclusion_.set(index, value);
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [item group
* ID](https://support.google.com/merchants/answer/13837298?ref_topic=13773355&sjid=17642868584668136159-NC).
* The product filter attributes only applies when the products eligible for
* promotion product applicability `product_applicability` attribute is set to
* [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
* exclusion for the promotion.
*
*
* repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The itemGroupIdExclusion to add.
* @return This builder for chaining.
*/
public Builder addItemGroupIdExclusion(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureItemGroupIdExclusionIsMutable();
itemGroupIdExclusion_.add(value);
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [item group
* ID](https://support.google.com/merchants/answer/13837298?ref_topic=13773355&sjid=17642868584668136159-NC).
* The product filter attributes only applies when the products eligible for
* promotion product applicability `product_applicability` attribute is set to
* [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
* exclusion for the promotion.
*
*
* repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param values The itemGroupIdExclusion to add.
* @return This builder for chaining.
*/
public Builder addAllItemGroupIdExclusion(java.lang.Iterable values) {
ensureItemGroupIdExclusionIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, itemGroupIdExclusion_);
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [item group
* ID](https://support.google.com/merchants/answer/13837298?ref_topic=13773355&sjid=17642868584668136159-NC).
* The product filter attributes only applies when the products eligible for
* promotion product applicability `product_applicability` attribute is set to
* [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
* exclusion for the promotion.
*
*
* repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearItemGroupIdExclusion() {
itemGroupIdExclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00001000);
;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [item group
* ID](https://support.google.com/merchants/answer/13837298?ref_topic=13773355&sjid=17642868584668136159-NC).
* The product filter attributes only applies when the products eligible for
* promotion product applicability `product_applicability` attribute is set to
* [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
* exclusion for the promotion.
*
*
* repeated string item_group_id_exclusion = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The bytes of the itemGroupIdExclusion to add.
* @return This builder for chaining.
*/
public Builder addItemGroupIdExclusionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureItemGroupIdExclusionIsMutable();
itemGroupIdExclusion_.add(value);
bitField0_ |= 0x00001000;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList productTypeExclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureProductTypeExclusionIsMutable() {
if (!productTypeExclusion_.isModifiable()) {
productTypeExclusion_ = new com.google.protobuf.LazyStringArrayList(productTypeExclusion_);
}
bitField0_ |= 0x00002000;
}
/**
*
*
*
* Optional. Product filter by [product type
* exclusion](https://support.google.com/merchants/answer/13863746?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return A list containing the productTypeExclusion.
*/
public com.google.protobuf.ProtocolStringList getProductTypeExclusionList() {
productTypeExclusion_.makeImmutable();
return productTypeExclusion_;
}
/**
*
*
*
* Optional. Product filter by [product type
* exclusion](https://support.google.com/merchants/answer/13863746?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The count of productTypeExclusion.
*/
public int getProductTypeExclusionCount() {
return productTypeExclusion_.size();
}
/**
*
*
*
* Optional. Product filter by [product type
* exclusion](https://support.google.com/merchants/answer/13863746?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the element to return.
* @return The productTypeExclusion at the given index.
*/
public java.lang.String getProductTypeExclusion(int index) {
return productTypeExclusion_.get(index);
}
/**
*
*
*
* Optional. Product filter by [product type
* exclusion](https://support.google.com/merchants/answer/13863746?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the value to return.
* @return The bytes of the productTypeExclusion at the given index.
*/
public com.google.protobuf.ByteString getProductTypeExclusionBytes(int index) {
return productTypeExclusion_.getByteString(index);
}
/**
*
*
*
* Optional. Product filter by [product type
* exclusion](https://support.google.com/merchants/answer/13863746?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index to set the value at.
* @param value The productTypeExclusion to set.
* @return This builder for chaining.
*/
public Builder setProductTypeExclusion(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureProductTypeExclusionIsMutable();
productTypeExclusion_.set(index, value);
bitField0_ |= 0x00002000;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [product type
* exclusion](https://support.google.com/merchants/answer/13863746?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The productTypeExclusion to add.
* @return This builder for chaining.
*/
public Builder addProductTypeExclusion(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureProductTypeExclusionIsMutable();
productTypeExclusion_.add(value);
bitField0_ |= 0x00002000;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [product type
* exclusion](https://support.google.com/merchants/answer/13863746?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param values The productTypeExclusion to add.
* @return This builder for chaining.
*/
public Builder addAllProductTypeExclusion(java.lang.Iterable values) {
ensureProductTypeExclusionIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, productTypeExclusion_);
bitField0_ |= 0x00002000;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [product type
* exclusion](https://support.google.com/merchants/answer/13863746?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearProductTypeExclusion() {
productTypeExclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00002000);
;
onChanged();
return this;
}
/**
*
*
*
* Optional. Product filter by [product type
* exclusion](https://support.google.com/merchants/answer/13863746?ref_topic=13773355&sjid=17642868584668136159-NC)
* 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](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string product_type_exclusion = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The bytes of the productTypeExclusion to add.
* @return This builder for chaining.
*/
public Builder addProductTypeExclusionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureProductTypeExclusionIsMutable();
productTypeExclusion_.add(value);
bitField0_ |= 0x00002000;
onChanged();
return this;
}
private com.google.shopping.type.Price minimumPurchaseAmount_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.shopping.type.Price,
com.google.shopping.type.Price.Builder,
com.google.shopping.type.PriceOrBuilder>
minimumPurchaseAmountBuilder_;
/**
*
*
*
* Optional. [Minimum purchase
* amount](https://support.google.com/merchants/answer/13837705?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the minimumPurchaseAmount field is set.
*/
public boolean hasMinimumPurchaseAmount() {
return ((bitField0_ & 0x00004000) != 0);
}
/**
*
*
*
* Optional. [Minimum purchase
* amount](https://support.google.com/merchants/answer/13837705?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The minimumPurchaseAmount.
*/
public com.google.shopping.type.Price getMinimumPurchaseAmount() {
if (minimumPurchaseAmountBuilder_ == null) {
return minimumPurchaseAmount_ == null
? com.google.shopping.type.Price.getDefaultInstance()
: minimumPurchaseAmount_;
} else {
return minimumPurchaseAmountBuilder_.getMessage();
}
}
/**
*
*
*
* Optional. [Minimum purchase
* amount](https://support.google.com/merchants/answer/13837705?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setMinimumPurchaseAmount(com.google.shopping.type.Price value) {
if (minimumPurchaseAmountBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
minimumPurchaseAmount_ = value;
} else {
minimumPurchaseAmountBuilder_.setMessage(value);
}
bitField0_ |= 0x00004000;
onChanged();
return this;
}
/**
*
*
*
* Optional. [Minimum purchase
* amount](https://support.google.com/merchants/answer/13837705?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setMinimumPurchaseAmount(
com.google.shopping.type.Price.Builder builderForValue) {
if (minimumPurchaseAmountBuilder_ == null) {
minimumPurchaseAmount_ = builderForValue.build();
} else {
minimumPurchaseAmountBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00004000;
onChanged();
return this;
}
/**
*
*
*
* Optional. [Minimum purchase
* amount](https://support.google.com/merchants/answer/13837705?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeMinimumPurchaseAmount(com.google.shopping.type.Price value) {
if (minimumPurchaseAmountBuilder_ == null) {
if (((bitField0_ & 0x00004000) != 0)
&& minimumPurchaseAmount_ != null
&& minimumPurchaseAmount_ != com.google.shopping.type.Price.getDefaultInstance()) {
getMinimumPurchaseAmountBuilder().mergeFrom(value);
} else {
minimumPurchaseAmount_ = value;
}
} else {
minimumPurchaseAmountBuilder_.mergeFrom(value);
}
if (minimumPurchaseAmount_ != null) {
bitField0_ |= 0x00004000;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. [Minimum purchase
* amount](https://support.google.com/merchants/answer/13837705?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearMinimumPurchaseAmount() {
bitField0_ = (bitField0_ & ~0x00004000);
minimumPurchaseAmount_ = null;
if (minimumPurchaseAmountBuilder_ != null) {
minimumPurchaseAmountBuilder_.dispose();
minimumPurchaseAmountBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. [Minimum purchase
* amount](https://support.google.com/merchants/answer/13837705?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.shopping.type.Price.Builder getMinimumPurchaseAmountBuilder() {
bitField0_ |= 0x00004000;
onChanged();
return getMinimumPurchaseAmountFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. [Minimum purchase
* amount](https://support.google.com/merchants/answer/13837705?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.shopping.type.PriceOrBuilder getMinimumPurchaseAmountOrBuilder() {
if (minimumPurchaseAmountBuilder_ != null) {
return minimumPurchaseAmountBuilder_.getMessageOrBuilder();
} else {
return minimumPurchaseAmount_ == null
? com.google.shopping.type.Price.getDefaultInstance()
: minimumPurchaseAmount_;
}
}
/**
*
*
*
* Optional. [Minimum purchase
* amount](https://support.google.com/merchants/answer/13837705?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price minimum_purchase_amount = 15 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.shopping.type.Price,
com.google.shopping.type.Price.Builder,
com.google.shopping.type.PriceOrBuilder>
getMinimumPurchaseAmountFieldBuilder() {
if (minimumPurchaseAmountBuilder_ == null) {
minimumPurchaseAmountBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.shopping.type.Price,
com.google.shopping.type.Price.Builder,
com.google.shopping.type.PriceOrBuilder>(
getMinimumPurchaseAmount(), getParentForChildren(), isClean());
minimumPurchaseAmount_ = null;
}
return minimumPurchaseAmountBuilder_;
}
private long minimumPurchaseQuantity_;
/**
*
*
*
* Optional. [Minimum purchase
* quantity](https://support.google.com/merchants/answer/13838182?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* int64 minimum_purchase_quantity = 16 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The minimumPurchaseQuantity.
*/
@java.lang.Override
public long getMinimumPurchaseQuantity() {
return minimumPurchaseQuantity_;
}
/**
*
*
*
* Optional. [Minimum purchase
* quantity](https://support.google.com/merchants/answer/13838182?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* int64 minimum_purchase_quantity = 16 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The minimumPurchaseQuantity to set.
* @return This builder for chaining.
*/
public Builder setMinimumPurchaseQuantity(long value) {
minimumPurchaseQuantity_ = value;
bitField0_ |= 0x00008000;
onChanged();
return this;
}
/**
*
*
*
* Optional. [Minimum purchase
* quantity](https://support.google.com/merchants/answer/13838182?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* int64 minimum_purchase_quantity = 16 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearMinimumPurchaseQuantity() {
bitField0_ = (bitField0_ & ~0x00008000);
minimumPurchaseQuantity_ = 0L;
onChanged();
return this;
}
private long limitQuantity_;
/**
*
*
*
* Optional. [Maximum purchase
* quantity](https://support.google.com/merchants/answer/13861564?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* int64 limit_quantity = 17 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The limitQuantity.
*/
@java.lang.Override
public long getLimitQuantity() {
return limitQuantity_;
}
/**
*
*
*
* Optional. [Maximum purchase
* quantity](https://support.google.com/merchants/answer/13861564?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* int64 limit_quantity = 17 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The limitQuantity to set.
* @return This builder for chaining.
*/
public Builder setLimitQuantity(long value) {
limitQuantity_ = value;
bitField0_ |= 0x00010000;
onChanged();
return this;
}
/**
*
*
*
* Optional. [Maximum purchase
* quantity](https://support.google.com/merchants/answer/13861564?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* int64 limit_quantity = 17 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearLimitQuantity() {
bitField0_ = (bitField0_ & ~0x00010000);
limitQuantity_ = 0L;
onChanged();
return this;
}
private com.google.shopping.type.Price limitValue_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.shopping.type.Price,
com.google.shopping.type.Price.Builder,
com.google.shopping.type.PriceOrBuilder>
limitValueBuilder_;
/**
*
*
*
* Optional. [Maximum product
* price](https://support.google.com/merchants/answer/2906014) for
* promotion.
*
*
* .google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the limitValue field is set.
*/
public boolean hasLimitValue() {
return ((bitField0_ & 0x00020000) != 0);
}
/**
*
*
*
* Optional. [Maximum product
* price](https://support.google.com/merchants/answer/2906014) for
* promotion.
*
*
* .google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The limitValue.
*/
public com.google.shopping.type.Price getLimitValue() {
if (limitValueBuilder_ == null) {
return limitValue_ == null
? com.google.shopping.type.Price.getDefaultInstance()
: limitValue_;
} else {
return limitValueBuilder_.getMessage();
}
}
/**
*
*
*
* Optional. [Maximum product
* price](https://support.google.com/merchants/answer/2906014) for
* promotion.
*
*
* .google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setLimitValue(com.google.shopping.type.Price value) {
if (limitValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
limitValue_ = value;
} else {
limitValueBuilder_.setMessage(value);
}
bitField0_ |= 0x00020000;
onChanged();
return this;
}
/**
*
*
*
* Optional. [Maximum product
* price](https://support.google.com/merchants/answer/2906014) for
* promotion.
*
*
* .google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setLimitValue(com.google.shopping.type.Price.Builder builderForValue) {
if (limitValueBuilder_ == null) {
limitValue_ = builderForValue.build();
} else {
limitValueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00020000;
onChanged();
return this;
}
/**
*
*
*
* Optional. [Maximum product
* price](https://support.google.com/merchants/answer/2906014) for
* promotion.
*
*
* .google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeLimitValue(com.google.shopping.type.Price value) {
if (limitValueBuilder_ == null) {
if (((bitField0_ & 0x00020000) != 0)
&& limitValue_ != null
&& limitValue_ != com.google.shopping.type.Price.getDefaultInstance()) {
getLimitValueBuilder().mergeFrom(value);
} else {
limitValue_ = value;
}
} else {
limitValueBuilder_.mergeFrom(value);
}
if (limitValue_ != null) {
bitField0_ |= 0x00020000;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. [Maximum product
* price](https://support.google.com/merchants/answer/2906014) for
* promotion.
*
*
* .google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearLimitValue() {
bitField0_ = (bitField0_ & ~0x00020000);
limitValue_ = null;
if (limitValueBuilder_ != null) {
limitValueBuilder_.dispose();
limitValueBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. [Maximum product
* price](https://support.google.com/merchants/answer/2906014) for
* promotion.
*
*
* .google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.shopping.type.Price.Builder getLimitValueBuilder() {
bitField0_ |= 0x00020000;
onChanged();
return getLimitValueFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. [Maximum product
* price](https://support.google.com/merchants/answer/2906014) for
* promotion.
*
*
* .google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.shopping.type.PriceOrBuilder getLimitValueOrBuilder() {
if (limitValueBuilder_ != null) {
return limitValueBuilder_.getMessageOrBuilder();
} else {
return limitValue_ == null
? com.google.shopping.type.Price.getDefaultInstance()
: limitValue_;
}
}
/**
*
*
*
* Optional. [Maximum product
* price](https://support.google.com/merchants/answer/2906014) for
* promotion.
*
*
* .google.shopping.type.Price limit_value = 18 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.shopping.type.Price,
com.google.shopping.type.Price.Builder,
com.google.shopping.type.PriceOrBuilder>
getLimitValueFieldBuilder() {
if (limitValueBuilder_ == null) {
limitValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.shopping.type.Price,
com.google.shopping.type.Price.Builder,
com.google.shopping.type.PriceOrBuilder>(
getLimitValue(), getParentForChildren(), isClean());
limitValue_ = null;
}
return limitValueBuilder_;
}
private long percentOff_;
/**
*
*
*
* Optional. The [percentage
* discount](https://support.google.com/merchants/answer/13837404?sjid=17642868584668136159-NC)
* offered in the promotion.
*
*
* int64 percent_off = 19 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The percentOff.
*/
@java.lang.Override
public long getPercentOff() {
return percentOff_;
}
/**
*
*
*
* Optional. The [percentage
* discount](https://support.google.com/merchants/answer/13837404?sjid=17642868584668136159-NC)
* offered in the promotion.
*
*
* int64 percent_off = 19 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The percentOff to set.
* @return This builder for chaining.
*/
public Builder setPercentOff(long value) {
percentOff_ = value;
bitField0_ |= 0x00040000;
onChanged();
return this;
}
/**
*
*
*
* Optional. The [percentage
* discount](https://support.google.com/merchants/answer/13837404?sjid=17642868584668136159-NC)
* offered in the promotion.
*
*
* int64 percent_off = 19 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearPercentOff() {
bitField0_ = (bitField0_ & ~0x00040000);
percentOff_ = 0L;
onChanged();
return this;
}
private com.google.shopping.type.Price moneyOffAmount_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.shopping.type.Price,
com.google.shopping.type.Price.Builder,
com.google.shopping.type.PriceOrBuilder>
moneyOffAmountBuilder_;
/**
*
*
*
* Optional. The [money off
* amount](https://support.google.com/merchants/answer/13838101?ref_topic=13773355&sjid=17642868584668136159-NC)
* offered in the promotion.
*
*
*
* .google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the moneyOffAmount field is set.
*/
public boolean hasMoneyOffAmount() {
return ((bitField0_ & 0x00080000) != 0);
}
/**
*
*
*
* Optional. The [money off
* amount](https://support.google.com/merchants/answer/13838101?ref_topic=13773355&sjid=17642868584668136159-NC)
* offered in the promotion.
*
*
*
* .google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The moneyOffAmount.
*/
public com.google.shopping.type.Price getMoneyOffAmount() {
if (moneyOffAmountBuilder_ == null) {
return moneyOffAmount_ == null
? com.google.shopping.type.Price.getDefaultInstance()
: moneyOffAmount_;
} else {
return moneyOffAmountBuilder_.getMessage();
}
}
/**
*
*
*
* Optional. The [money off
* amount](https://support.google.com/merchants/answer/13838101?ref_topic=13773355&sjid=17642868584668136159-NC)
* offered in the promotion.
*
*
*
* .google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setMoneyOffAmount(com.google.shopping.type.Price value) {
if (moneyOffAmountBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
moneyOffAmount_ = value;
} else {
moneyOffAmountBuilder_.setMessage(value);
}
bitField0_ |= 0x00080000;
onChanged();
return this;
}
/**
*
*
*
* Optional. The [money off
* amount](https://support.google.com/merchants/answer/13838101?ref_topic=13773355&sjid=17642868584668136159-NC)
* offered in the promotion.
*
*
*
* .google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setMoneyOffAmount(com.google.shopping.type.Price.Builder builderForValue) {
if (moneyOffAmountBuilder_ == null) {
moneyOffAmount_ = builderForValue.build();
} else {
moneyOffAmountBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00080000;
onChanged();
return this;
}
/**
*
*
*
* Optional. The [money off
* amount](https://support.google.com/merchants/answer/13838101?ref_topic=13773355&sjid=17642868584668136159-NC)
* offered in the promotion.
*
*
*
* .google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeMoneyOffAmount(com.google.shopping.type.Price value) {
if (moneyOffAmountBuilder_ == null) {
if (((bitField0_ & 0x00080000) != 0)
&& moneyOffAmount_ != null
&& moneyOffAmount_ != com.google.shopping.type.Price.getDefaultInstance()) {
getMoneyOffAmountBuilder().mergeFrom(value);
} else {
moneyOffAmount_ = value;
}
} else {
moneyOffAmountBuilder_.mergeFrom(value);
}
if (moneyOffAmount_ != null) {
bitField0_ |= 0x00080000;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. The [money off
* amount](https://support.google.com/merchants/answer/13838101?ref_topic=13773355&sjid=17642868584668136159-NC)
* offered in the promotion.
*
*
*
* .google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearMoneyOffAmount() {
bitField0_ = (bitField0_ & ~0x00080000);
moneyOffAmount_ = null;
if (moneyOffAmountBuilder_ != null) {
moneyOffAmountBuilder_.dispose();
moneyOffAmountBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. The [money off
* amount](https://support.google.com/merchants/answer/13838101?ref_topic=13773355&sjid=17642868584668136159-NC)
* offered in the promotion.
*
*
*
* .google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.shopping.type.Price.Builder getMoneyOffAmountBuilder() {
bitField0_ |= 0x00080000;
onChanged();
return getMoneyOffAmountFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. The [money off
* amount](https://support.google.com/merchants/answer/13838101?ref_topic=13773355&sjid=17642868584668136159-NC)
* offered in the promotion.
*
*
*
* .google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.shopping.type.PriceOrBuilder getMoneyOffAmountOrBuilder() {
if (moneyOffAmountBuilder_ != null) {
return moneyOffAmountBuilder_.getMessageOrBuilder();
} else {
return moneyOffAmount_ == null
? com.google.shopping.type.Price.getDefaultInstance()
: moneyOffAmount_;
}
}
/**
*
*
*
* Optional. The [money off
* amount](https://support.google.com/merchants/answer/13838101?ref_topic=13773355&sjid=17642868584668136159-NC)
* offered in the promotion.
*
*
*
* .google.shopping.type.Price money_off_amount = 20 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.shopping.type.Price,
com.google.shopping.type.Price.Builder,
com.google.shopping.type.PriceOrBuilder>
getMoneyOffAmountFieldBuilder() {
if (moneyOffAmountBuilder_ == null) {
moneyOffAmountBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.shopping.type.Price,
com.google.shopping.type.Price.Builder,
com.google.shopping.type.PriceOrBuilder>(
getMoneyOffAmount(), getParentForChildren(), isClean());
moneyOffAmount_ = null;
}
return moneyOffAmountBuilder_;
}
private long getThisQuantityDiscounted_;
/**
*
*
*
* 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];
*
*
* @return The getThisQuantityDiscounted.
*/
@java.lang.Override
public long getGetThisQuantityDiscounted() {
return getThisQuantityDiscounted_;
}
/**
*
*
*
* 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];
*
*
* @param value The getThisQuantityDiscounted to set.
* @return This builder for chaining.
*/
public Builder setGetThisQuantityDiscounted(long value) {
getThisQuantityDiscounted_ = value;
bitField0_ |= 0x00100000;
onChanged();
return this;
}
/**
*
*
*
* 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];
*
*
* @return This builder for chaining.
*/
public Builder clearGetThisQuantityDiscounted() {
bitField0_ = (bitField0_ & ~0x00100000);
getThisQuantityDiscounted_ = 0L;
onChanged();
return this;
}
private com.google.shopping.type.Price freeGiftValue_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.shopping.type.Price,
com.google.shopping.type.Price.Builder,
com.google.shopping.type.PriceOrBuilder>
freeGiftValueBuilder_;
/**
*
*
*
* Optional. [Free gift
* value](https://support.google.com/merchants/answer/13844477?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the freeGiftValue field is set.
*/
public boolean hasFreeGiftValue() {
return ((bitField0_ & 0x00200000) != 0);
}
/**
*
*
*
* Optional. [Free gift
* value](https://support.google.com/merchants/answer/13844477?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The freeGiftValue.
*/
public com.google.shopping.type.Price getFreeGiftValue() {
if (freeGiftValueBuilder_ == null) {
return freeGiftValue_ == null
? com.google.shopping.type.Price.getDefaultInstance()
: freeGiftValue_;
} else {
return freeGiftValueBuilder_.getMessage();
}
}
/**
*
*
*
* Optional. [Free gift
* value](https://support.google.com/merchants/answer/13844477?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setFreeGiftValue(com.google.shopping.type.Price value) {
if (freeGiftValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
freeGiftValue_ = value;
} else {
freeGiftValueBuilder_.setMessage(value);
}
bitField0_ |= 0x00200000;
onChanged();
return this;
}
/**
*
*
*
* Optional. [Free gift
* value](https://support.google.com/merchants/answer/13844477?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setFreeGiftValue(com.google.shopping.type.Price.Builder builderForValue) {
if (freeGiftValueBuilder_ == null) {
freeGiftValue_ = builderForValue.build();
} else {
freeGiftValueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00200000;
onChanged();
return this;
}
/**
*
*
*
* Optional. [Free gift
* value](https://support.google.com/merchants/answer/13844477?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeFreeGiftValue(com.google.shopping.type.Price value) {
if (freeGiftValueBuilder_ == null) {
if (((bitField0_ & 0x00200000) != 0)
&& freeGiftValue_ != null
&& freeGiftValue_ != com.google.shopping.type.Price.getDefaultInstance()) {
getFreeGiftValueBuilder().mergeFrom(value);
} else {
freeGiftValue_ = value;
}
} else {
freeGiftValueBuilder_.mergeFrom(value);
}
if (freeGiftValue_ != null) {
bitField0_ |= 0x00200000;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. [Free gift
* value](https://support.google.com/merchants/answer/13844477?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearFreeGiftValue() {
bitField0_ = (bitField0_ & ~0x00200000);
freeGiftValue_ = null;
if (freeGiftValueBuilder_ != null) {
freeGiftValueBuilder_.dispose();
freeGiftValueBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. [Free gift
* value](https://support.google.com/merchants/answer/13844477?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.shopping.type.Price.Builder getFreeGiftValueBuilder() {
bitField0_ |= 0x00200000;
onChanged();
return getFreeGiftValueFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. [Free gift
* value](https://support.google.com/merchants/answer/13844477?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.shopping.type.PriceOrBuilder getFreeGiftValueOrBuilder() {
if (freeGiftValueBuilder_ != null) {
return freeGiftValueBuilder_.getMessageOrBuilder();
} else {
return freeGiftValue_ == null
? com.google.shopping.type.Price.getDefaultInstance()
: freeGiftValue_;
}
}
/**
*
*
*
* Optional. [Free gift
* value](https://support.google.com/merchants/answer/13844477?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
*
* .google.shopping.type.Price free_gift_value = 22 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.shopping.type.Price,
com.google.shopping.type.Price.Builder,
com.google.shopping.type.PriceOrBuilder>
getFreeGiftValueFieldBuilder() {
if (freeGiftValueBuilder_ == null) {
freeGiftValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.shopping.type.Price,
com.google.shopping.type.Price.Builder,
com.google.shopping.type.PriceOrBuilder>(
getFreeGiftValue(), getParentForChildren(), isClean());
freeGiftValue_ = null;
}
return freeGiftValueBuilder_;
}
private java.lang.Object freeGiftDescription_ = "";
/**
*
*
*
* Optional. [Free gift
* description](https://support.google.com/merchants/answer/13847245?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string free_gift_description = 23 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The freeGiftDescription.
*/
public java.lang.String getFreeGiftDescription() {
java.lang.Object ref = freeGiftDescription_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
freeGiftDescription_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Optional. [Free gift
* description](https://support.google.com/merchants/answer/13847245?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string free_gift_description = 23 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for freeGiftDescription.
*/
public com.google.protobuf.ByteString getFreeGiftDescriptionBytes() {
java.lang.Object ref = freeGiftDescription_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
freeGiftDescription_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. [Free gift
* description](https://support.google.com/merchants/answer/13847245?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string free_gift_description = 23 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The freeGiftDescription to set.
* @return This builder for chaining.
*/
public Builder setFreeGiftDescription(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
freeGiftDescription_ = value;
bitField0_ |= 0x00400000;
onChanged();
return this;
}
/**
*
*
*
* Optional. [Free gift
* description](https://support.google.com/merchants/answer/13847245?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string free_gift_description = 23 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearFreeGiftDescription() {
freeGiftDescription_ = getDefaultInstance().getFreeGiftDescription();
bitField0_ = (bitField0_ & ~0x00400000);
onChanged();
return this;
}
/**
*
*
*
* Optional. [Free gift
* description](https://support.google.com/merchants/answer/13847245?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string free_gift_description = 23 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for freeGiftDescription to set.
* @return This builder for chaining.
*/
public Builder setFreeGiftDescriptionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
freeGiftDescription_ = value;
bitField0_ |= 0x00400000;
onChanged();
return this;
}
private java.lang.Object freeGiftItemId_ = "";
/**
*
*
*
* Optional. [Free gift item
* ID](https://support.google.com/merchants/answer/13857152?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string free_gift_item_id = 24 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The freeGiftItemId.
*/
public java.lang.String getFreeGiftItemId() {
java.lang.Object ref = freeGiftItemId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
freeGiftItemId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Optional. [Free gift item
* ID](https://support.google.com/merchants/answer/13857152?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string free_gift_item_id = 24 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for freeGiftItemId.
*/
public com.google.protobuf.ByteString getFreeGiftItemIdBytes() {
java.lang.Object ref = freeGiftItemId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
freeGiftItemId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. [Free gift item
* ID](https://support.google.com/merchants/answer/13857152?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string free_gift_item_id = 24 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The freeGiftItemId to set.
* @return This builder for chaining.
*/
public Builder setFreeGiftItemId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
freeGiftItemId_ = value;
bitField0_ |= 0x00800000;
onChanged();
return this;
}
/**
*
*
*
* Optional. [Free gift item
* ID](https://support.google.com/merchants/answer/13857152?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string free_gift_item_id = 24 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearFreeGiftItemId() {
freeGiftItemId_ = getDefaultInstance().getFreeGiftItemId();
bitField0_ = (bitField0_ & ~0x00800000);
onChanged();
return this;
}
/**
*
*
*
* Optional. [Free gift item
* ID](https://support.google.com/merchants/answer/13857152?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion.
*
*
* string free_gift_item_id = 24 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for freeGiftItemId to set.
* @return This builder for chaining.
*/
public Builder setFreeGiftItemIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
freeGiftItemId_ = value;
bitField0_ |= 0x00800000;
onChanged();
return this;
}
private com.google.type.Interval promotionEffectiveTimePeriod_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.Interval,
com.google.type.Interval.Builder,
com.google.type.IntervalOrBuilder>
promotionEffectiveTimePeriodBuilder_;
/**
*
*
*
* 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];
*
*
* @return Whether the promotionEffectiveTimePeriod field is set.
*/
public boolean hasPromotionEffectiveTimePeriod() {
return ((bitField0_ & 0x01000000) != 0);
}
/**
*
*
*
* 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];
*
*
* @return The promotionEffectiveTimePeriod.
*/
public com.google.type.Interval getPromotionEffectiveTimePeriod() {
if (promotionEffectiveTimePeriodBuilder_ == null) {
return promotionEffectiveTimePeriod_ == null
? com.google.type.Interval.getDefaultInstance()
: promotionEffectiveTimePeriod_;
} else {
return promotionEffectiveTimePeriodBuilder_.getMessage();
}
}
/**
*
*
*
* 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];
*
*/
public Builder setPromotionEffectiveTimePeriod(com.google.type.Interval value) {
if (promotionEffectiveTimePeriodBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
promotionEffectiveTimePeriod_ = value;
} else {
promotionEffectiveTimePeriodBuilder_.setMessage(value);
}
bitField0_ |= 0x01000000;
onChanged();
return this;
}
/**
*
*
*
* 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];
*
*/
public Builder setPromotionEffectiveTimePeriod(
com.google.type.Interval.Builder builderForValue) {
if (promotionEffectiveTimePeriodBuilder_ == null) {
promotionEffectiveTimePeriod_ = builderForValue.build();
} else {
promotionEffectiveTimePeriodBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x01000000;
onChanged();
return this;
}
/**
*
*
*
* 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];
*
*/
public Builder mergePromotionEffectiveTimePeriod(com.google.type.Interval value) {
if (promotionEffectiveTimePeriodBuilder_ == null) {
if (((bitField0_ & 0x01000000) != 0)
&& promotionEffectiveTimePeriod_ != null
&& promotionEffectiveTimePeriod_ != com.google.type.Interval.getDefaultInstance()) {
getPromotionEffectiveTimePeriodBuilder().mergeFrom(value);
} else {
promotionEffectiveTimePeriod_ = value;
}
} else {
promotionEffectiveTimePeriodBuilder_.mergeFrom(value);
}
if (promotionEffectiveTimePeriod_ != null) {
bitField0_ |= 0x01000000;
onChanged();
}
return this;
}
/**
*
*
*
* 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];
*
*/
public Builder clearPromotionEffectiveTimePeriod() {
bitField0_ = (bitField0_ & ~0x01000000);
promotionEffectiveTimePeriod_ = null;
if (promotionEffectiveTimePeriodBuilder_ != null) {
promotionEffectiveTimePeriodBuilder_.dispose();
promotionEffectiveTimePeriodBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* 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];
*
*/
public com.google.type.Interval.Builder getPromotionEffectiveTimePeriodBuilder() {
bitField0_ |= 0x01000000;
onChanged();
return getPromotionEffectiveTimePeriodFieldBuilder().getBuilder();
}
/**
*
*
*
* 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];
*
*/
public com.google.type.IntervalOrBuilder getPromotionEffectiveTimePeriodOrBuilder() {
if (promotionEffectiveTimePeriodBuilder_ != null) {
return promotionEffectiveTimePeriodBuilder_.getMessageOrBuilder();
} else {
return promotionEffectiveTimePeriod_ == null
? com.google.type.Interval.getDefaultInstance()
: promotionEffectiveTimePeriod_;
}
}
/**
*
*
*
* 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];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.Interval,
com.google.type.Interval.Builder,
com.google.type.IntervalOrBuilder>
getPromotionEffectiveTimePeriodFieldBuilder() {
if (promotionEffectiveTimePeriodBuilder_ == null) {
promotionEffectiveTimePeriodBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.type.Interval,
com.google.type.Interval.Builder,
com.google.type.IntervalOrBuilder>(
getPromotionEffectiveTimePeriod(), getParentForChildren(), isClean());
promotionEffectiveTimePeriod_ = null;
}
return promotionEffectiveTimePeriodBuilder_;
}
private com.google.type.Interval promotionDisplayTimePeriod_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.Interval,
com.google.type.Interval.Builder,
com.google.type.IntervalOrBuilder>
promotionDisplayTimePeriodBuilder_;
/**
*
*
*
* 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];
*
*
* @return Whether the promotionDisplayTimePeriod field is set.
*/
public boolean hasPromotionDisplayTimePeriod() {
return ((bitField0_ & 0x02000000) != 0);
}
/**
*
*
*
* 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];
*
*
* @return The promotionDisplayTimePeriod.
*/
public com.google.type.Interval getPromotionDisplayTimePeriod() {
if (promotionDisplayTimePeriodBuilder_ == null) {
return promotionDisplayTimePeriod_ == null
? com.google.type.Interval.getDefaultInstance()
: promotionDisplayTimePeriod_;
} else {
return promotionDisplayTimePeriodBuilder_.getMessage();
}
}
/**
*
*
*
* 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];
*
*/
public Builder setPromotionDisplayTimePeriod(com.google.type.Interval value) {
if (promotionDisplayTimePeriodBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
promotionDisplayTimePeriod_ = value;
} else {
promotionDisplayTimePeriodBuilder_.setMessage(value);
}
bitField0_ |= 0x02000000;
onChanged();
return this;
}
/**
*
*
*
* 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];
*
*/
public Builder setPromotionDisplayTimePeriod(com.google.type.Interval.Builder builderForValue) {
if (promotionDisplayTimePeriodBuilder_ == null) {
promotionDisplayTimePeriod_ = builderForValue.build();
} else {
promotionDisplayTimePeriodBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x02000000;
onChanged();
return this;
}
/**
*
*
*
* 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];
*
*/
public Builder mergePromotionDisplayTimePeriod(com.google.type.Interval value) {
if (promotionDisplayTimePeriodBuilder_ == null) {
if (((bitField0_ & 0x02000000) != 0)
&& promotionDisplayTimePeriod_ != null
&& promotionDisplayTimePeriod_ != com.google.type.Interval.getDefaultInstance()) {
getPromotionDisplayTimePeriodBuilder().mergeFrom(value);
} else {
promotionDisplayTimePeriod_ = value;
}
} else {
promotionDisplayTimePeriodBuilder_.mergeFrom(value);
}
if (promotionDisplayTimePeriod_ != null) {
bitField0_ |= 0x02000000;
onChanged();
}
return this;
}
/**
*
*
*
* 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];
*
*/
public Builder clearPromotionDisplayTimePeriod() {
bitField0_ = (bitField0_ & ~0x02000000);
promotionDisplayTimePeriod_ = null;
if (promotionDisplayTimePeriodBuilder_ != null) {
promotionDisplayTimePeriodBuilder_.dispose();
promotionDisplayTimePeriodBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* 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];
*
*/
public com.google.type.Interval.Builder getPromotionDisplayTimePeriodBuilder() {
bitField0_ |= 0x02000000;
onChanged();
return getPromotionDisplayTimePeriodFieldBuilder().getBuilder();
}
/**
*
*
*
* 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];
*
*/
public com.google.type.IntervalOrBuilder getPromotionDisplayTimePeriodOrBuilder() {
if (promotionDisplayTimePeriodBuilder_ != null) {
return promotionDisplayTimePeriodBuilder_.getMessageOrBuilder();
} else {
return promotionDisplayTimePeriod_ == null
? com.google.type.Interval.getDefaultInstance()
: promotionDisplayTimePeriod_;
}
}
/**
*
*
*
* 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];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.Interval,
com.google.type.Interval.Builder,
com.google.type.IntervalOrBuilder>
getPromotionDisplayTimePeriodFieldBuilder() {
if (promotionDisplayTimePeriodBuilder_ == null) {
promotionDisplayTimePeriodBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.type.Interval,
com.google.type.Interval.Builder,
com.google.type.IntervalOrBuilder>(
getPromotionDisplayTimePeriod(), getParentForChildren(), isClean());
promotionDisplayTimePeriod_ = null;
}
return promotionDisplayTimePeriodBuilder_;
}
private int storeApplicability_ = 0;
/**
*
*
*
* Optional. Whether the promotion applies to [all stores, or only specified
* stores](https://support.google.com/merchants/answer/13857563?sjid=17642868584668136159-NC).
* 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];
*
*
* @return The enum numeric value on the wire for storeApplicability.
*/
@java.lang.Override
public int getStoreApplicabilityValue() {
return storeApplicability_;
}
/**
*
*
*
* Optional. Whether the promotion applies to [all stores, or only specified
* stores](https://support.google.com/merchants/answer/13857563?sjid=17642868584668136159-NC).
* 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];
*
*
* @param value The enum numeric value on the wire for storeApplicability to set.
* @return This builder for chaining.
*/
public Builder setStoreApplicabilityValue(int value) {
storeApplicability_ = value;
bitField0_ |= 0x04000000;
onChanged();
return this;
}
/**
*
*
*
* Optional. Whether the promotion applies to [all stores, or only specified
* stores](https://support.google.com/merchants/answer/13857563?sjid=17642868584668136159-NC).
* 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];
*
*
* @return The storeApplicability.
*/
@java.lang.Override
public com.google.shopping.merchant.promotions.v1beta.StoreApplicability
getStoreApplicability() {
com.google.shopping.merchant.promotions.v1beta.StoreApplicability result =
com.google.shopping.merchant.promotions.v1beta.StoreApplicability.forNumber(
storeApplicability_);
return result == null
? com.google.shopping.merchant.promotions.v1beta.StoreApplicability.UNRECOGNIZED
: result;
}
/**
*
*
*
* Optional. Whether the promotion applies to [all stores, or only specified
* stores](https://support.google.com/merchants/answer/13857563?sjid=17642868584668136159-NC).
* 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];
*
*
* @param value The storeApplicability to set.
* @return This builder for chaining.
*/
public Builder setStoreApplicability(
com.google.shopping.merchant.promotions.v1beta.StoreApplicability value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x04000000;
storeApplicability_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. Whether the promotion applies to [all stores, or only specified
* stores](https://support.google.com/merchants/answer/13857563?sjid=17642868584668136159-NC).
* 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];
*
*
* @return This builder for chaining.
*/
public Builder clearStoreApplicability() {
bitField0_ = (bitField0_ & ~0x04000000);
storeApplicability_ = 0;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList storeCodesInclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureStoreCodesInclusionIsMutable() {
if (!storeCodesInclusion_.isModifiable()) {
storeCodesInclusion_ = new com.google.protobuf.LazyStringArrayList(storeCodesInclusion_);
}
bitField0_ |= 0x08000000;
}
/**
*
*
*
* Optional. [Store codes to
* include](https://support.google.com/merchants/answer/13857470?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
* 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](https://support.google.com/merchants/answer/3061342) for
* more information.
*
*
* repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return A list containing the storeCodesInclusion.
*/
public com.google.protobuf.ProtocolStringList getStoreCodesInclusionList() {
storeCodesInclusion_.makeImmutable();
return storeCodesInclusion_;
}
/**
*
*
*
* Optional. [Store codes to
* include](https://support.google.com/merchants/answer/13857470?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
* 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](https://support.google.com/merchants/answer/3061342) for
* more information.
*
*
* repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The count of storeCodesInclusion.
*/
public int getStoreCodesInclusionCount() {
return storeCodesInclusion_.size();
}
/**
*
*
*
* Optional. [Store codes to
* include](https://support.google.com/merchants/answer/13857470?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
* 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](https://support.google.com/merchants/answer/3061342) for
* more information.
*
*
* repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the element to return.
* @return The storeCodesInclusion at the given index.
*/
public java.lang.String getStoreCodesInclusion(int index) {
return storeCodesInclusion_.get(index);
}
/**
*
*
*
* Optional. [Store codes to
* include](https://support.google.com/merchants/answer/13857470?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
* 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](https://support.google.com/merchants/answer/3061342) for
* more information.
*
*
* repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the value to return.
* @return The bytes of the storeCodesInclusion at the given index.
*/
public com.google.protobuf.ByteString getStoreCodesInclusionBytes(int index) {
return storeCodesInclusion_.getByteString(index);
}
/**
*
*
*
* Optional. [Store codes to
* include](https://support.google.com/merchants/answer/13857470?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
* 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](https://support.google.com/merchants/answer/3061342) for
* more information.
*
*
* repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index to set the value at.
* @param value The storeCodesInclusion to set.
* @return This builder for chaining.
*/
public Builder setStoreCodesInclusion(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureStoreCodesInclusionIsMutable();
storeCodesInclusion_.set(index, value);
bitField0_ |= 0x08000000;
onChanged();
return this;
}
/**
*
*
*
* Optional. [Store codes to
* include](https://support.google.com/merchants/answer/13857470?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
* 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](https://support.google.com/merchants/answer/3061342) for
* more information.
*
*
* repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The storeCodesInclusion to add.
* @return This builder for chaining.
*/
public Builder addStoreCodesInclusion(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureStoreCodesInclusionIsMutable();
storeCodesInclusion_.add(value);
bitField0_ |= 0x08000000;
onChanged();
return this;
}
/**
*
*
*
* Optional. [Store codes to
* include](https://support.google.com/merchants/answer/13857470?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
* 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](https://support.google.com/merchants/answer/3061342) for
* more information.
*
*
* repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param values The storeCodesInclusion to add.
* @return This builder for chaining.
*/
public Builder addAllStoreCodesInclusion(java.lang.Iterable values) {
ensureStoreCodesInclusionIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, storeCodesInclusion_);
bitField0_ |= 0x08000000;
onChanged();
return this;
}
/**
*
*
*
* Optional. [Store codes to
* include](https://support.google.com/merchants/answer/13857470?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
* 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](https://support.google.com/merchants/answer/3061342) for
* more information.
*
*
* repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearStoreCodesInclusion() {
storeCodesInclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x08000000);
;
onChanged();
return this;
}
/**
*
*
*
* Optional. [Store codes to
* include](https://support.google.com/merchants/answer/13857470?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
* 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](https://support.google.com/merchants/answer/3061342) for
* more information.
*
*
* repeated string store_codes_inclusion = 29 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The bytes of the storeCodesInclusion to add.
* @return This builder for chaining.
*/
public Builder addStoreCodesInclusionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureStoreCodesInclusionIsMutable();
storeCodesInclusion_.add(value);
bitField0_ |= 0x08000000;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList storeCodesExclusion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureStoreCodesExclusionIsMutable() {
if (!storeCodesExclusion_.isModifiable()) {
storeCodesExclusion_ = new com.google.protobuf.LazyStringArrayList(storeCodesExclusion_);
}
bitField0_ |= 0x10000000;
}
/**
*
*
*
* Optional. [Store codes to
* exclude](https://support.google.com/merchants/answer/13859586?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return A list containing the storeCodesExclusion.
*/
public com.google.protobuf.ProtocolStringList getStoreCodesExclusionList() {
storeCodesExclusion_.makeImmutable();
return storeCodesExclusion_;
}
/**
*
*
*
* Optional. [Store codes to
* exclude](https://support.google.com/merchants/answer/13859586?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The count of storeCodesExclusion.
*/
public int getStoreCodesExclusionCount() {
return storeCodesExclusion_.size();
}
/**
*
*
*
* Optional. [Store codes to
* exclude](https://support.google.com/merchants/answer/13859586?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the element to return.
* @return The storeCodesExclusion at the given index.
*/
public java.lang.String getStoreCodesExclusion(int index) {
return storeCodesExclusion_.get(index);
}
/**
*
*
*
* Optional. [Store codes to
* exclude](https://support.google.com/merchants/answer/13859586?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the value to return.
* @return The bytes of the storeCodesExclusion at the given index.
*/
public com.google.protobuf.ByteString getStoreCodesExclusionBytes(int index) {
return storeCodesExclusion_.getByteString(index);
}
/**
*
*
*
* Optional. [Store codes to
* exclude](https://support.google.com/merchants/answer/13859586?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index to set the value at.
* @param value The storeCodesExclusion to set.
* @return This builder for chaining.
*/
public Builder setStoreCodesExclusion(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureStoreCodesExclusionIsMutable();
storeCodesExclusion_.set(index, value);
bitField0_ |= 0x10000000;
onChanged();
return this;
}
/**
*
*
*
* Optional. [Store codes to
* exclude](https://support.google.com/merchants/answer/13859586?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The storeCodesExclusion to add.
* @return This builder for chaining.
*/
public Builder addStoreCodesExclusion(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureStoreCodesExclusionIsMutable();
storeCodesExclusion_.add(value);
bitField0_ |= 0x10000000;
onChanged();
return this;
}
/**
*
*
*
* Optional. [Store codes to
* exclude](https://support.google.com/merchants/answer/13859586?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param values The storeCodesExclusion to add.
* @return This builder for chaining.
*/
public Builder addAllStoreCodesExclusion(java.lang.Iterable values) {
ensureStoreCodesExclusionIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, storeCodesExclusion_);
bitField0_ |= 0x10000000;
onChanged();
return this;
}
/**
*
*
*
* Optional. [Store codes to
* exclude](https://support.google.com/merchants/answer/13859586?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearStoreCodesExclusion() {
storeCodesExclusion_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x10000000);
;
onChanged();
return this;
}
/**
*
*
*
* Optional. [Store codes to
* exclude](https://support.google.com/merchants/answer/13859586?ref_topic=13773355&sjid=17642868584668136159-NC)
* for the promotion. The store filter attributes only applies when the
* `store_applicability` attribute is set to
* [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
*
*
* repeated string store_codes_exclusion = 30 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The bytes of the storeCodesExclusion to add.
* @return This builder for chaining.
*/
public Builder addStoreCodesExclusionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureStoreCodesExclusionIsMutable();
storeCodesExclusion_.add(value);
bitField0_ |= 0x10000000;
onChanged();
return this;
}
private java.lang.Object promotionUrl_ = "";
/**
*
*
*
* 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];
*
* @return The promotionUrl.
*/
public java.lang.String getPromotionUrl() {
java.lang.Object ref = promotionUrl_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
promotionUrl_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* 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];
*
* @return The bytes for promotionUrl.
*/
public com.google.protobuf.ByteString getPromotionUrlBytes() {
java.lang.Object ref = promotionUrl_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
promotionUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* 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];
*
* @param value The promotionUrl to set.
* @return This builder for chaining.
*/
public Builder setPromotionUrl(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
promotionUrl_ = value;
bitField0_ |= 0x20000000;
onChanged();
return this;
}
/**
*
*
*
* 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];
*
* @return This builder for chaining.
*/
public Builder clearPromotionUrl() {
promotionUrl_ = getDefaultInstance().getPromotionUrl();
bitField0_ = (bitField0_ & ~0x20000000);
onChanged();
return this;
}
/**
*
*
*
* 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];
*
* @param value The bytes for promotionUrl to set.
* @return This builder for chaining.
*/
public Builder setPromotionUrlBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
promotionUrl_ = value;
bitField0_ |= 0x20000000;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.shopping.merchant.promotions.v1beta.Attributes)
}
// @@protoc_insertion_point(class_scope:google.shopping.merchant.promotions.v1beta.Attributes)
private static final com.google.shopping.merchant.promotions.v1beta.Attributes DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.shopping.merchant.promotions.v1beta.Attributes();
}
public static com.google.shopping.merchant.promotions.v1beta.Attributes getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Attributes parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.shopping.merchant.promotions.v1beta.Attributes getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}