Struct aws_sdk_personalize::types::builders::MetricAttributeBuilder
source · #[non_exhaustive]pub struct MetricAttributeBuilder { /* private fields */ }
Expand description
A builder for MetricAttribute
.
Implementations§
source§impl MetricAttributeBuilder
impl MetricAttributeBuilder
sourcepub fn event_type(self, input: impl Into<String>) -> Self
pub fn event_type(self, input: impl Into<String>) -> Self
The metric's event type.
This field is required.sourcepub fn set_event_type(self, input: Option<String>) -> Self
pub fn set_event_type(self, input: Option<String>) -> Self
The metric's event type.
sourcepub fn get_event_type(&self) -> &Option<String>
pub fn get_event_type(&self) -> &Option<String>
The metric's event type.
sourcepub fn metric_name(self, input: impl Into<String>) -> Self
pub fn metric_name(self, input: impl Into<String>) -> Self
The metric's name. The name helps you identify the metric in Amazon CloudWatch or Amazon S3.
This field is required.sourcepub fn set_metric_name(self, input: Option<String>) -> Self
pub fn set_metric_name(self, input: Option<String>) -> Self
The metric's name. The name helps you identify the metric in Amazon CloudWatch or Amazon S3.
sourcepub fn get_metric_name(&self) -> &Option<String>
pub fn get_metric_name(&self) -> &Option<String>
The metric's name. The name helps you identify the metric in Amazon CloudWatch or Amazon S3.
sourcepub fn expression(self, input: impl Into<String>) -> Self
pub fn expression(self, input: impl Into<String>) -> Self
The attribute's expression. Available functions are SUM()
or SAMPLECOUNT()
. For SUM() functions, provide the dataset type (either Interactions or Items) and column to sum as a parameter. For example SUM(Items.PRICE).
sourcepub fn set_expression(self, input: Option<String>) -> Self
pub fn set_expression(self, input: Option<String>) -> Self
The attribute's expression. Available functions are SUM()
or SAMPLECOUNT()
. For SUM() functions, provide the dataset type (either Interactions or Items) and column to sum as a parameter. For example SUM(Items.PRICE).
sourcepub fn get_expression(&self) -> &Option<String>
pub fn get_expression(&self) -> &Option<String>
The attribute's expression. Available functions are SUM()
or SAMPLECOUNT()
. For SUM() functions, provide the dataset type (either Interactions or Items) and column to sum as a parameter. For example SUM(Items.PRICE).
sourcepub fn build(self) -> Result<MetricAttribute, BuildError>
pub fn build(self) -> Result<MetricAttribute, BuildError>
Consumes the builder and constructs a MetricAttribute
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for MetricAttributeBuilder
impl Clone for MetricAttributeBuilder
source§fn clone(&self) -> MetricAttributeBuilder
fn clone(&self) -> MetricAttributeBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MetricAttributeBuilder
impl Debug for MetricAttributeBuilder
source§impl Default for MetricAttributeBuilder
impl Default for MetricAttributeBuilder
source§fn default() -> MetricAttributeBuilder
fn default() -> MetricAttributeBuilder
source§impl PartialEq for MetricAttributeBuilder
impl PartialEq for MetricAttributeBuilder
source§fn eq(&self, other: &MetricAttributeBuilder) -> bool
fn eq(&self, other: &MetricAttributeBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.