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 StartMetricStreamsInput {
    /// <p>The array of the names of metric streams to start 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 start streaming.</p>
    pub names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl StartMetricStreamsInput {
    /// <p>The array of the names of metric streams to start 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 start 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 StartMetricStreamsInput {
    /// Creates a new builder-style object to manufacture [`StartMetricStreamsInput`](crate::operation::start_metric_streams::StartMetricStreamsInput).
    pub fn builder() -> crate::operation::start_metric_streams::builders::StartMetricStreamsInputBuilder {
        crate::operation::start_metric_streams::builders::StartMetricStreamsInputBuilder::default()
    }
}

/// A builder for [`StartMetricStreamsInput`](crate::operation::start_metric_streams::StartMetricStreamsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartMetricStreamsInputBuilder {
    pub(crate) names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl StartMetricStreamsInputBuilder {
    /// 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 start 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 start 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 start 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 start 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 start 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 start streaming.</p>
    pub fn get_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.names
    }
    /// Consumes the builder and constructs a [`StartMetricStreamsInput`](crate::operation::start_metric_streams::StartMetricStreamsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::start_metric_streams::StartMetricStreamsInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::start_metric_streams::StartMetricStreamsInput { names: self.names })
    }
}