aws-sdk-iot 1.112.0

AWS SDK for AWS IoT
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 UpdateCustomMetricOutput {
    /// <p>The name of the custom metric.</p>
    pub metric_name: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Number (ARN) of the custom metric.</p>
    pub metric_arn: ::std::option::Option<::std::string::String>,
    /// <p>The type of the custom metric.</p><important>
    /// <p>The type <code>number</code> only takes a single metric value as an input, but while submitting the metrics value in the DeviceMetrics report, it must be passed as an array with a single value.</p>
    /// </important>
    pub metric_type: ::std::option::Option<crate::types::CustomMetricType>,
    /// <p>A friendly name in the console for the custom metric</p>
    pub display_name: ::std::option::Option<::std::string::String>,
    /// <p>The creation date of the custom metric in milliseconds since epoch.</p>
    pub creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The time the custom metric was last modified in milliseconds since epoch.</p>
    pub last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl UpdateCustomMetricOutput {
    /// <p>The name of the custom metric.</p>
    pub fn metric_name(&self) -> ::std::option::Option<&str> {
        self.metric_name.as_deref()
    }
    /// <p>The Amazon Resource Number (ARN) of the custom metric.</p>
    pub fn metric_arn(&self) -> ::std::option::Option<&str> {
        self.metric_arn.as_deref()
    }
    /// <p>The type of the custom metric.</p><important>
    /// <p>The type <code>number</code> only takes a single metric value as an input, but while submitting the metrics value in the DeviceMetrics report, it must be passed as an array with a single value.</p>
    /// </important>
    pub fn metric_type(&self) -> ::std::option::Option<&crate::types::CustomMetricType> {
        self.metric_type.as_ref()
    }
    /// <p>A friendly name in the console for the custom metric</p>
    pub fn display_name(&self) -> ::std::option::Option<&str> {
        self.display_name.as_deref()
    }
    /// <p>The creation date of the custom metric in milliseconds since epoch.</p>
    pub fn creation_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.creation_date.as_ref()
    }
    /// <p>The time the custom metric was last modified in milliseconds since epoch.</p>
    pub fn last_modified_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_modified_date.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for UpdateCustomMetricOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdateCustomMetricOutput {
    /// Creates a new builder-style object to manufacture [`UpdateCustomMetricOutput`](crate::operation::update_custom_metric::UpdateCustomMetricOutput).
    pub fn builder() -> crate::operation::update_custom_metric::builders::UpdateCustomMetricOutputBuilder {
        crate::operation::update_custom_metric::builders::UpdateCustomMetricOutputBuilder::default()
    }
}

/// A builder for [`UpdateCustomMetricOutput`](crate::operation::update_custom_metric::UpdateCustomMetricOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateCustomMetricOutputBuilder {
    pub(crate) metric_name: ::std::option::Option<::std::string::String>,
    pub(crate) metric_arn: ::std::option::Option<::std::string::String>,
    pub(crate) metric_type: ::std::option::Option<crate::types::CustomMetricType>,
    pub(crate) display_name: ::std::option::Option<::std::string::String>,
    pub(crate) creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl UpdateCustomMetricOutputBuilder {
    /// <p>The name of the custom metric.</p>
    pub fn metric_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.metric_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the custom metric.</p>
    pub fn set_metric_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.metric_name = input;
        self
    }
    /// <p>The name of the custom metric.</p>
    pub fn get_metric_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.metric_name
    }
    /// <p>The Amazon Resource Number (ARN) of the custom metric.</p>
    pub fn metric_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.metric_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Number (ARN) of the custom metric.</p>
    pub fn set_metric_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.metric_arn = input;
        self
    }
    /// <p>The Amazon Resource Number (ARN) of the custom metric.</p>
    pub fn get_metric_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.metric_arn
    }
    /// <p>The type of the custom metric.</p><important>
    /// <p>The type <code>number</code> only takes a single metric value as an input, but while submitting the metrics value in the DeviceMetrics report, it must be passed as an array with a single value.</p>
    /// </important>
    pub fn metric_type(mut self, input: crate::types::CustomMetricType) -> Self {
        self.metric_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the custom metric.</p><important>
    /// <p>The type <code>number</code> only takes a single metric value as an input, but while submitting the metrics value in the DeviceMetrics report, it must be passed as an array with a single value.</p>
    /// </important>
    pub fn set_metric_type(mut self, input: ::std::option::Option<crate::types::CustomMetricType>) -> Self {
        self.metric_type = input;
        self
    }
    /// <p>The type of the custom metric.</p><important>
    /// <p>The type <code>number</code> only takes a single metric value as an input, but while submitting the metrics value in the DeviceMetrics report, it must be passed as an array with a single value.</p>
    /// </important>
    pub fn get_metric_type(&self) -> &::std::option::Option<crate::types::CustomMetricType> {
        &self.metric_type
    }
    /// <p>A friendly name in the console for the custom metric</p>
    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.display_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A friendly name in the console for the custom metric</p>
    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.display_name = input;
        self
    }
    /// <p>A friendly name in the console for the custom metric</p>
    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.display_name
    }
    /// <p>The creation date of the custom metric in milliseconds since epoch.</p>
    pub fn creation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.creation_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The creation date of the custom metric in milliseconds since epoch.</p>
    pub fn set_creation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.creation_date = input;
        self
    }
    /// <p>The creation date of the custom metric in milliseconds since epoch.</p>
    pub fn get_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.creation_date
    }
    /// <p>The time the custom metric was last modified in milliseconds since epoch.</p>
    pub fn last_modified_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_modified_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time the custom metric was last modified in milliseconds since epoch.</p>
    pub fn set_last_modified_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_modified_date = input;
        self
    }
    /// <p>The time the custom metric was last modified in milliseconds since epoch.</p>
    pub fn get_last_modified_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_modified_date
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`UpdateCustomMetricOutput`](crate::operation::update_custom_metric::UpdateCustomMetricOutput).
    pub fn build(self) -> crate::operation::update_custom_metric::UpdateCustomMetricOutput {
        crate::operation::update_custom_metric::UpdateCustomMetricOutput {
            metric_name: self.metric_name,
            metric_arn: self.metric_arn,
            metric_type: self.metric_type,
            display_name: self.display_name,
            creation_date: self.creation_date,
            last_modified_date: self.last_modified_date,
            _request_id: self._request_id,
        }
    }
}