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