#[non_exhaustive]pub struct Tile {
pub representative_product_id: String,
pub product_attribute: Option<ProductAttribute>,
/* private fields */
}Expand description
This field specifies the tile information including an attribute key, attribute value. More fields will be added in the future, eg: product id or product counts, etc.
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.representative_product_id: StringThe representative product id for this tile.
product_attribute: Option<ProductAttribute>The attribute key and value for the tile.
Implementations§
Source§impl Tile
impl Tile
Sourcepub fn set_representative_product_id<T: Into<String>>(self, v: T) -> Self
pub fn set_representative_product_id<T: Into<String>>(self, v: T) -> Self
Sets the value of representative_product_id.
§Example
let x = Tile::new().set_representative_product_id("example");Sourcepub fn set_product_attribute<T: Into<Option<ProductAttribute>>>(
self,
v: T,
) -> Self
pub fn set_product_attribute<T: Into<Option<ProductAttribute>>>( self, v: T, ) -> Self
Sets the value of product_attribute.
Note that all the setters affecting product_attribute are mutually
exclusive.
§Example
use google_cloud_retail_v2::model::ProductAttributeValue;
let x = Tile::new().set_product_attribute(Some(
google_cloud_retail_v2::model::tile::ProductAttribute::ProductAttributeValue(ProductAttributeValue::default().into())));Sourcepub fn product_attribute_value(&self) -> Option<&Box<ProductAttributeValue>>
pub fn product_attribute_value(&self) -> Option<&Box<ProductAttributeValue>>
The value of product_attribute
if it holds a ProductAttributeValue, None if the field is not set or
holds a different branch.
Sourcepub fn set_product_attribute_value<T: Into<Box<ProductAttributeValue>>>(
self,
v: T,
) -> Self
pub fn set_product_attribute_value<T: Into<Box<ProductAttributeValue>>>( self, v: T, ) -> Self
Sets the value of product_attribute
to hold a ProductAttributeValue.
Note that all the setters affecting product_attribute are
mutually exclusive.
§Example
use google_cloud_retail_v2::model::ProductAttributeValue;
let x = Tile::new().set_product_attribute_value(ProductAttributeValue::default()/* use setters */);
assert!(x.product_attribute_value().is_some());
assert!(x.product_attribute_interval().is_none());Sourcepub fn product_attribute_interval(
&self,
) -> Option<&Box<ProductAttributeInterval>>
pub fn product_attribute_interval( &self, ) -> Option<&Box<ProductAttributeInterval>>
The value of product_attribute
if it holds a ProductAttributeInterval, None if the field is not set or
holds a different branch.
Sourcepub fn set_product_attribute_interval<T: Into<Box<ProductAttributeInterval>>>(
self,
v: T,
) -> Self
pub fn set_product_attribute_interval<T: Into<Box<ProductAttributeInterval>>>( self, v: T, ) -> Self
Sets the value of product_attribute
to hold a ProductAttributeInterval.
Note that all the setters affecting product_attribute are
mutually exclusive.
§Example
use google_cloud_retail_v2::model::ProductAttributeInterval;
let x = Tile::new().set_product_attribute_interval(ProductAttributeInterval::default()/* use setters */);
assert!(x.product_attribute_interval().is_some());
assert!(x.product_attribute_value().is_none());Trait Implementations§
impl StructuralPartialEq for Tile
Auto Trait Implementations§
impl Freeze for Tile
impl RefUnwindSafe for Tile
impl Send for Tile
impl Sync for Tile
impl Unpin for Tile
impl UnsafeUnpin for Tile
impl UnwindSafe for Tile
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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