Struct googapis::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>,
}
Expand description

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

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

Sets discount_modifier to the provided enum value.

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

Sets occasion to the provided enum value.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Returns the encoded length of the message without a length delimiter.

Clears the message, resetting all fields to their default.

Encodes the message to a buffer. Read more

Encodes the message to a newly allocated buffer.

Encodes the message with a length-delimiter to a buffer. Read more

Encodes the message with a length-delimiter to a newly allocated buffer.

Decodes an instance of the message from a buffer. Read more

Decodes a length-delimited instance of the message from the buffer.

Decodes an instance of the message from a buffer, and merges it into self. Read more

Decodes a length-delimited instance of the message from buffer, and merges it into self. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Wrap the input message T in a tonic::Request

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more