Class PromotionAsset

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.ads.googleads.v18.common.PromotionAsset
All Implemented Interfaces:
PromotionAssetOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

public final class PromotionAsset extends com.google.protobuf.GeneratedMessageV3 implements PromotionAssetOrBuilder
 A Promotion asset.
 
Protobuf type google.ads.googleads.v18.common.PromotionAsset
See Also:
  • Field Details

    • PROMOTION_TARGET_FIELD_NUMBER

      public static final int PROMOTION_TARGET_FIELD_NUMBER
      See Also:
    • DISCOUNT_MODIFIER_FIELD_NUMBER

      public static final int DISCOUNT_MODIFIER_FIELD_NUMBER
      See Also:
    • REDEMPTION_START_DATE_FIELD_NUMBER

      public static final int REDEMPTION_START_DATE_FIELD_NUMBER
      See Also:
    • REDEMPTION_END_DATE_FIELD_NUMBER

      public static final int REDEMPTION_END_DATE_FIELD_NUMBER
      See Also:
    • OCCASION_FIELD_NUMBER

      public static final int OCCASION_FIELD_NUMBER
      See Also:
    • LANGUAGE_CODE_FIELD_NUMBER

      public static final int LANGUAGE_CODE_FIELD_NUMBER
      See Also:
    • START_DATE_FIELD_NUMBER

      public static final int START_DATE_FIELD_NUMBER
      See Also:
    • END_DATE_FIELD_NUMBER

      public static final int END_DATE_FIELD_NUMBER
      See Also:
    • AD_SCHEDULE_TARGETS_FIELD_NUMBER

      public static final int AD_SCHEDULE_TARGETS_FIELD_NUMBER
      See Also:
    • PERCENT_OFF_FIELD_NUMBER

      public static final int PERCENT_OFF_FIELD_NUMBER
      See Also:
    • MONEY_AMOUNT_OFF_FIELD_NUMBER

      public static final int MONEY_AMOUNT_OFF_FIELD_NUMBER
      See Also:
    • PROMOTION_CODE_FIELD_NUMBER

      public static final int PROMOTION_CODE_FIELD_NUMBER
      See Also:
    • ORDERS_OVER_AMOUNT_FIELD_NUMBER

      public static final int ORDERS_OVER_AMOUNT_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance 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
    • getDiscountTypeCase

      public PromotionAsset.DiscountTypeCase getDiscountTypeCase()
      Specified by:
      getDiscountTypeCase in interface PromotionAssetOrBuilder
    • getPromotionTriggerCase

      public PromotionAsset.PromotionTriggerCase getPromotionTriggerCase()
      Specified by:
      getPromotionTriggerCase in interface PromotionAssetOrBuilder
    • getPromotionTarget

      public 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.v18.enums.PromotionExtensionDiscountModifierEnum.PromotionExtensionDiscountModifier discount_modifier = 2;
      Specified by:
      getDiscountModifierValue in interface PromotionAssetOrBuilder
      Returns:
      The enum numeric value on the wire for discountModifier.
    • getDiscountModifier

       A modifier for qualification of the discount.
       
      .google.ads.googleads.v18.enums.PromotionExtensionDiscountModifierEnum.PromotionExtensionDiscountModifier discount_modifier = 2;
      Specified by:
      getDiscountModifier in interface PromotionAssetOrBuilder
      Returns:
      The discountModifier.
    • getRedemptionStartDate

      public 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 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.v18.enums.PromotionExtensionOccasionEnum.PromotionExtensionOccasion occasion = 9;
      Specified by:
      getOccasionValue in interface PromotionAssetOrBuilder
      Returns:
      The enum numeric value on the wire for occasion.
    • getOccasion

       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.v18.enums.PromotionExtensionOccasionEnum.PromotionExtensionOccasion occasion = 9;
      Specified by:
      getOccasion in interface PromotionAssetOrBuilder
      Returns:
      The occasion.
    • getLanguageCode

      public 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 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 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 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.v18.common.AdScheduleInfo ad_schedule_targets = 13;
      Specified by:
      getAdScheduleTargetsList in interface PromotionAssetOrBuilder
    • getAdScheduleTargetsOrBuilderList

      public 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.v18.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.v18.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.v18.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.v18.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.v18.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.v18.common.Money money_amount_off = 4;
      Specified by:
      getMoneyAmountOff in interface PromotionAssetOrBuilder
      Returns:
      The moneyAmountOff.
    • getMoneyAmountOffOrBuilder

      public MoneyOrBuilder getMoneyAmountOffOrBuilder()
       Money amount off for discount in the promotion.
       Either this or percent_off is required.
       
      .google.ads.googleads.v18.common.Money money_amount_off = 4;
      Specified by:
      getMoneyAmountOffOrBuilder in interface PromotionAssetOrBuilder
    • 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 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.v18.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.v18.common.Money orders_over_amount = 6;
      Specified by:
      getOrdersOverAmount in interface PromotionAssetOrBuilder
      Returns:
      The ordersOverAmount.
    • getOrdersOverAmountOrBuilder

      public MoneyOrBuilder getOrdersOverAmountOrBuilder()
       The amount the total order needs to be for the user to be eligible for
       the promotion.
       
      .google.ads.googleads.v18.common.Money orders_over_amount = 6;
      Specified by:
      getOrdersOverAmountOrBuilder in interface PromotionAssetOrBuilder
    • 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 IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      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(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(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static PromotionAsset parseFrom(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(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

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

      public static PromotionAsset parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

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

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

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

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

      public static PromotionAsset.Builder newBuilder()
    • newBuilder

      public static PromotionAsset.Builder newBuilder(PromotionAsset prototype)
    • 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