Struct google_api_proto::google::shopping::merchant::promotions::v1beta::Attributes
source · pub struct Attributes {Show 30 fields
pub product_applicability: i32,
pub offer_type: i32,
pub generic_redemption_code: String,
pub long_title: String,
pub coupon_value_type: i32,
pub promotion_destinations: Vec<i32>,
pub item_id_inclusion: Vec<String>,
pub brand_inclusion: Vec<String>,
pub item_group_id_inclusion: Vec<String>,
pub product_type_inclusion: Vec<String>,
pub item_id_exclusion: Vec<String>,
pub brand_exclusion: Vec<String>,
pub item_group_id_exclusion: Vec<String>,
pub product_type_exclusion: Vec<String>,
pub minimum_purchase_amount: Option<Price>,
pub minimum_purchase_quantity: i64,
pub limit_quantity: i64,
pub limit_value: Option<Price>,
pub percent_off: i64,
pub money_off_amount: Option<Price>,
pub get_this_quantity_discounted: i64,
pub free_gift_value: Option<Price>,
pub free_gift_description: String,
pub free_gift_item_id: String,
pub promotion_effective_time_period: Option<Interval>,
pub promotion_display_time_period: Option<Interval>,
pub store_applicability: i32,
pub store_codes_inclusion: Vec<String>,
pub store_codes_exclusion: Vec<String>,
pub promotion_url: String,
}
Expand description
Attributes.
Fields§
§product_applicability: i32
Required. Applicability of the promotion to either all products or only specific products.
offer_type: i32
Required. Type of the promotion. Use this attribute to indicate whether or not customers need a coupon code to redeem your promotion.
generic_redemption_code: String
Optional. Generic redemption code for the promotion. To be used with the
offerType
field and must meet the minimum
requirements.
long_title: String
Required. Long title for the promotion.
coupon_value_type: i32
Required. The [coupon value type] (https://support.google.com/merchants/answer/13861986?ref_topic=13773355&sjid=17642868584668136159-NC) attribute to signal the type of promotion that you are running. Depending on type of the selected coupon value some attributes are required.
promotion_destinations: Vec<i32>
Required. The list of destinations where the promotion applies to. If you don’t specify a destination by including a supported value in your data source, your promotion will display in Shopping ads and free listings by default.
You may have previously submitted the following values as destinations for
your products: Shopping Actions, Surfaces across Google, Local surfaces
across Google. To represent these values use FREE_LISTINGS
,
FREE_LOCAL_LISTINGS
, LOCAL_INVENTORY_ADS
. For more details see
Promotion
destination
item_id_inclusion: Vec<String>
Optional. Product filter by item
ID
for the promotion. The product filter attributes only applies when the
products eligible for promotion product applicability
product_applicability
attribute is set to
specific_products.
brand_inclusion: Vec<String>
Optional. Product filter by brand for the promotion. The product filter
attributes only applies when the products eligible for promotion product
applicability product_applicability
attribute is set to
specific_products.
item_group_id_inclusion: Vec<String>
Optional. Product filter by item group ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability [product_applicability] attribute is set to specific_products.
product_type_inclusion: Vec<String>
Optional. Product filter by product type for the promotion. The product
filter attributes only applies when the products eligible for promotion
product applicability product_applicability
attribute is set to
specific_products.
item_id_exclusion: Vec<String>
Optional. Product filter by item ID
exclusion
for the promotion. The product filter attributes only applies when the
products eligible for promotion product applicability
product_applicability
attribute is set to
specific_products.
brand_exclusion: Vec<String>
Optional. Product filter by brand
exclusion
for the promotion. The product filter attributes only applies when the
products eligible for promotion product applicability
product_applicability
attribute is set to
specific_products.
item_group_id_exclusion: Vec<String>
Optional. Product filter by item group
ID.
The product filter attributes only applies when the products eligible for
promotion product applicability product_applicability
attribute is set to
specific_products.
exclusion for the promotion.
product_type_exclusion: Vec<String>
Optional. Product filter by product type
exclusion
for the promotion. The product filter attributes only applies when the
products eligible for promotion product applicability
product_applicability
attribute is set to
specific_products.
minimum_purchase_amount: Option<Price>
Optional. Minimum purchase amount for the promotion.
minimum_purchase_quantity: i64
Optional. Minimum purchase quantity for the promotion.
limit_quantity: i64
Optional. Maximum purchase quantity for the promotion.
limit_value: Option<Price>
Optional. Maximum product price for promotion.
percent_off: i64
Optional. The percentage discount offered in the promotion.
money_off_amount: Option<Price>
Optional. The money off amount offered in the promotion.
get_this_quantity_discounted: i64
Optional. The number of items discounted in the promotion. The attribute is
set when couponValueType
is equal to buy_m_get_n_money_off
or
buy_m_get_n_percent_off
.
free_gift_value: Option<Price>
Optional. Free gift value for the promotion.
free_gift_description: String
Optional. Free gift description for the promotion.
free_gift_item_id: String
Optional. Free gift item ID for the promotion.
promotion_effective_time_period: Option<Interval>
Required. TimePeriod
representation of the promotion’s effective dates.
This attribute specifies that the promotion can be tested on your online
store during this time period.
promotion_display_time_period: Option<Interval>
Optional. TimePeriod
representation of the promotion’s display dates.
This attribute specifies the date and time frame when the promotion will be
live on Google.com and Shopping ads. If the display time period for
promotion promotion_display_time_period
attribute is not specified, the
promotion effective time period promotion_effective_time_period
determines the date and time frame when the promotion will be live on
Google.com and Shopping ads.
store_applicability: i32
Optional. Whether the promotion applies to all stores, or only specified
stores.
Local Inventory ads promotions throw an error if no store applicability is
included. An INVALID_ARGUMENT
error is thrown if store_applicability
is
set to ALL_STORES
and store_codes_inclusion
or score_code_exclusion
is set to a value.
store_codes_inclusion: Vec<String>
Optional. Store codes to
include
for the promotion. The store filter attributes only applies when the
store_applicability
attribute is set to
specific_stores.
Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.
store_codes_exclusion: Vec<String>
Optional. Store codes to
exclude
for the promotion. The store filter attributes only applies when the
store_applicability
attribute is set to
specific_stores.
promotion_url: String
Optional. URL to the page on the merchant’s site where the promotion shows.
Local Inventory ads promotions throw an error if no promotion_url
is
included. URL is used to confirm that the promotion is valid and can be
redeemed.
Implementations§
source§impl Attributes
impl Attributes
sourcepub fn product_applicability(&self) -> ProductApplicability
pub fn product_applicability(&self) -> ProductApplicability
Returns the enum value of product_applicability
, or the default if the field is set to an invalid enum value.
sourcepub fn set_product_applicability(&mut self, value: ProductApplicability)
pub fn set_product_applicability(&mut self, value: ProductApplicability)
Sets product_applicability
to the provided enum value.
sourcepub fn offer_type(&self) -> OfferType
pub fn offer_type(&self) -> OfferType
Returns the enum value of offer_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_offer_type(&mut self, value: OfferType)
pub fn set_offer_type(&mut self, value: OfferType)
Sets offer_type
to the provided enum value.
sourcepub fn coupon_value_type(&self) -> CouponValueType
pub fn coupon_value_type(&self) -> CouponValueType
Returns the enum value of coupon_value_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_coupon_value_type(&mut self, value: CouponValueType)
pub fn set_coupon_value_type(&mut self, value: CouponValueType)
Sets coupon_value_type
to the provided enum value.
sourcepub fn promotion_destinations(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<DestinationEnum>>
pub fn promotion_destinations( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<DestinationEnum>>
Returns an iterator which yields the valid enum values contained in promotion_destinations
.
sourcepub fn push_promotion_destinations(&mut self, value: DestinationEnum)
pub fn push_promotion_destinations(&mut self, value: DestinationEnum)
Appends the provided enum value to promotion_destinations
.
sourcepub fn store_applicability(&self) -> StoreApplicability
pub fn store_applicability(&self) -> StoreApplicability
Returns the enum value of store_applicability
, or the default if the field is set to an invalid enum value.
sourcepub fn set_store_applicability(&mut self, value: StoreApplicability)
pub fn set_store_applicability(&mut self, value: StoreApplicability)
Sets store_applicability
to the provided enum value.
Trait Implementations§
source§impl Clone for Attributes
impl Clone for Attributes
source§fn clone(&self) -> Attributes
fn clone(&self) -> Attributes
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Attributes
impl Debug for Attributes
source§impl Default for Attributes
impl Default for Attributes
source§impl Message for Attributes
impl Message for Attributes
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 Attributes
impl PartialEq for Attributes
source§fn eq(&self, other: &Attributes) -> bool
fn eq(&self, other: &Attributes) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for Attributes
Auto Trait Implementations§
impl Freeze for Attributes
impl RefUnwindSafe for Attributes
impl Send for Attributes
impl Sync for Attributes
impl Unpin for Attributes
impl UnwindSafe for Attributes
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