aws-sdk-s3outposts 0.27.0

AWS SDK for Amazon S3 on Outposts
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 ListEndpointsOutput {
    /// <p>The list of endpoints associated with the specified Outpost.</p>
    #[doc(hidden)]
    pub endpoints: std::option::Option<std::vec::Vec<crate::types::Endpoint>>,
    /// <p>If the number of endpoints associated with the specified Outpost exceeds <code>MaxResults</code>, you can include this value in subsequent calls to this operation to retrieve more results.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl ListEndpointsOutput {
    /// <p>The list of endpoints associated with the specified Outpost.</p>
    pub fn endpoints(&self) -> std::option::Option<&[crate::types::Endpoint]> {
        self.endpoints.as_deref()
    }
    /// <p>If the number of endpoints associated with the specified Outpost exceeds <code>MaxResults</code>, you can include this value in subsequent calls to this operation to retrieve more results.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl aws_http::request_id::RequestId for ListEndpointsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ListEndpointsOutput {
    /// Creates a new builder-style object to manufacture [`ListEndpointsOutput`](crate::operation::list_endpoints::ListEndpointsOutput).
    pub fn builder() -> crate::operation::list_endpoints::builders::ListEndpointsOutputBuilder {
        crate::operation::list_endpoints::builders::ListEndpointsOutputBuilder::default()
    }
}

/// A builder for [`ListEndpointsOutput`](crate::operation::list_endpoints::ListEndpointsOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ListEndpointsOutputBuilder {
    pub(crate) endpoints: std::option::Option<std::vec::Vec<crate::types::Endpoint>>,
    pub(crate) next_token: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl ListEndpointsOutputBuilder {
    /// Appends an item to `endpoints`.
    ///
    /// To override the contents of this collection use [`set_endpoints`](Self::set_endpoints).
    ///
    /// <p>The list of endpoints associated with the specified Outpost.</p>
    pub fn endpoints(mut self, input: crate::types::Endpoint) -> Self {
        let mut v = self.endpoints.unwrap_or_default();
        v.push(input);
        self.endpoints = Some(v);
        self
    }
    /// <p>The list of endpoints associated with the specified Outpost.</p>
    pub fn set_endpoints(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::Endpoint>>,
    ) -> Self {
        self.endpoints = input;
        self
    }
    /// <p>If the number of endpoints associated with the specified Outpost exceeds <code>MaxResults</code>, you can include this value in subsequent calls to this operation to retrieve more results.</p>
    pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
        self.next_token = Some(input.into());
        self
    }
    /// <p>If the number of endpoints associated with the specified Outpost exceeds <code>MaxResults</code>, you can include this value in subsequent calls to this operation to retrieve more 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 [`ListEndpointsOutput`](crate::operation::list_endpoints::ListEndpointsOutput).
    pub fn build(self) -> crate::operation::list_endpoints::ListEndpointsOutput {
        crate::operation::list_endpoints::ListEndpointsOutput {
            endpoints: self.endpoints,
            next_token: self.next_token,
            _request_id: self._request_id,
        }
    }
}