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 ListDimensionsOutput {
    /// <p>A list of the names of the defined dimensions. Use <code>DescribeDimension</code> to get details for a dimension.</p>
    pub dimension_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>A token that can be used to retrieve the next set of results, or <code>null</code> if there are no additional results.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl ListDimensionsOutput {
    /// <p>A list of the names of the defined dimensions. Use <code>DescribeDimension</code> to get details for a dimension.</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 `.dimension_names.is_none()`.
    pub fn dimension_names(&self) -> &[::std::string::String] {
        self.dimension_names.as_deref().unwrap_or_default()
    }
    /// <p>A token that can be used to retrieve the next set of results, or <code>null</code> if there are no additional results.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for ListDimensionsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ListDimensionsOutput {
    /// Creates a new builder-style object to manufacture [`ListDimensionsOutput`](crate::operation::list_dimensions::ListDimensionsOutput).
    pub fn builder() -> crate::operation::list_dimensions::builders::ListDimensionsOutputBuilder {
        crate::operation::list_dimensions::builders::ListDimensionsOutputBuilder::default()
    }
}

/// A builder for [`ListDimensionsOutput`](crate::operation::list_dimensions::ListDimensionsOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListDimensionsOutputBuilder {
    pub(crate) dimension_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl ListDimensionsOutputBuilder {
    /// Appends an item to `dimension_names`.
    ///
    /// To override the contents of this collection use [`set_dimension_names`](Self::set_dimension_names).
    ///
    /// <p>A list of the names of the defined dimensions. Use <code>DescribeDimension</code> to get details for a dimension.</p>
    pub fn dimension_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.dimension_names.unwrap_or_default();
        v.push(input.into());
        self.dimension_names = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of the names of the defined dimensions. Use <code>DescribeDimension</code> to get details for a dimension.</p>
    pub fn set_dimension_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.dimension_names = input;
        self
    }
    /// <p>A list of the names of the defined dimensions. Use <code>DescribeDimension</code> to get details for a dimension.</p>
    pub fn get_dimension_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.dimension_names
    }
    /// <p>A token that can be used to retrieve the next set of results, or <code>null</code> if there are no additional results.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A token that can be used to retrieve the next set of results, or <code>null</code> if there are no additional results.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>A token that can be used to retrieve the next set of results, or <code>null</code> if there are no additional results.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    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 [`ListDimensionsOutput`](crate::operation::list_dimensions::ListDimensionsOutput).
    pub fn build(self) -> crate::operation::list_dimensions::ListDimensionsOutput {
        crate::operation::list_dimensions::ListDimensionsOutput {
            dimension_names: self.dimension_names,
            next_token: self.next_token,
            _request_id: self._request_id,
        }
    }
}