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
fn merge_field<B>(
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
Returns the encoded length of the message without a length delimiter.
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
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
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
impl RefUnwindSafe for PromotionAsset
impl Send for PromotionAsset
impl Sync for PromotionAsset
impl Unpin for PromotionAsset
impl UnwindSafe for PromotionAsset
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
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