aws-sdk-connect 1.196.0

AWS SDK for Amazon Connect Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateMetricContentInput {
    /// <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub instance_id: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the metric to update. Adding the <code>$SAVED</code> qualifier will update the saved version of the metric. Adding <code>$LATEST</code> or omitting a qualifier will update the published version.</p>
    pub metric_id: ::std::option::Option<::std::string::String>,
    /// <p>The updated calculation definition for the metric.</p>
    pub metric_calculation: ::std::option::Option<crate::types::MetricCalculation>,
    /// <p>The updated display unit for the metric.</p>
    pub unit: ::std::option::Option<crate::types::MetricUnit>,
    /// <p>How an increase in the metric value should be interpreted. Valid values: <code>POSITIVE</code>, <code>NEUTRAL</code>, <code>NEGATIVE</code>.</p>
    pub positive_trend_indicator: ::std::option::Option<crate::types::TrendIndicator>,
}
impl UpdateMetricContentInput {
    /// <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The identifier of the metric to update. Adding the <code>$SAVED</code> qualifier will update the saved version of the metric. Adding <code>$LATEST</code> or omitting a qualifier will update the published version.</p>
    pub fn metric_id(&self) -> ::std::option::Option<&str> {
        self.metric_id.as_deref()
    }
    /// <p>The updated calculation definition for the metric.</p>
    pub fn metric_calculation(&self) -> ::std::option::Option<&crate::types::MetricCalculation> {
        self.metric_calculation.as_ref()
    }
    /// <p>The updated display unit for the metric.</p>
    pub fn unit(&self) -> ::std::option::Option<&crate::types::MetricUnit> {
        self.unit.as_ref()
    }
    /// <p>How an increase in the metric value should be interpreted. Valid values: <code>POSITIVE</code>, <code>NEUTRAL</code>, <code>NEGATIVE</code>.</p>
    pub fn positive_trend_indicator(&self) -> ::std::option::Option<&crate::types::TrendIndicator> {
        self.positive_trend_indicator.as_ref()
    }
}
impl UpdateMetricContentInput {
    /// Creates a new builder-style object to manufacture [`UpdateMetricContentInput`](crate::operation::update_metric_content::UpdateMetricContentInput).
    pub fn builder() -> crate::operation::update_metric_content::builders::UpdateMetricContentInputBuilder {
        crate::operation::update_metric_content::builders::UpdateMetricContentInputBuilder::default()
    }
}

/// A builder for [`UpdateMetricContentInput`](crate::operation::update_metric_content::UpdateMetricContentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateMetricContentInputBuilder {
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) metric_id: ::std::option::Option<::std::string::String>,
    pub(crate) metric_calculation: ::std::option::Option<crate::types::MetricCalculation>,
    pub(crate) unit: ::std::option::Option<crate::types::MetricUnit>,
    pub(crate) positive_trend_indicator: ::std::option::Option<crate::types::TrendIndicator>,
}
impl UpdateMetricContentInputBuilder {
    /// <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    /// This field is required.
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_id = input;
        self
    }
    /// <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_id
    }
    /// <p>The identifier of the metric to update. Adding the <code>$SAVED</code> qualifier will update the saved version of the metric. Adding <code>$LATEST</code> or omitting a qualifier will update the published version.</p>
    /// This field is required.
    pub fn metric_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.metric_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the metric to update. Adding the <code>$SAVED</code> qualifier will update the saved version of the metric. Adding <code>$LATEST</code> or omitting a qualifier will update the published version.</p>
    pub fn set_metric_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.metric_id = input;
        self
    }
    /// <p>The identifier of the metric to update. Adding the <code>$SAVED</code> qualifier will update the saved version of the metric. Adding <code>$LATEST</code> or omitting a qualifier will update the published version.</p>
    pub fn get_metric_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.metric_id
    }
    /// <p>The updated calculation definition for the metric.</p>
    pub fn metric_calculation(mut self, input: crate::types::MetricCalculation) -> Self {
        self.metric_calculation = ::std::option::Option::Some(input);
        self
    }
    /// <p>The updated calculation definition for the metric.</p>
    pub fn set_metric_calculation(mut self, input: ::std::option::Option<crate::types::MetricCalculation>) -> Self {
        self.metric_calculation = input;
        self
    }
    /// <p>The updated calculation definition for the metric.</p>
    pub fn get_metric_calculation(&self) -> &::std::option::Option<crate::types::MetricCalculation> {
        &self.metric_calculation
    }
    /// <p>The updated display unit for the metric.</p>
    pub fn unit(mut self, input: crate::types::MetricUnit) -> Self {
        self.unit = ::std::option::Option::Some(input);
        self
    }
    /// <p>The updated display unit for the metric.</p>
    pub fn set_unit(mut self, input: ::std::option::Option<crate::types::MetricUnit>) -> Self {
        self.unit = input;
        self
    }
    /// <p>The updated display unit for the metric.</p>
    pub fn get_unit(&self) -> &::std::option::Option<crate::types::MetricUnit> {
        &self.unit
    }
    /// <p>How an increase in the metric value should be interpreted. Valid values: <code>POSITIVE</code>, <code>NEUTRAL</code>, <code>NEGATIVE</code>.</p>
    pub fn positive_trend_indicator(mut self, input: crate::types::TrendIndicator) -> Self {
        self.positive_trend_indicator = ::std::option::Option::Some(input);
        self
    }
    /// <p>How an increase in the metric value should be interpreted. Valid values: <code>POSITIVE</code>, <code>NEUTRAL</code>, <code>NEGATIVE</code>.</p>
    pub fn set_positive_trend_indicator(mut self, input: ::std::option::Option<crate::types::TrendIndicator>) -> Self {
        self.positive_trend_indicator = input;
        self
    }
    /// <p>How an increase in the metric value should be interpreted. Valid values: <code>POSITIVE</code>, <code>NEUTRAL</code>, <code>NEGATIVE</code>.</p>
    pub fn get_positive_trend_indicator(&self) -> &::std::option::Option<crate::types::TrendIndicator> {
        &self.positive_trend_indicator
    }
    /// Consumes the builder and constructs a [`UpdateMetricContentInput`](crate::operation::update_metric_content::UpdateMetricContentInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_metric_content::UpdateMetricContentInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_metric_content::UpdateMetricContentInput {
            instance_id: self.instance_id,
            metric_id: self.metric_id,
            metric_calculation: self.metric_calculation,
            unit: self.unit,
            positive_trend_indicator: self.positive_trend_indicator,
        })
    }
}