Class PromotionFeedItem

  • All Implemented Interfaces:
    PromotionFeedItemOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.io.Serializable

    public final class PromotionFeedItem
    extends com.google.protobuf.GeneratedMessageV3
    implements PromotionFeedItemOrBuilder
     Represents a Promotion extension.
     
    Protobuf type google.ads.googleads.v10.common.PromotionFeedItem
    See Also:
    Serialized Form
    • Field Detail

      • PROMOTION_TARGET_FIELD_NUMBER

        public static final int PROMOTION_TARGET_FIELD_NUMBER
        See Also:
        Constant Field Values
      • DISCOUNT_MODIFIER_FIELD_NUMBER

        public static final int DISCOUNT_MODIFIER_FIELD_NUMBER
        See Also:
        Constant Field Values
      • PROMOTION_START_DATE_FIELD_NUMBER

        public static final int PROMOTION_START_DATE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • PROMOTION_END_DATE_FIELD_NUMBER

        public static final int PROMOTION_END_DATE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • FINAL_URLS_FIELD_NUMBER

        public static final int FINAL_URLS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • FINAL_MOBILE_URLS_FIELD_NUMBER

        public static final int FINAL_MOBILE_URLS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TRACKING_URL_TEMPLATE_FIELD_NUMBER

        public static final int TRACKING_URL_TEMPLATE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • URL_CUSTOM_PARAMETERS_FIELD_NUMBER

        public static final int URL_CUSTOM_PARAMETERS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • FINAL_URL_SUFFIX_FIELD_NUMBER

        public static final int FINAL_URL_SUFFIX_FIELD_NUMBER
        See Also:
        Constant Field Values
      • LANGUAGE_CODE_FIELD_NUMBER

        public static final int LANGUAGE_CODE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • PERCENT_OFF_FIELD_NUMBER

        public static final int PERCENT_OFF_FIELD_NUMBER
        See Also:
        Constant Field Values
      • MONEY_AMOUNT_OFF_FIELD_NUMBER

        public static final int MONEY_AMOUNT_OFF_FIELD_NUMBER
        See Also:
        Constant Field Values
      • PROMOTION_CODE_FIELD_NUMBER

        public static final int PROMOTION_CODE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ORDERS_OVER_AMOUNT_FIELD_NUMBER

        public static final int ORDERS_OVER_AMOUNT_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • hasPromotionTarget

        public boolean hasPromotionTarget()
         A freeform description of what the promotion is targeting.
         This field is required.
         
        optional string promotion_target = 16;
        Specified by:
        hasPromotionTarget in interface PromotionFeedItemOrBuilder
        Returns:
        Whether the promotionTarget field is set.
      • getPromotionTarget

        public java.lang.String getPromotionTarget()
         A freeform description of what the promotion is targeting.
         This field is required.
         
        optional string promotion_target = 16;
        Specified by:
        getPromotionTarget in interface PromotionFeedItemOrBuilder
        Returns:
        The promotionTarget.
      • getPromotionTargetBytes

        public com.google.protobuf.ByteString getPromotionTargetBytes()
         A freeform description of what the promotion is targeting.
         This field is required.
         
        optional string promotion_target = 16;
        Specified by:
        getPromotionTargetBytes in interface PromotionFeedItemOrBuilder
        Returns:
        The bytes for promotionTarget.
      • getDiscountModifierValue

        public int getDiscountModifierValue()
         Enum that modifies the qualification of the discount.
         
        .google.ads.googleads.v10.enums.PromotionExtensionDiscountModifierEnum.PromotionExtensionDiscountModifier discount_modifier = 2;
        Specified by:
        getDiscountModifierValue in interface PromotionFeedItemOrBuilder
        Returns:
        The enum numeric value on the wire for discountModifier.
      • hasPromotionStartDate

        public boolean hasPromotionStartDate()
         Start date of when the promotion is eligible to be redeemed.
         
        optional string promotion_start_date = 19;
        Specified by:
        hasPromotionStartDate in interface PromotionFeedItemOrBuilder
        Returns:
        Whether the promotionStartDate field is set.
      • getPromotionStartDate

        public java.lang.String getPromotionStartDate()
         Start date of when the promotion is eligible to be redeemed.
         
        optional string promotion_start_date = 19;
        Specified by:
        getPromotionStartDate in interface PromotionFeedItemOrBuilder
        Returns:
        The promotionStartDate.
      • getPromotionStartDateBytes

        public com.google.protobuf.ByteString getPromotionStartDateBytes()
         Start date of when the promotion is eligible to be redeemed.
         
        optional string promotion_start_date = 19;
        Specified by:
        getPromotionStartDateBytes in interface PromotionFeedItemOrBuilder
        Returns:
        The bytes for promotionStartDate.
      • hasPromotionEndDate

        public boolean hasPromotionEndDate()
         Last date when the promotion is eligible to be redeemed.
         
        optional string promotion_end_date = 20;
        Specified by:
        hasPromotionEndDate in interface PromotionFeedItemOrBuilder
        Returns:
        Whether the promotionEndDate field is set.
      • getPromotionEndDate

        public java.lang.String getPromotionEndDate()
         Last date when the promotion is eligible to be redeemed.
         
        optional string promotion_end_date = 20;
        Specified by:
        getPromotionEndDate in interface PromotionFeedItemOrBuilder
        Returns:
        The promotionEndDate.
      • getPromotionEndDateBytes

        public com.google.protobuf.ByteString getPromotionEndDateBytes()
         Last date when the promotion is eligible to be redeemed.
         
        optional string promotion_end_date = 20;
        Specified by:
        getPromotionEndDateBytes in interface PromotionFeedItemOrBuilder
        Returns:
        The bytes for promotionEndDate.
      • getOccasionValue

        public int getOccasionValue()
         The occasion the promotion was intended for.
         If an occasion is set, the redemption window will need to fall within
         the date range associated with the occasion.
         
        .google.ads.googleads.v10.enums.PromotionExtensionOccasionEnum.PromotionExtensionOccasion occasion = 9;
        Specified by:
        getOccasionValue in interface PromotionFeedItemOrBuilder
        Returns:
        The enum numeric value on the wire for occasion.
      • getFinalUrlsList

        public com.google.protobuf.ProtocolStringList getFinalUrlsList()
         A list of possible final URLs after all cross domain redirects.
         This field is required.
         
        repeated string final_urls = 21;
        Specified by:
        getFinalUrlsList in interface PromotionFeedItemOrBuilder
        Returns:
        A list containing the finalUrls.
      • getFinalUrlsCount

        public int getFinalUrlsCount()
         A list of possible final URLs after all cross domain redirects.
         This field is required.
         
        repeated string final_urls = 21;
        Specified by:
        getFinalUrlsCount in interface PromotionFeedItemOrBuilder
        Returns:
        The count of finalUrls.
      • getFinalUrls

        public java.lang.String getFinalUrls​(int index)
         A list of possible final URLs after all cross domain redirects.
         This field is required.
         
        repeated string final_urls = 21;
        Specified by:
        getFinalUrls in interface PromotionFeedItemOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The finalUrls at the given index.
      • getFinalUrlsBytes

        public com.google.protobuf.ByteString getFinalUrlsBytes​(int index)
         A list of possible final URLs after all cross domain redirects.
         This field is required.
         
        repeated string final_urls = 21;
        Specified by:
        getFinalUrlsBytes in interface PromotionFeedItemOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the finalUrls at the given index.
      • getFinalMobileUrlsList

        public com.google.protobuf.ProtocolStringList getFinalMobileUrlsList()
         A list of possible final mobile URLs after all cross domain redirects.
         
        repeated string final_mobile_urls = 22;
        Specified by:
        getFinalMobileUrlsList in interface PromotionFeedItemOrBuilder
        Returns:
        A list containing the finalMobileUrls.
      • getFinalMobileUrlsCount

        public int getFinalMobileUrlsCount()
         A list of possible final mobile URLs after all cross domain redirects.
         
        repeated string final_mobile_urls = 22;
        Specified by:
        getFinalMobileUrlsCount in interface PromotionFeedItemOrBuilder
        Returns:
        The count of finalMobileUrls.
      • getFinalMobileUrls

        public java.lang.String getFinalMobileUrls​(int index)
         A list of possible final mobile URLs after all cross domain redirects.
         
        repeated string final_mobile_urls = 22;
        Specified by:
        getFinalMobileUrls in interface PromotionFeedItemOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The finalMobileUrls at the given index.
      • getFinalMobileUrlsBytes

        public com.google.protobuf.ByteString getFinalMobileUrlsBytes​(int index)
         A list of possible final mobile URLs after all cross domain redirects.
         
        repeated string final_mobile_urls = 22;
        Specified by:
        getFinalMobileUrlsBytes in interface PromotionFeedItemOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the finalMobileUrls at the given index.
      • hasTrackingUrlTemplate

        public boolean hasTrackingUrlTemplate()
         URL template for constructing a tracking URL.
         
        optional string tracking_url_template = 23;
        Specified by:
        hasTrackingUrlTemplate in interface PromotionFeedItemOrBuilder
        Returns:
        Whether the trackingUrlTemplate field is set.
      • getTrackingUrlTemplate

        public java.lang.String getTrackingUrlTemplate()
         URL template for constructing a tracking URL.
         
        optional string tracking_url_template = 23;
        Specified by:
        getTrackingUrlTemplate in interface PromotionFeedItemOrBuilder
        Returns:
        The trackingUrlTemplate.
      • getTrackingUrlTemplateBytes

        public com.google.protobuf.ByteString getTrackingUrlTemplateBytes()
         URL template for constructing a tracking URL.
         
        optional string tracking_url_template = 23;
        Specified by:
        getTrackingUrlTemplateBytes in interface PromotionFeedItemOrBuilder
        Returns:
        The bytes for trackingUrlTemplate.
      • getUrlCustomParametersList

        public java.util.List<CustomParameter> getUrlCustomParametersList()
         A list of mappings to be used for substituting URL custom parameter tags in
         the tracking_url_template, final_urls, and/or final_mobile_urls.
         
        repeated .google.ads.googleads.v10.common.CustomParameter url_custom_parameters = 13;
        Specified by:
        getUrlCustomParametersList in interface PromotionFeedItemOrBuilder
      • getUrlCustomParametersOrBuilderList

        public java.util.List<? extends CustomParameterOrBuilder> getUrlCustomParametersOrBuilderList()
         A list of mappings to be used for substituting URL custom parameter tags in
         the tracking_url_template, final_urls, and/or final_mobile_urls.
         
        repeated .google.ads.googleads.v10.common.CustomParameter url_custom_parameters = 13;
        Specified by:
        getUrlCustomParametersOrBuilderList in interface PromotionFeedItemOrBuilder
      • getUrlCustomParametersCount

        public int getUrlCustomParametersCount()
         A list of mappings to be used for substituting URL custom parameter tags in
         the tracking_url_template, final_urls, and/or final_mobile_urls.
         
        repeated .google.ads.googleads.v10.common.CustomParameter url_custom_parameters = 13;
        Specified by:
        getUrlCustomParametersCount in interface PromotionFeedItemOrBuilder
      • getUrlCustomParameters

        public CustomParameter getUrlCustomParameters​(int index)
         A list of mappings to be used for substituting URL custom parameter tags in
         the tracking_url_template, final_urls, and/or final_mobile_urls.
         
        repeated .google.ads.googleads.v10.common.CustomParameter url_custom_parameters = 13;
        Specified by:
        getUrlCustomParameters in interface PromotionFeedItemOrBuilder
      • getUrlCustomParametersOrBuilder

        public CustomParameterOrBuilder getUrlCustomParametersOrBuilder​(int index)
         A list of mappings to be used for substituting URL custom parameter tags in
         the tracking_url_template, final_urls, and/or final_mobile_urls.
         
        repeated .google.ads.googleads.v10.common.CustomParameter url_custom_parameters = 13;
        Specified by:
        getUrlCustomParametersOrBuilder in interface PromotionFeedItemOrBuilder
      • hasFinalUrlSuffix

        public boolean hasFinalUrlSuffix()
         URL template for appending params to landing page URLs served with parallel
         tracking.
         
        optional string final_url_suffix = 24;
        Specified by:
        hasFinalUrlSuffix in interface PromotionFeedItemOrBuilder
        Returns:
        Whether the finalUrlSuffix field is set.
      • getFinalUrlSuffix

        public java.lang.String getFinalUrlSuffix()
         URL template for appending params to landing page URLs served with parallel
         tracking.
         
        optional string final_url_suffix = 24;
        Specified by:
        getFinalUrlSuffix in interface PromotionFeedItemOrBuilder
        Returns:
        The finalUrlSuffix.
      • getFinalUrlSuffixBytes

        public com.google.protobuf.ByteString getFinalUrlSuffixBytes()
         URL template for appending params to landing page URLs served with parallel
         tracking.
         
        optional string final_url_suffix = 24;
        Specified by:
        getFinalUrlSuffixBytes in interface PromotionFeedItemOrBuilder
        Returns:
        The bytes for finalUrlSuffix.
      • hasLanguageCode

        public boolean hasLanguageCode()
         The language of the promotion.
         Represented as BCP 47 language tag.
         
        optional string language_code = 25;
        Specified by:
        hasLanguageCode in interface PromotionFeedItemOrBuilder
        Returns:
        Whether the languageCode field is set.
      • getLanguageCode

        public java.lang.String getLanguageCode()
         The language of the promotion.
         Represented as BCP 47 language tag.
         
        optional string language_code = 25;
        Specified by:
        getLanguageCode in interface PromotionFeedItemOrBuilder
        Returns:
        The languageCode.
      • getLanguageCodeBytes

        public com.google.protobuf.ByteString getLanguageCodeBytes()
         The language of the promotion.
         Represented as BCP 47 language tag.
         
        optional string language_code = 25;
        Specified by:
        getLanguageCodeBytes in interface PromotionFeedItemOrBuilder
        Returns:
        The bytes for languageCode.
      • hasPercentOff

        public boolean hasPercentOff()
         Percentage off discount in the promotion in micros.
         One million is equivalent to one percent.
         Either this or money_off_amount is required.
         
        int64 percent_off = 17;
        Specified by:
        hasPercentOff in interface PromotionFeedItemOrBuilder
        Returns:
        Whether the percentOff field is set.
      • getPercentOff

        public long getPercentOff()
         Percentage off discount in the promotion in micros.
         One million is equivalent to one percent.
         Either this or money_off_amount is required.
         
        int64 percent_off = 17;
        Specified by:
        getPercentOff in interface PromotionFeedItemOrBuilder
        Returns:
        The percentOff.
      • hasMoneyAmountOff

        public boolean hasMoneyAmountOff()
         Money amount off for discount in the promotion.
         Either this or percent_off is required.
         
        .google.ads.googleads.v10.common.Money money_amount_off = 4;
        Specified by:
        hasMoneyAmountOff in interface PromotionFeedItemOrBuilder
        Returns:
        Whether the moneyAmountOff field is set.
      • getMoneyAmountOff

        public Money getMoneyAmountOff()
         Money amount off for discount in the promotion.
         Either this or percent_off is required.
         
        .google.ads.googleads.v10.common.Money money_amount_off = 4;
        Specified by:
        getMoneyAmountOff in interface PromotionFeedItemOrBuilder
        Returns:
        The moneyAmountOff.
      • hasPromotionCode

        public boolean hasPromotionCode()
         A code the user should use in order to be eligible for the promotion.
         
        string promotion_code = 18;
        Specified by:
        hasPromotionCode in interface PromotionFeedItemOrBuilder
        Returns:
        Whether the promotionCode field is set.
      • getPromotionCode

        public java.lang.String getPromotionCode()
         A code the user should use in order to be eligible for the promotion.
         
        string promotion_code = 18;
        Specified by:
        getPromotionCode in interface PromotionFeedItemOrBuilder
        Returns:
        The promotionCode.
      • getPromotionCodeBytes

        public com.google.protobuf.ByteString getPromotionCodeBytes()
         A code the user should use in order to be eligible for the promotion.
         
        string promotion_code = 18;
        Specified by:
        getPromotionCodeBytes in interface PromotionFeedItemOrBuilder
        Returns:
        The bytes for promotionCode.
      • hasOrdersOverAmount

        public boolean hasOrdersOverAmount()
         The amount the total order needs to be for the user to be eligible for
         the promotion.
         
        .google.ads.googleads.v10.common.Money orders_over_amount = 6;
        Specified by:
        hasOrdersOverAmount in interface PromotionFeedItemOrBuilder
        Returns:
        Whether the ordersOverAmount field is set.
      • getOrdersOverAmount

        public Money getOrdersOverAmount()
         The amount the total order needs to be for the user to be eligible for
         the promotion.
         
        .google.ads.googleads.v10.common.Money orders_over_amount = 6;
        Specified by:
        getOrdersOverAmount in interface PromotionFeedItemOrBuilder
        Returns:
        The ordersOverAmount.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws java.io.IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        java.io.IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static PromotionFeedItem parseFrom​(java.nio.ByteBuffer data)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static PromotionFeedItem parseFrom​(java.nio.ByteBuffer data,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static PromotionFeedItem parseFrom​(com.google.protobuf.ByteString data)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static PromotionFeedItem parseFrom​(com.google.protobuf.ByteString data,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static PromotionFeedItem parseFrom​(byte[] data)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static PromotionFeedItem parseFrom​(byte[] data,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static PromotionFeedItem parseFrom​(java.io.InputStream input)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static PromotionFeedItem parseFrom​(java.io.InputStream input,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static PromotionFeedItem parseDelimitedFrom​(java.io.InputStream input)
                                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static PromotionFeedItem parseDelimitedFrom​(java.io.InputStream input,
                                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static PromotionFeedItem parseFrom​(com.google.protobuf.CodedInputStream input)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static PromotionFeedItem parseFrom​(com.google.protobuf.CodedInputStream input,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • newBuilderForType

        public PromotionFeedItem.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public PromotionFeedItem.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected PromotionFeedItem.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<PromotionFeedItem> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public PromotionFeedItem getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder