Struct google_api_proto::google::ads::googleads::v15::common::PromotionAsset
source · 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§
source§impl PromotionAsset
impl PromotionAsset
sourcepub fn discount_modifier(&self) -> PromotionExtensionDiscountModifier
pub fn discount_modifier(&self) -> PromotionExtensionDiscountModifier
Returns the enum value of discount_modifier
, or the default if the field is set to an invalid enum value.
sourcepub fn set_discount_modifier(
&mut self,
value: PromotionExtensionDiscountModifier,
)
pub fn set_discount_modifier( &mut self, value: PromotionExtensionDiscountModifier, )
Sets discount_modifier
to the provided enum value.
sourcepub fn occasion(&self) -> PromotionExtensionOccasion
pub fn occasion(&self) -> PromotionExtensionOccasion
Returns the enum value of occasion
, or the default if the field is set to an invalid enum value.
sourcepub fn set_occasion(&mut self, value: PromotionExtensionOccasion)
pub fn set_occasion(&mut self, value: PromotionExtensionOccasion)
Sets occasion
to the provided enum value.
Trait Implementations§
source§impl Clone for PromotionAsset
impl Clone for PromotionAsset
source§fn clone(&self) -> PromotionAsset
fn clone(&self) -> PromotionAsset
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PromotionAsset
impl Debug for PromotionAsset
source§impl Default for PromotionAsset
impl Default for PromotionAsset
source§impl Message for PromotionAsset
impl Message for PromotionAsset
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for PromotionAsset
impl PartialEq for PromotionAsset
source§fn eq(&self, other: &PromotionAsset) -> bool
fn eq(&self, other: &PromotionAsset) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for PromotionAsset
Auto Trait Implementations§
impl Freeze for PromotionAsset
impl RefUnwindSafe for PromotionAsset
impl Send for PromotionAsset
impl Sync for PromotionAsset
impl Unpin for PromotionAsset
impl UnwindSafe for PromotionAsset
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request