Class PromotionAsset

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

    public final class PromotionAsset
    extends com.google.protobuf.GeneratedMessageV3
    implements PromotionAssetOrBuilder
     A Promotion asset.
     
    Protobuf type google.ads.googleads.v10.common.PromotionAsset
    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
      • REDEMPTION_START_DATE_FIELD_NUMBER

        public static final int REDEMPTION_START_DATE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • REDEMPTION_END_DATE_FIELD_NUMBER

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

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

        public static final int START_DATE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • AD_SCHEDULE_TARGETS_FIELD_NUMBER

        public static final int AD_SCHEDULE_TARGETS_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
      • getPromotionTarget

        public java.lang.String getPromotionTarget()
         Required. A freeform description of what the promotion is targeting.
         
        string promotion_target = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getPromotionTarget in interface PromotionAssetOrBuilder
        Returns:
        The promotionTarget.
      • getPromotionTargetBytes

        public com.google.protobuf.ByteString getPromotionTargetBytes()
         Required. A freeform description of what the promotion is targeting.
         
        string promotion_target = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getPromotionTargetBytes in interface PromotionAssetOrBuilder
        Returns:
        The bytes for promotionTarget.
      • getDiscountModifierValue

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

        public java.lang.String getRedemptionStartDate()
         Start date of when the promotion is eligible to be redeemed, in yyyy-MM-dd
         format.
         
        string redemption_start_date = 7;
        Specified by:
        getRedemptionStartDate in interface PromotionAssetOrBuilder
        Returns:
        The redemptionStartDate.
      • getRedemptionStartDateBytes

        public com.google.protobuf.ByteString getRedemptionStartDateBytes()
         Start date of when the promotion is eligible to be redeemed, in yyyy-MM-dd
         format.
         
        string redemption_start_date = 7;
        Specified by:
        getRedemptionStartDateBytes in interface PromotionAssetOrBuilder
        Returns:
        The bytes for redemptionStartDate.
      • getRedemptionEndDate

        public java.lang.String getRedemptionEndDate()
         Last date of when the promotion is eligible to be redeemed, in yyyy-MM-dd
         format.
         
        string redemption_end_date = 8;
        Specified by:
        getRedemptionEndDate in interface PromotionAssetOrBuilder
        Returns:
        The redemptionEndDate.
      • getRedemptionEndDateBytes

        public com.google.protobuf.ByteString getRedemptionEndDateBytes()
         Last date of when the promotion is eligible to be redeemed, in yyyy-MM-dd
         format.
         
        string redemption_end_date = 8;
        Specified by:
        getRedemptionEndDateBytes in interface PromotionAssetOrBuilder
        Returns:
        The bytes for redemptionEndDate.
      • 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 PromotionAssetOrBuilder
        Returns:
        The enum numeric value on the wire for occasion.
      • getLanguageCode

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

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

        public java.lang.String getStartDate()
         Start date of when this asset is effective and can begin serving, in
         yyyy-MM-dd format.
         
        string start_date = 11;
        Specified by:
        getStartDate in interface PromotionAssetOrBuilder
        Returns:
        The startDate.
      • getStartDateBytes

        public com.google.protobuf.ByteString getStartDateBytes()
         Start date of when this asset is effective and can begin serving, in
         yyyy-MM-dd format.
         
        string start_date = 11;
        Specified by:
        getStartDateBytes in interface PromotionAssetOrBuilder
        Returns:
        The bytes for startDate.
      • getEndDate

        public java.lang.String getEndDate()
         Last date of when this asset is effective and still serving, in yyyy-MM-dd
         format.
         
        string end_date = 12;
        Specified by:
        getEndDate in interface PromotionAssetOrBuilder
        Returns:
        The endDate.
      • getEndDateBytes

        public com.google.protobuf.ByteString getEndDateBytes()
         Last date of when this asset is effective and still serving, in yyyy-MM-dd
         format.
         
        string end_date = 12;
        Specified by:
        getEndDateBytes in interface PromotionAssetOrBuilder
        Returns:
        The bytes for endDate.
      • getAdScheduleTargetsList

        public java.util.List<AdScheduleInfo> getAdScheduleTargetsList()
         List of non-overlapping schedules specifying all time intervals for which
         the asset may serve. There can be a maximum of 6 schedules per day, 42 in
         total.
         
        repeated .google.ads.googleads.v10.common.AdScheduleInfo ad_schedule_targets = 13;
        Specified by:
        getAdScheduleTargetsList in interface PromotionAssetOrBuilder
      • getAdScheduleTargetsOrBuilderList

        public java.util.List<? extends AdScheduleInfoOrBuilder> getAdScheduleTargetsOrBuilderList()
         List of non-overlapping schedules specifying all time intervals for which
         the asset may serve. There can be a maximum of 6 schedules per day, 42 in
         total.
         
        repeated .google.ads.googleads.v10.common.AdScheduleInfo ad_schedule_targets = 13;
        Specified by:
        getAdScheduleTargetsOrBuilderList in interface PromotionAssetOrBuilder
      • getAdScheduleTargetsCount

        public int getAdScheduleTargetsCount()
         List of non-overlapping schedules specifying all time intervals for which
         the asset may serve. There can be a maximum of 6 schedules per day, 42 in
         total.
         
        repeated .google.ads.googleads.v10.common.AdScheduleInfo ad_schedule_targets = 13;
        Specified by:
        getAdScheduleTargetsCount in interface PromotionAssetOrBuilder
      • getAdScheduleTargets

        public AdScheduleInfo getAdScheduleTargets​(int index)
         List of non-overlapping schedules specifying all time intervals for which
         the asset may serve. There can be a maximum of 6 schedules per day, 42 in
         total.
         
        repeated .google.ads.googleads.v10.common.AdScheduleInfo ad_schedule_targets = 13;
        Specified by:
        getAdScheduleTargets in interface PromotionAssetOrBuilder
      • getAdScheduleTargetsOrBuilder

        public AdScheduleInfoOrBuilder getAdScheduleTargetsOrBuilder​(int index)
         List of non-overlapping schedules specifying all time intervals for which
         the asset may serve. There can be a maximum of 6 schedules per day, 42 in
         total.
         
        repeated .google.ads.googleads.v10.common.AdScheduleInfo ad_schedule_targets = 13;
        Specified by:
        getAdScheduleTargetsOrBuilder in interface PromotionAssetOrBuilder
      • hasPercentOff

        public boolean hasPercentOff()
         Percentage off discount in the promotion. 1,000,000 = 100%.
         Either this or money_amount_off is required.
         
        int64 percent_off = 3;
        Specified by:
        hasPercentOff in interface PromotionAssetOrBuilder
        Returns:
        Whether the percentOff field is set.
      • getPercentOff

        public long getPercentOff()
         Percentage off discount in the promotion. 1,000,000 = 100%.
         Either this or money_amount_off is required.
         
        int64 percent_off = 3;
        Specified by:
        getPercentOff in interface PromotionAssetOrBuilder
        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 PromotionAssetOrBuilder
        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 PromotionAssetOrBuilder
        Returns:
        The moneyAmountOff.
      • hasPromotionCode

        public boolean hasPromotionCode()
         A code the user should use in order to be eligible for the promotion.
         
        string promotion_code = 5;
        Specified by:
        hasPromotionCode in interface PromotionAssetOrBuilder
        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 = 5;
        Specified by:
        getPromotionCode in interface PromotionAssetOrBuilder
        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 = 5;
        Specified by:
        getPromotionCodeBytes in interface PromotionAssetOrBuilder
        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 PromotionAssetOrBuilder
        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 PromotionAssetOrBuilder
        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 PromotionAsset parseFrom​(java.nio.ByteBuffer data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public static PromotionAsset getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<PromotionAsset> parser()
      • getParserForType

        public com.google.protobuf.Parser<PromotionAsset> 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 PromotionAsset getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder