You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: _metric_attribute.rs
    path of file: ./repos/aws-sdk-rust/sdk/personalize/src/types
    
    the code of the file until where you have to start completion: // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains information on a metric that a metric attribution reports on. For more information, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/measuring-recommendation-impact.html">Measuring impact of recommendations</a>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct MetricAttribute {
    /// <p>The metric's event type.</p>
    pub event_type: ::std::string::String,
    /// <p>The metric's name. The name helps you identify the metric in Amazon CloudWatch or Amazon S3.</p>
    pub metric_name: ::std::string::String,
    /// <p>The attribute's expression. Available functions are <code>SUM()</code> or <code>SAMPLECOUNT()</code>. For SUM() functions, provide the dataset type (either Interactions or Items) and column to sum as a parameter. For example SUM(Items.PRICE).</p>
    pub exp
    
    pub fn build(self) -> ::std::result::Result<crate::types::MetricAttribute, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::MetricAttribute {
            event_type: self.event_type.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "event_type",
                    "event_type was not specified but it is required when building MetricAttribute",
                )
            })?,
            metric_name: self.metric_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "metric_name",
                    "metric_name was not specified but it is required when building MetricAttribute",
                )
            })?,
            expression: self.expression.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "expression",
                    "expression was not specified but it is required when building MetricAttribute",
                )
            })?,
        })
    }