#[non_exhaustive]pub struct ProductLevelConfig {
pub ingestion_product_type: String,
pub merchant_center_product_id_field: String,
/* private fields */
}Expand description
Configures what level the product should be uploaded with regards to how users will be send events and how predictions will be made.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.ingestion_product_type: StringThe type of Products allowed to be ingested into the catalog. Acceptable values are:
primary(default): You can ingest Products of all types. When ingesting a Product, its type will default to Product.Type.PRIMARY if unset.variant(incompatible with Retail Search): You can only ingest Product.Type.VARIANT Products. This means Product.primary_product_id cannot be empty.
If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.
If this field is variant and
merchant_center_product_id_field
is itemGroupId, an INVALID_ARGUMENT error is returned.
See Product levels for more details.
merchant_center_product_id_field: StringWhich field of Merchant Center Product should be imported as Product.id. Acceptable values are:
offerId(default): ImportofferIdas the product ID.itemGroupId: ImportitemGroupIdas the product ID. Notice that Retail API will choose one item from the ones with the sameitemGroupId, and use it to represent the item group.
If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.
If this field is itemGroupId and
ingestion_product_type
is variant, an INVALID_ARGUMENT error is returned.
See Product levels for more details.
Implementations§
Source§impl ProductLevelConfig
impl ProductLevelConfig
Sourcepub fn set_ingestion_product_type<T: Into<String>>(self, v: T) -> Self
pub fn set_ingestion_product_type<T: Into<String>>(self, v: T) -> Self
Sets the value of ingestion_product_type.
§Example
let x = ProductLevelConfig::new().set_ingestion_product_type("example");Sourcepub fn set_merchant_center_product_id_field<T: Into<String>>(self, v: T) -> Self
pub fn set_merchant_center_product_id_field<T: Into<String>>(self, v: T) -> Self
Sets the value of merchant_center_product_id_field.
§Example
let x = ProductLevelConfig::new().set_merchant_center_product_id_field("example");Trait Implementations§
Source§impl Clone for ProductLevelConfig
impl Clone for ProductLevelConfig
Source§fn clone(&self) -> ProductLevelConfig
fn clone(&self) -> ProductLevelConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more