aws_sdk_ec2/operation/describe_ipam_external_resource_verification_tokens/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_ipam_external_resource_verification_tokens::_describe_ipam_external_resource_verification_tokens_output::DescribeIpamExternalResourceVerificationTokensOutputBuilder;
3
4pub use crate::operation::describe_ipam_external_resource_verification_tokens::_describe_ipam_external_resource_verification_tokens_input::DescribeIpamExternalResourceVerificationTokensInputBuilder;
5
6impl crate::operation::describe_ipam_external_resource_verification_tokens::builders::DescribeIpamExternalResourceVerificationTokensInputBuilder {
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::describe_ipam_external_resource_verification_tokens::DescribeIpamExternalResourceVerificationTokensOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_ipam_external_resource_verification_tokens::DescribeIpamExternalResourceVerificationTokensError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_ipam_external_resource_verification_tokens();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeIpamExternalResourceVerificationTokens`.
24///
25/// <p>Describe verification tokens.</p>
26/// <p>A verification token is an Amazon Web Services-generated random value that you can use to prove ownership of an external resource. For example, you can use a verification token to validate that you control a public IP address range when you bring an IP address range to Amazon Web Services (BYOIP).</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct DescribeIpamExternalResourceVerificationTokensFluentBuilder {
29    handle: ::std::sync::Arc<crate::client::Handle>,
30    inner:
31        crate::operation::describe_ipam_external_resource_verification_tokens::builders::DescribeIpamExternalResourceVerificationTokensInputBuilder,
32    config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl
35    crate::client::customize::internal::CustomizableSend<
36        crate::operation::describe_ipam_external_resource_verification_tokens::DescribeIpamExternalResourceVerificationTokensOutput,
37        crate::operation::describe_ipam_external_resource_verification_tokens::DescribeIpamExternalResourceVerificationTokensError,
38    > for DescribeIpamExternalResourceVerificationTokensFluentBuilder
39{
40    fn send(
41        self,
42        config_override: crate::config::Builder,
43    ) -> crate::client::customize::internal::BoxFuture<
44        crate::client::customize::internal::SendResult<
45            crate::operation::describe_ipam_external_resource_verification_tokens::DescribeIpamExternalResourceVerificationTokensOutput,
46            crate::operation::describe_ipam_external_resource_verification_tokens::DescribeIpamExternalResourceVerificationTokensError,
47        >,
48    > {
49        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
50    }
51}
52impl DescribeIpamExternalResourceVerificationTokensFluentBuilder {
53    /// Creates a new `DescribeIpamExternalResourceVerificationTokensFluentBuilder`.
54    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
55        Self {
56            handle,
57            inner: ::std::default::Default::default(),
58            config_override: ::std::option::Option::None,
59        }
60    }
61    /// Access the DescribeIpamExternalResourceVerificationTokens as a reference.
62    pub fn as_input(
63        &self,
64    ) -> &crate::operation::describe_ipam_external_resource_verification_tokens::builders::DescribeIpamExternalResourceVerificationTokensInputBuilder
65    {
66        &self.inner
67    }
68    /// Sends the request and returns the response.
69    ///
70    /// If an error occurs, an `SdkError` will be returned with additional details that
71    /// can be matched against.
72    ///
73    /// By default, any retryable failures will be retried twice. Retry behavior
74    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
75    /// set when configuring the client.
76    pub async fn send(
77        self,
78    ) -> ::std::result::Result<
79        crate::operation::describe_ipam_external_resource_verification_tokens::DescribeIpamExternalResourceVerificationTokensOutput,
80        ::aws_smithy_runtime_api::client::result::SdkError<
81            crate::operation::describe_ipam_external_resource_verification_tokens::DescribeIpamExternalResourceVerificationTokensError,
82            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
83        >,
84    > {
85        let input = self
86            .inner
87            .build()
88            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
89        let runtime_plugins = crate::operation::describe_ipam_external_resource_verification_tokens::DescribeIpamExternalResourceVerificationTokens::operation_runtime_plugins(
90                            self.handle.runtime_plugins.clone(),
91                            &self.handle.conf,
92                            self.config_override,
93                        );
94        crate::operation::describe_ipam_external_resource_verification_tokens::DescribeIpamExternalResourceVerificationTokens::orchestrate(
95            &runtime_plugins,
96            input,
97        )
98        .await
99    }
100
101    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
102    pub fn customize(
103        self,
104    ) -> crate::client::customize::CustomizableOperation<
105        crate::operation::describe_ipam_external_resource_verification_tokens::DescribeIpamExternalResourceVerificationTokensOutput,
106        crate::operation::describe_ipam_external_resource_verification_tokens::DescribeIpamExternalResourceVerificationTokensError,
107        Self,
108    > {
109        crate::client::customize::CustomizableOperation::new(self)
110    }
111    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
112        self.set_config_override(::std::option::Option::Some(config_override.into()));
113        self
114    }
115
116    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
117        self.config_override = config_override;
118        self
119    }
120    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
121    pub fn dry_run(mut self, input: bool) -> Self {
122        self.inner = self.inner.dry_run(input);
123        self
124    }
125    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
126    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
127        self.inner = self.inner.set_dry_run(input);
128        self
129    }
130    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
131    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
132        self.inner.get_dry_run()
133    }
134    ///
135    /// Appends an item to `Filters`.
136    ///
137    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
138    ///
139    /// <p>One or more filters for the request. For more information about filtering, see <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-filter.html">Filtering CLI output</a>.</p>
140    /// <p>Available filters:</p>
141    /// <ul>
142    /// <li>
143    /// <p><code>ipam-arn</code></p></li>
144    /// <li>
145    /// <p><code>ipam-external-resource-verification-token-arn</code></p></li>
146    /// <li>
147    /// <p><code>ipam-external-resource-verification-token-id</code></p></li>
148    /// <li>
149    /// <p><code>ipam-id</code></p></li>
150    /// <li>
151    /// <p><code>ipam-region</code></p></li>
152    /// <li>
153    /// <p><code>state</code></p></li>
154    /// <li>
155    /// <p><code>status</code></p></li>
156    /// <li>
157    /// <p><code>token-name</code></p></li>
158    /// <li>
159    /// <p><code>token-value</code></p></li>
160    /// </ul>
161    pub fn filters(mut self, input: crate::types::Filter) -> Self {
162        self.inner = self.inner.filters(input);
163        self
164    }
165    /// <p>One or more filters for the request. For more information about filtering, see <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-filter.html">Filtering CLI output</a>.</p>
166    /// <p>Available filters:</p>
167    /// <ul>
168    /// <li>
169    /// <p><code>ipam-arn</code></p></li>
170    /// <li>
171    /// <p><code>ipam-external-resource-verification-token-arn</code></p></li>
172    /// <li>
173    /// <p><code>ipam-external-resource-verification-token-id</code></p></li>
174    /// <li>
175    /// <p><code>ipam-id</code></p></li>
176    /// <li>
177    /// <p><code>ipam-region</code></p></li>
178    /// <li>
179    /// <p><code>state</code></p></li>
180    /// <li>
181    /// <p><code>status</code></p></li>
182    /// <li>
183    /// <p><code>token-name</code></p></li>
184    /// <li>
185    /// <p><code>token-value</code></p></li>
186    /// </ul>
187    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
188        self.inner = self.inner.set_filters(input);
189        self
190    }
191    /// <p>One or more filters for the request. For more information about filtering, see <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-filter.html">Filtering CLI output</a>.</p>
192    /// <p>Available filters:</p>
193    /// <ul>
194    /// <li>
195    /// <p><code>ipam-arn</code></p></li>
196    /// <li>
197    /// <p><code>ipam-external-resource-verification-token-arn</code></p></li>
198    /// <li>
199    /// <p><code>ipam-external-resource-verification-token-id</code></p></li>
200    /// <li>
201    /// <p><code>ipam-id</code></p></li>
202    /// <li>
203    /// <p><code>ipam-region</code></p></li>
204    /// <li>
205    /// <p><code>state</code></p></li>
206    /// <li>
207    /// <p><code>status</code></p></li>
208    /// <li>
209    /// <p><code>token-name</code></p></li>
210    /// <li>
211    /// <p><code>token-value</code></p></li>
212    /// </ul>
213    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
214        self.inner.get_filters()
215    }
216    /// <p>The token for the next page of results.</p>
217    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
218        self.inner = self.inner.next_token(input.into());
219        self
220    }
221    /// <p>The token for the next page of results.</p>
222    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
223        self.inner = self.inner.set_next_token(input);
224        self
225    }
226    /// <p>The token for the next page of results.</p>
227    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
228        self.inner.get_next_token()
229    }
230    /// <p>The maximum number of tokens to return in one page of results.</p>
231    pub fn max_results(mut self, input: i32) -> Self {
232        self.inner = self.inner.max_results(input);
233        self
234    }
235    /// <p>The maximum number of tokens to return in one page of results.</p>
236    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
237        self.inner = self.inner.set_max_results(input);
238        self
239    }
240    /// <p>The maximum number of tokens to return in one page of results.</p>
241    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
242        self.inner.get_max_results()
243    }
244    ///
245    /// Appends an item to `IpamExternalResourceVerificationTokenIds`.
246    ///
247    /// To override the contents of this collection use [`set_ipam_external_resource_verification_token_ids`](Self::set_ipam_external_resource_verification_token_ids).
248    ///
249    /// <p>Verification token IDs.</p>
250    pub fn ipam_external_resource_verification_token_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
251        self.inner = self.inner.ipam_external_resource_verification_token_ids(input.into());
252        self
253    }
254    /// <p>Verification token IDs.</p>
255    pub fn set_ipam_external_resource_verification_token_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
256        self.inner = self.inner.set_ipam_external_resource_verification_token_ids(input);
257        self
258    }
259    /// <p>Verification token IDs.</p>
260    pub fn get_ipam_external_resource_verification_token_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
261        self.inner.get_ipam_external_resource_verification_token_ids()
262    }
263}