aws_sdk_cognitoidentity/operation/update_identity_pool/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_identity_pool::_update_identity_pool_output::UpdateIdentityPoolOutputBuilder;
3
4pub use crate::operation::update_identity_pool::_update_identity_pool_input::UpdateIdentityPoolInputBuilder;
5
6impl crate::operation::update_identity_pool::builders::UpdateIdentityPoolInputBuilder {
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::update_identity_pool::UpdateIdentityPoolOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_identity_pool::UpdateIdentityPoolError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_identity_pool();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateIdentityPool`.
24///
25/// <p>Updates the configuration of an identity pool.</p><important>
26/// <p>If you don't provide a value for a parameter, Amazon Cognito sets it to its default value.</p>
27/// </important>
28/// <p>You must use Amazon Web Services developer credentials to call this operation.</p>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct UpdateIdentityPoolFluentBuilder {
31    handle: ::std::sync::Arc<crate::client::Handle>,
32    inner: crate::operation::update_identity_pool::builders::UpdateIdentityPoolInputBuilder,
33    config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36    crate::client::customize::internal::CustomizableSend<
37        crate::operation::update_identity_pool::UpdateIdentityPoolOutput,
38        crate::operation::update_identity_pool::UpdateIdentityPoolError,
39    > for UpdateIdentityPoolFluentBuilder
40{
41    fn send(
42        self,
43        config_override: crate::config::Builder,
44    ) -> crate::client::customize::internal::BoxFuture<
45        crate::client::customize::internal::SendResult<
46            crate::operation::update_identity_pool::UpdateIdentityPoolOutput,
47            crate::operation::update_identity_pool::UpdateIdentityPoolError,
48        >,
49    > {
50        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51    }
52}
53impl UpdateIdentityPoolFluentBuilder {
54    /// Creates a new `UpdateIdentityPoolFluentBuilder`.
55    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56        Self {
57            handle,
58            inner: ::std::default::Default::default(),
59            config_override: ::std::option::Option::None,
60        }
61    }
62    /// Access the UpdateIdentityPool as a reference.
63    pub fn as_input(&self) -> &crate::operation::update_identity_pool::builders::UpdateIdentityPoolInputBuilder {
64        &self.inner
65    }
66    /// Sends the request and returns the response.
67    ///
68    /// If an error occurs, an `SdkError` will be returned with additional details that
69    /// can be matched against.
70    ///
71    /// By default, any retryable failures will be retried twice. Retry behavior
72    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73    /// set when configuring the client.
74    pub async fn send(
75        self,
76    ) -> ::std::result::Result<
77        crate::operation::update_identity_pool::UpdateIdentityPoolOutput,
78        ::aws_smithy_runtime_api::client::result::SdkError<
79            crate::operation::update_identity_pool::UpdateIdentityPoolError,
80            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81        >,
82    > {
83        let input = self
84            .inner
85            .build()
86            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87        let runtime_plugins = crate::operation::update_identity_pool::UpdateIdentityPool::operation_runtime_plugins(
88            self.handle.runtime_plugins.clone(),
89            &self.handle.conf,
90            self.config_override,
91        );
92        crate::operation::update_identity_pool::UpdateIdentityPool::orchestrate(&runtime_plugins, input).await
93    }
94
95    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
96    pub fn customize(
97        self,
98    ) -> crate::client::customize::CustomizableOperation<
99        crate::operation::update_identity_pool::UpdateIdentityPoolOutput,
100        crate::operation::update_identity_pool::UpdateIdentityPoolError,
101        Self,
102    > {
103        crate::client::customize::CustomizableOperation::new(self)
104    }
105    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
106        self.set_config_override(::std::option::Option::Some(config_override.into()));
107        self
108    }
109
110    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
111        self.config_override = config_override;
112        self
113    }
114    /// <p>An identity pool ID in the format REGION:GUID.</p>
115    pub fn identity_pool_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.inner = self.inner.identity_pool_id(input.into());
117        self
118    }
119    /// <p>An identity pool ID in the format REGION:GUID.</p>
120    pub fn set_identity_pool_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.inner = self.inner.set_identity_pool_id(input);
122        self
123    }
124    /// <p>An identity pool ID in the format REGION:GUID.</p>
125    pub fn get_identity_pool_id(&self) -> &::std::option::Option<::std::string::String> {
126        self.inner.get_identity_pool_id()
127    }
128    /// <p>A string that you provide.</p>
129    pub fn identity_pool_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130        self.inner = self.inner.identity_pool_name(input.into());
131        self
132    }
133    /// <p>A string that you provide.</p>
134    pub fn set_identity_pool_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.inner = self.inner.set_identity_pool_name(input);
136        self
137    }
138    /// <p>A string that you provide.</p>
139    pub fn get_identity_pool_name(&self) -> &::std::option::Option<::std::string::String> {
140        self.inner.get_identity_pool_name()
141    }
142    /// <p>TRUE if the identity pool supports unauthenticated logins.</p>
143    pub fn allow_unauthenticated_identities(mut self, input: bool) -> Self {
144        self.inner = self.inner.allow_unauthenticated_identities(input);
145        self
146    }
147    /// <p>TRUE if the identity pool supports unauthenticated logins.</p>
148    pub fn set_allow_unauthenticated_identities(mut self, input: ::std::option::Option<bool>) -> Self {
149        self.inner = self.inner.set_allow_unauthenticated_identities(input);
150        self
151    }
152    /// <p>TRUE if the identity pool supports unauthenticated logins.</p>
153    pub fn get_allow_unauthenticated_identities(&self) -> &::std::option::Option<bool> {
154        self.inner.get_allow_unauthenticated_identities()
155    }
156    /// <p>Enables or disables the Basic (Classic) authentication flow. For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flow.html">Identity Pools (Federated Identities) Authentication Flow</a> in the <i>Amazon Cognito Developer Guide</i>.</p>
157    pub fn allow_classic_flow(mut self, input: bool) -> Self {
158        self.inner = self.inner.allow_classic_flow(input);
159        self
160    }
161    /// <p>Enables or disables the Basic (Classic) authentication flow. For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flow.html">Identity Pools (Federated Identities) Authentication Flow</a> in the <i>Amazon Cognito Developer Guide</i>.</p>
162    pub fn set_allow_classic_flow(mut self, input: ::std::option::Option<bool>) -> Self {
163        self.inner = self.inner.set_allow_classic_flow(input);
164        self
165    }
166    /// <p>Enables or disables the Basic (Classic) authentication flow. For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flow.html">Identity Pools (Federated Identities) Authentication Flow</a> in the <i>Amazon Cognito Developer Guide</i>.</p>
167    pub fn get_allow_classic_flow(&self) -> &::std::option::Option<bool> {
168        self.inner.get_allow_classic_flow()
169    }
170    ///
171    /// Adds a key-value pair to `SupportedLoginProviders`.
172    ///
173    /// To override the contents of this collection use [`set_supported_login_providers`](Self::set_supported_login_providers).
174    ///
175    /// <p>Optional key:value pairs mapping provider names to provider app IDs.</p>
176    pub fn supported_login_providers(
177        mut self,
178        k: impl ::std::convert::Into<::std::string::String>,
179        v: impl ::std::convert::Into<::std::string::String>,
180    ) -> Self {
181        self.inner = self.inner.supported_login_providers(k.into(), v.into());
182        self
183    }
184    /// <p>Optional key:value pairs mapping provider names to provider app IDs.</p>
185    pub fn set_supported_login_providers(
186        mut self,
187        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
188    ) -> Self {
189        self.inner = self.inner.set_supported_login_providers(input);
190        self
191    }
192    /// <p>Optional key:value pairs mapping provider names to provider app IDs.</p>
193    pub fn get_supported_login_providers(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
194        self.inner.get_supported_login_providers()
195    }
196    /// <p>The "domain" by which Cognito will refer to your users.</p>
197    pub fn developer_provider_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
198        self.inner = self.inner.developer_provider_name(input.into());
199        self
200    }
201    /// <p>The "domain" by which Cognito will refer to your users.</p>
202    pub fn set_developer_provider_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
203        self.inner = self.inner.set_developer_provider_name(input);
204        self
205    }
206    /// <p>The "domain" by which Cognito will refer to your users.</p>
207    pub fn get_developer_provider_name(&self) -> &::std::option::Option<::std::string::String> {
208        self.inner.get_developer_provider_name()
209    }
210    ///
211    /// Appends an item to `OpenIdConnectProviderARNs`.
212    ///
213    /// To override the contents of this collection use [`set_open_id_connect_provider_arns`](Self::set_open_id_connect_provider_arns).
214    ///
215    /// <p>The ARNs of the OpenID Connect providers.</p>
216    pub fn open_id_connect_provider_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
217        self.inner = self.inner.open_id_connect_provider_arns(input.into());
218        self
219    }
220    /// <p>The ARNs of the OpenID Connect providers.</p>
221    pub fn set_open_id_connect_provider_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
222        self.inner = self.inner.set_open_id_connect_provider_arns(input);
223        self
224    }
225    /// <p>The ARNs of the OpenID Connect providers.</p>
226    pub fn get_open_id_connect_provider_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
227        self.inner.get_open_id_connect_provider_arns()
228    }
229    ///
230    /// Appends an item to `CognitoIdentityProviders`.
231    ///
232    /// To override the contents of this collection use [`set_cognito_identity_providers`](Self::set_cognito_identity_providers).
233    ///
234    /// <p>A list representing an Amazon Cognito user pool and its client ID.</p>
235    pub fn cognito_identity_providers(mut self, input: crate::types::CognitoIdentityProvider) -> Self {
236        self.inner = self.inner.cognito_identity_providers(input);
237        self
238    }
239    /// <p>A list representing an Amazon Cognito user pool and its client ID.</p>
240    pub fn set_cognito_identity_providers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CognitoIdentityProvider>>) -> Self {
241        self.inner = self.inner.set_cognito_identity_providers(input);
242        self
243    }
244    /// <p>A list representing an Amazon Cognito user pool and its client ID.</p>
245    pub fn get_cognito_identity_providers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CognitoIdentityProvider>> {
246        self.inner.get_cognito_identity_providers()
247    }
248    ///
249    /// Appends an item to `SamlProviderARNs`.
250    ///
251    /// To override the contents of this collection use [`set_saml_provider_arns`](Self::set_saml_provider_arns).
252    ///
253    /// <p>An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.</p>
254    pub fn saml_provider_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
255        self.inner = self.inner.saml_provider_arns(input.into());
256        self
257    }
258    /// <p>An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.</p>
259    pub fn set_saml_provider_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
260        self.inner = self.inner.set_saml_provider_arns(input);
261        self
262    }
263    /// <p>An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.</p>
264    pub fn get_saml_provider_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
265        self.inner.get_saml_provider_arns()
266    }
267    ///
268    /// Adds a key-value pair to `IdentityPoolTags`.
269    ///
270    /// To override the contents of this collection use [`set_identity_pool_tags`](Self::set_identity_pool_tags).
271    ///
272    /// <p>The tags that are assigned to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.</p>
273    pub fn identity_pool_tags(
274        mut self,
275        k: impl ::std::convert::Into<::std::string::String>,
276        v: impl ::std::convert::Into<::std::string::String>,
277    ) -> Self {
278        self.inner = self.inner.identity_pool_tags(k.into(), v.into());
279        self
280    }
281    /// <p>The tags that are assigned to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.</p>
282    pub fn set_identity_pool_tags(
283        mut self,
284        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
285    ) -> Self {
286        self.inner = self.inner.set_identity_pool_tags(input);
287        self
288    }
289    /// <p>The tags that are assigned to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.</p>
290    pub fn get_identity_pool_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
291        self.inner.get_identity_pool_tags()
292    }
293}