aws-sdk-cloudwatch 1.111.0

AWS SDK for Amazon CloudWatch
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 StopMetricStreamsInput {
    /// <p>The array of the names of metric streams to stop streaming.</p>
    /// <p>This is an "all or nothing" operation. If you do not have permission to access all of the metric streams that you list here, then none of the streams that you list in the operation will stop streaming.</p>
    pub names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl StopMetricStreamsInput {
    /// <p>The array of the names of metric streams to stop streaming.</p>
    /// <p>This is an "all or nothing" operation. If you do not have permission to access all of the metric streams that you list here, then none of the streams that you list in the operation will stop streaming.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.names.is_none()`.
    pub fn names(&self) -> &[::std::string::String] {
        self.names.as_deref().unwrap_or_default()
    }
}
impl StopMetricStreamsInput {
    /// Creates a new builder-style object to manufacture [`StopMetricStreamsInput`](crate::operation::stop_metric_streams::StopMetricStreamsInput).
    pub fn builder() -> crate::operation::stop_metric_streams::builders::StopMetricStreamsInputBuilder {
        crate::operation::stop_metric_streams::builders::StopMetricStreamsInputBuilder::default()
    }
}

/// A builder for [`StopMetricStreamsInput`](crate::operation::stop_metric_streams::StopMetricStreamsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StopMetricStreamsInputBuilder {
    pub(crate) names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl StopMetricStreamsInputBuilder {
    /// Appends an item to `names`.
    ///
    /// To override the contents of this collection use [`set_names`](Self::set_names).
    ///
    /// <p>The array of the names of metric streams to stop streaming.</p>
    /// <p>This is an "all or nothing" operation. If you do not have permission to access all of the metric streams that you list here, then none of the streams that you list in the operation will stop streaming.</p>
    pub fn names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.names.unwrap_or_default();
        v.push(input.into());
        self.names = ::std::option::Option::Some(v);
        self
    }
    /// <p>The array of the names of metric streams to stop streaming.</p>
    /// <p>This is an "all or nothing" operation. If you do not have permission to access all of the metric streams that you list here, then none of the streams that you list in the operation will stop streaming.</p>
    pub fn set_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.names = input;
        self
    }
    /// <p>The array of the names of metric streams to stop streaming.</p>
    /// <p>This is an "all or nothing" operation. If you do not have permission to access all of the metric streams that you list here, then none of the streams that you list in the operation will stop streaming.</p>
    pub fn get_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.names
    }
    /// Consumes the builder and constructs a [`StopMetricStreamsInput`](crate::operation::stop_metric_streams::StopMetricStreamsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::stop_metric_streams::StopMetricStreamsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::stop_metric_streams::StopMetricStreamsInput { names: self.names })
    }
}