Struct gapi_grpc::google::ads::googleads::v7::common::PromotionAsset[][src]

pub struct PromotionAsset {
    pub promotion_target: String,
    pub discount_modifier: i32,
    pub redemption_start_date: String,
    pub redemption_end_date: String,
    pub occasion: i32,
    pub language_code: String,
    pub start_date: String,
    pub end_date: String,
    pub ad_schedule_targets: Vec<AdScheduleInfo>,
    pub discount_type: Option<DiscountType>,
    pub promotion_trigger: Option<PromotionTrigger>,
}

A Promotion asset.

Fields

promotion_target: String

Required. A freeform description of what the promotion is targeting.

discount_modifier: i32

A modifier for qualification of the discount.

redemption_start_date: String

Start date of when the promotion is eligible to be redeemed, in yyyy-MM-dd format.

redemption_end_date: String

Last date of when the promotion is eligible to be redeemed, in yyyy-MM-dd format.

occasion: i32

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.

language_code: String

The language of the promotion. Represented as BCP 47 language tag.

start_date: String

Start date of when this asset is effective and can begin serving, in yyyy-MM-dd format.

end_date: String

Last date of when this asset is effective and still serving, in yyyy-MM-dd format.

ad_schedule_targets: Vec<AdScheduleInfo>

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.

discount_type: Option<DiscountType>

Discount type, can be percentage off or amount off.

promotion_trigger: Option<PromotionTrigger>

Promotion trigger. Can be by promotion code or promo by eligible order amount.

Implementations

impl PromotionAsset[src]

pub fn discount_modifier(&self) -> PromotionExtensionDiscountModifier[src]

Returns the enum value of discount_modifier, or the default if the field is set to an invalid enum value.

pub fn set_discount_modifier(
    &mut self,
    value: PromotionExtensionDiscountModifier
)
[src]

Sets discount_modifier to the provided enum value.

pub fn occasion(&self) -> PromotionExtensionOccasion[src]

Returns the enum value of occasion, or the default if the field is set to an invalid enum value.

pub fn set_occasion(&mut self, value: PromotionExtensionOccasion)[src]

Sets occasion to the provided enum value.

Trait Implementations

impl Clone for PromotionAsset[src]

impl Debug for PromotionAsset[src]

impl Default for PromotionAsset[src]

impl Message for PromotionAsset[src]

impl PartialEq<PromotionAsset> for PromotionAsset[src]

impl StructuralPartialEq for PromotionAsset[src]

Auto Trait Implementations

impl RefUnwindSafe for PromotionAsset

impl Send for PromotionAsset

impl Sync for PromotionAsset

impl Unpin for PromotionAsset

impl UnwindSafe for PromotionAsset

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> WithSubscriber for T[src]