aws_sdk_s3outposts/operation/list_shared_endpoints/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_shared_endpoints::_list_shared_endpoints_output::ListSharedEndpointsOutputBuilder;
3
4pub use crate::operation::list_shared_endpoints::_list_shared_endpoints_input::ListSharedEndpointsInputBuilder;
5
6impl crate::operation::list_shared_endpoints::builders::ListSharedEndpointsInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::list_shared_endpoints::ListSharedEndpointsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::list_shared_endpoints::ListSharedEndpointsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.list_shared_endpoints();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ListSharedEndpoints`.
24///
25/// <p>Lists all endpoints associated with an Outpost that has been shared by Amazon Web Services Resource Access Manager (RAM).</p>
26/// <p>Related actions include:</p>
27/// <ul>
28/// <li>
29/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_CreateEndpoint.html">CreateEndpoint</a></p></li>
30/// <li>
31/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_DeleteEndpoint.html">DeleteEndpoint</a></p></li>
32/// </ul>
33#[derive(::std::clone::Clone, ::std::fmt::Debug)]
34pub struct ListSharedEndpointsFluentBuilder {
35    handle: ::std::sync::Arc<crate::client::Handle>,
36    inner: crate::operation::list_shared_endpoints::builders::ListSharedEndpointsInputBuilder,
37    config_override: ::std::option::Option<crate::config::Builder>,
38}
39impl
40    crate::client::customize::internal::CustomizableSend<
41        crate::operation::list_shared_endpoints::ListSharedEndpointsOutput,
42        crate::operation::list_shared_endpoints::ListSharedEndpointsError,
43    > for ListSharedEndpointsFluentBuilder
44{
45    fn send(
46        self,
47        config_override: crate::config::Builder,
48    ) -> crate::client::customize::internal::BoxFuture<
49        crate::client::customize::internal::SendResult<
50            crate::operation::list_shared_endpoints::ListSharedEndpointsOutput,
51            crate::operation::list_shared_endpoints::ListSharedEndpointsError,
52        >,
53    > {
54        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
55    }
56}
57impl ListSharedEndpointsFluentBuilder {
58    /// Creates a new `ListSharedEndpointsFluentBuilder`.
59    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
60        Self {
61            handle,
62            inner: ::std::default::Default::default(),
63            config_override: ::std::option::Option::None,
64        }
65    }
66    /// Access the ListSharedEndpoints as a reference.
67    pub fn as_input(&self) -> &crate::operation::list_shared_endpoints::builders::ListSharedEndpointsInputBuilder {
68        &self.inner
69    }
70    /// Sends the request and returns the response.
71    ///
72    /// If an error occurs, an `SdkError` will be returned with additional details that
73    /// can be matched against.
74    ///
75    /// By default, any retryable failures will be retried twice. Retry behavior
76    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
77    /// set when configuring the client.
78    pub async fn send(
79        self,
80    ) -> ::std::result::Result<
81        crate::operation::list_shared_endpoints::ListSharedEndpointsOutput,
82        ::aws_smithy_runtime_api::client::result::SdkError<
83            crate::operation::list_shared_endpoints::ListSharedEndpointsError,
84            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
85        >,
86    > {
87        let input = self
88            .inner
89            .build()
90            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
91        let runtime_plugins = crate::operation::list_shared_endpoints::ListSharedEndpoints::operation_runtime_plugins(
92            self.handle.runtime_plugins.clone(),
93            &self.handle.conf,
94            self.config_override,
95        );
96        crate::operation::list_shared_endpoints::ListSharedEndpoints::orchestrate(&runtime_plugins, input).await
97    }
98
99    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
100    pub fn customize(
101        self,
102    ) -> crate::client::customize::CustomizableOperation<
103        crate::operation::list_shared_endpoints::ListSharedEndpointsOutput,
104        crate::operation::list_shared_endpoints::ListSharedEndpointsError,
105        Self,
106    > {
107        crate::client::customize::CustomizableOperation::new(self)
108    }
109    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
110        self.set_config_override(::std::option::Option::Some(config_override.into()));
111        self
112    }
113
114    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
115        self.config_override = config_override;
116        self
117    }
118    /// Create a paginator for this request
119    ///
120    /// Paginators are used by calling [`send().await`](crate::operation::list_shared_endpoints::paginator::ListSharedEndpointsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
121    pub fn into_paginator(self) -> crate::operation::list_shared_endpoints::paginator::ListSharedEndpointsPaginator {
122        crate::operation::list_shared_endpoints::paginator::ListSharedEndpointsPaginator::new(self.handle, self.inner)
123    }
124    /// <p>If a previous response from this operation included a <code>NextToken</code> value, you can provide that value here to retrieve the next page of results.</p>
125    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126        self.inner = self.inner.next_token(input.into());
127        self
128    }
129    /// <p>If a previous response from this operation included a <code>NextToken</code> value, you can provide that value here to retrieve the next page of results.</p>
130    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.inner = self.inner.set_next_token(input);
132        self
133    }
134    /// <p>If a previous response from this operation included a <code>NextToken</code> value, you can provide that value here to retrieve the next page of results.</p>
135    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
136        self.inner.get_next_token()
137    }
138    /// <p>The maximum number of endpoints that will be returned in the response.</p>
139    pub fn max_results(mut self, input: i32) -> Self {
140        self.inner = self.inner.max_results(input);
141        self
142    }
143    /// <p>The maximum number of endpoints that will be returned in the response.</p>
144    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
145        self.inner = self.inner.set_max_results(input);
146        self
147    }
148    /// <p>The maximum number of endpoints that will be returned in the response.</p>
149    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
150        self.inner.get_max_results()
151    }
152    /// <p>The ID of the Amazon Web Services Outpost.</p>
153    pub fn outpost_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154        self.inner = self.inner.outpost_id(input.into());
155        self
156    }
157    /// <p>The ID of the Amazon Web Services Outpost.</p>
158    pub fn set_outpost_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159        self.inner = self.inner.set_outpost_id(input);
160        self
161    }
162    /// <p>The ID of the Amazon Web Services Outpost.</p>
163    pub fn get_outpost_id(&self) -> &::std::option::Option<::std::string::String> {
164        self.inner.get_outpost_id()
165    }
166}