#[non_exhaustive]pub struct AttributesConfig {
pub name: String,
pub catalog_attributes: HashMap<String, CatalogAttribute>,
pub attribute_config_level: AttributeConfigLevel,
/* private fields */
}Expand description
Catalog level attribute config.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringRequired. Immutable. The fully qualified resource name of the attribute
config. Format: projects/*/locations/*/catalogs/*/attributesConfig
catalog_attributes: HashMap<String, CatalogAttribute>Enable attribute(s) config at catalog level. For example, indexable, dynamic_facetable, or searchable for each attribute.
The key is catalog attribute’s name.
For example: color, brands, attributes.custom_attribute, such as
attributes.xyz.
The maximum number of catalog attributes allowed in a request is 1000.
attribute_config_level: AttributeConfigLevelOutput only. The AttributeConfigLevel used for this catalog.
Implementations§
Source§impl AttributesConfig
impl AttributesConfig
pub fn new() -> Self
Sourcepub fn set_catalog_attributes<T, K, V>(self, v: T) -> Self
pub fn set_catalog_attributes<T, K, V>(self, v: T) -> Self
Sets the value of catalog_attributes.
§Example
ⓘ
use google_cloud_retail_v2::model::CatalogAttribute;
let x = AttributesConfig::new().set_catalog_attributes([
("key0", CatalogAttribute::default()/* use setters */),
("key1", CatalogAttribute::default()/* use (different) setters */),
]);Sourcepub fn set_attribute_config_level<T: Into<AttributeConfigLevel>>(
self,
v: T,
) -> Self
pub fn set_attribute_config_level<T: Into<AttributeConfigLevel>>( self, v: T, ) -> Self
Sets the value of attribute_config_level.
§Example
ⓘ
use google_cloud_retail_v2::model::AttributeConfigLevel;
let x0 = AttributesConfig::new().set_attribute_config_level(AttributeConfigLevel::ProductLevelAttributeConfig);
let x1 = AttributesConfig::new().set_attribute_config_level(AttributeConfigLevel::CatalogLevelAttributeConfig);Trait Implementations§
Source§impl Clone for AttributesConfig
impl Clone for AttributesConfig
Source§fn clone(&self) -> AttributesConfig
fn clone(&self) -> AttributesConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AttributesConfig
impl Debug for AttributesConfig
Source§impl Default for AttributesConfig
impl Default for AttributesConfig
Source§fn default() -> AttributesConfig
fn default() -> AttributesConfig
Returns the “default value” for a type. Read more
Source§impl Message for AttributesConfig
impl Message for AttributesConfig
Source§impl PartialEq for AttributesConfig
impl PartialEq for AttributesConfig
impl StructuralPartialEq for AttributesConfig
Auto Trait Implementations§
impl Freeze for AttributesConfig
impl RefUnwindSafe for AttributesConfig
impl Send for AttributesConfig
impl Sync for AttributesConfig
impl Unpin for AttributesConfig
impl UnwindSafe for AttributesConfig
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
Mutably borrows from an owned value. Read more