aws-sdk-iotsecuretunneling 0.26.0

AWS SDK for AWS IoT Secure Tunneling
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 ListTunnelsOutput {
    /// <p>A short description of the tunnels in an Amazon Web Services account.</p>
    #[doc(hidden)]
    pub tunnel_summaries: std::option::Option<std::vec::Vec<crate::types::TunnelSummary>>,
    /// <p>The token to use to get the next set of results, or null if there are no additional results.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl ListTunnelsOutput {
    /// <p>A short description of the tunnels in an Amazon Web Services account.</p>
    pub fn tunnel_summaries(&self) -> std::option::Option<&[crate::types::TunnelSummary]> {
        self.tunnel_summaries.as_deref()
    }
    /// <p>The token to use to get the next set of results, or null if there are no additional results.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl aws_http::request_id::RequestId for ListTunnelsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ListTunnelsOutput {
    /// Creates a new builder-style object to manufacture [`ListTunnelsOutput`](crate::operation::list_tunnels::ListTunnelsOutput).
    pub fn builder() -> crate::operation::list_tunnels::builders::ListTunnelsOutputBuilder {
        crate::operation::list_tunnels::builders::ListTunnelsOutputBuilder::default()
    }
}

/// A builder for [`ListTunnelsOutput`](crate::operation::list_tunnels::ListTunnelsOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ListTunnelsOutputBuilder {
    pub(crate) tunnel_summaries: std::option::Option<std::vec::Vec<crate::types::TunnelSummary>>,
    pub(crate) next_token: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl ListTunnelsOutputBuilder {
    /// Appends an item to `tunnel_summaries`.
    ///
    /// To override the contents of this collection use [`set_tunnel_summaries`](Self::set_tunnel_summaries).
    ///
    /// <p>A short description of the tunnels in an Amazon Web Services account.</p>
    pub fn tunnel_summaries(mut self, input: crate::types::TunnelSummary) -> Self {
        let mut v = self.tunnel_summaries.unwrap_or_default();
        v.push(input);
        self.tunnel_summaries = Some(v);
        self
    }
    /// <p>A short description of the tunnels in an Amazon Web Services account.</p>
    pub fn set_tunnel_summaries(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::TunnelSummary>>,
    ) -> Self {
        self.tunnel_summaries = input;
        self
    }
    /// <p>The token to use to get the next set of results, or null if there are no additional results.</p>
    pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
        self.next_token = Some(input.into());
        self
    }
    /// <p>The token to use to get the next set of results, or null 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
    }
    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 [`ListTunnelsOutput`](crate::operation::list_tunnels::ListTunnelsOutput).
    pub fn build(self) -> crate::operation::list_tunnels::ListTunnelsOutput {
        crate::operation::list_tunnels::ListTunnelsOutput {
            tunnel_summaries: self.tunnel_summaries,
            next_token: self.next_token,
            _request_id: self._request_id,
        }
    }
}