1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>An object representing an Amazon Cognito identity pool.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateIdentityPoolOutput {
    /// <p>An identity pool ID in the format REGION:GUID.</p>
    pub identity_pool_id: ::std::string::String,
    /// <p>A string that you provide.</p>
    pub identity_pool_name: ::std::string::String,
    /// <p>TRUE if the identity pool supports unauthenticated logins.</p>
    pub allow_unauthenticated_identities: bool,
    /// <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>
    pub allow_classic_flow: ::std::option::Option<bool>,
    /// <p>Optional key:value pairs mapping provider names to provider app IDs.</p>
    pub supported_login_providers: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The "domain" by which Cognito will refer to your users.</p>
    pub developer_provider_name: ::std::option::Option<::std::string::String>,
    /// <p>The ARNs of the OpenID Connect providers.</p>
    pub open_id_connect_provider_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>A list representing an Amazon Cognito user pool and its client ID.</p>
    pub cognito_identity_providers: ::std::option::Option<::std::vec::Vec<crate::types::CognitoIdentityProvider>>,
    /// <p>An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.</p>
    pub saml_provider_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <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>
    pub identity_pool_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    _request_id: Option<String>,
}
impl UpdateIdentityPoolOutput {
    /// <p>An identity pool ID in the format REGION:GUID.</p>
    pub fn identity_pool_id(&self) -> &str {
        use std::ops::Deref;
        self.identity_pool_id.deref()
    }
    /// <p>A string that you provide.</p>
    pub fn identity_pool_name(&self) -> &str {
        use std::ops::Deref;
        self.identity_pool_name.deref()
    }
    /// <p>TRUE if the identity pool supports unauthenticated logins.</p>
    pub fn allow_unauthenticated_identities(&self) -> bool {
        self.allow_unauthenticated_identities
    }
    /// <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>
    pub fn allow_classic_flow(&self) -> ::std::option::Option<bool> {
        self.allow_classic_flow
    }
    /// <p>Optional key:value pairs mapping provider names to provider app IDs.</p>
    pub fn supported_login_providers(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.supported_login_providers.as_ref()
    }
    /// <p>The "domain" by which Cognito will refer to your users.</p>
    pub fn developer_provider_name(&self) -> ::std::option::Option<&str> {
        self.developer_provider_name.as_deref()
    }
    /// <p>The ARNs of the OpenID Connect providers.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.open_id_connect_provider_arns.is_none()`.
    pub fn open_id_connect_provider_arns(&self) -> &[::std::string::String] {
        self.open_id_connect_provider_arns.as_deref().unwrap_or_default()
    }
    /// <p>A list representing an Amazon Cognito user pool and its client ID.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.cognito_identity_providers.is_none()`.
    pub fn cognito_identity_providers(&self) -> &[crate::types::CognitoIdentityProvider] {
        self.cognito_identity_providers.as_deref().unwrap_or_default()
    }
    /// <p>An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.saml_provider_arns.is_none()`.
    pub fn saml_provider_arns(&self) -> &[::std::string::String] {
        self.saml_provider_arns.as_deref().unwrap_or_default()
    }
    /// <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>
    pub fn identity_pool_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.identity_pool_tags.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for UpdateIdentityPoolOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdateIdentityPoolOutput {
    /// Creates a new builder-style object to manufacture [`UpdateIdentityPoolOutput`](crate::operation::update_identity_pool::UpdateIdentityPoolOutput).
    pub fn builder() -> crate::operation::update_identity_pool::builders::UpdateIdentityPoolOutputBuilder {
        crate::operation::update_identity_pool::builders::UpdateIdentityPoolOutputBuilder::default()
    }
}

/// A builder for [`UpdateIdentityPoolOutput`](crate::operation::update_identity_pool::UpdateIdentityPoolOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateIdentityPoolOutputBuilder {
    pub(crate) identity_pool_id: ::std::option::Option<::std::string::String>,
    pub(crate) identity_pool_name: ::std::option::Option<::std::string::String>,
    pub(crate) allow_unauthenticated_identities: ::std::option::Option<bool>,
    pub(crate) allow_classic_flow: ::std::option::Option<bool>,
    pub(crate) supported_login_providers: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) developer_provider_name: ::std::option::Option<::std::string::String>,
    pub(crate) open_id_connect_provider_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) cognito_identity_providers: ::std::option::Option<::std::vec::Vec<crate::types::CognitoIdentityProvider>>,
    pub(crate) saml_provider_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) identity_pool_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    _request_id: Option<String>,
}
impl UpdateIdentityPoolOutputBuilder {
    /// <p>An identity pool ID in the format REGION:GUID.</p>
    /// This field is required.
    pub fn identity_pool_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.identity_pool_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An identity pool ID in the format REGION:GUID.</p>
    pub fn set_identity_pool_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.identity_pool_id = input;
        self
    }
    /// <p>An identity pool ID in the format REGION:GUID.</p>
    pub fn get_identity_pool_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.identity_pool_id
    }
    /// <p>A string that you provide.</p>
    /// This field is required.
    pub fn identity_pool_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.identity_pool_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A string that you provide.</p>
    pub fn set_identity_pool_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.identity_pool_name = input;
        self
    }
    /// <p>A string that you provide.</p>
    pub fn get_identity_pool_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.identity_pool_name
    }
    /// <p>TRUE if the identity pool supports unauthenticated logins.</p>
    /// This field is required.
    pub fn allow_unauthenticated_identities(mut self, input: bool) -> Self {
        self.allow_unauthenticated_identities = ::std::option::Option::Some(input);
        self
    }
    /// <p>TRUE if the identity pool supports unauthenticated logins.</p>
    pub fn set_allow_unauthenticated_identities(mut self, input: ::std::option::Option<bool>) -> Self {
        self.allow_unauthenticated_identities = input;
        self
    }
    /// <p>TRUE if the identity pool supports unauthenticated logins.</p>
    pub fn get_allow_unauthenticated_identities(&self) -> &::std::option::Option<bool> {
        &self.allow_unauthenticated_identities
    }
    /// <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>
    pub fn allow_classic_flow(mut self, input: bool) -> Self {
        self.allow_classic_flow = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_allow_classic_flow(mut self, input: ::std::option::Option<bool>) -> Self {
        self.allow_classic_flow = input;
        self
    }
    /// <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>
    pub fn get_allow_classic_flow(&self) -> &::std::option::Option<bool> {
        &self.allow_classic_flow
    }
    /// Adds a key-value pair to `supported_login_providers`.
    ///
    /// To override the contents of this collection use [`set_supported_login_providers`](Self::set_supported_login_providers).
    ///
    /// <p>Optional key:value pairs mapping provider names to provider app IDs.</p>
    pub fn supported_login_providers(
        mut self,
        k: impl ::std::convert::Into<::std::string::String>,
        v: impl ::std::convert::Into<::std::string::String>,
    ) -> Self {
        let mut hash_map = self.supported_login_providers.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.supported_login_providers = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>Optional key:value pairs mapping provider names to provider app IDs.</p>
    pub fn set_supported_login_providers(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    ) -> Self {
        self.supported_login_providers = input;
        self
    }
    /// <p>Optional key:value pairs mapping provider names to provider app IDs.</p>
    pub fn get_supported_login_providers(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.supported_login_providers
    }
    /// <p>The "domain" by which Cognito will refer to your users.</p>
    pub fn developer_provider_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.developer_provider_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The "domain" by which Cognito will refer to your users.</p>
    pub fn set_developer_provider_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.developer_provider_name = input;
        self
    }
    /// <p>The "domain" by which Cognito will refer to your users.</p>
    pub fn get_developer_provider_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.developer_provider_name
    }
    /// Appends an item to `open_id_connect_provider_arns`.
    ///
    /// To override the contents of this collection use [`set_open_id_connect_provider_arns`](Self::set_open_id_connect_provider_arns).
    ///
    /// <p>The ARNs of the OpenID Connect providers.</p>
    pub fn open_id_connect_provider_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.open_id_connect_provider_arns.unwrap_or_default();
        v.push(input.into());
        self.open_id_connect_provider_arns = ::std::option::Option::Some(v);
        self
    }
    /// <p>The ARNs of the OpenID Connect providers.</p>
    pub fn set_open_id_connect_provider_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.open_id_connect_provider_arns = input;
        self
    }
    /// <p>The ARNs of the OpenID Connect providers.</p>
    pub fn get_open_id_connect_provider_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.open_id_connect_provider_arns
    }
    /// Appends an item to `cognito_identity_providers`.
    ///
    /// To override the contents of this collection use [`set_cognito_identity_providers`](Self::set_cognito_identity_providers).
    ///
    /// <p>A list representing an Amazon Cognito user pool and its client ID.</p>
    pub fn cognito_identity_providers(mut self, input: crate::types::CognitoIdentityProvider) -> Self {
        let mut v = self.cognito_identity_providers.unwrap_or_default();
        v.push(input);
        self.cognito_identity_providers = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list representing an Amazon Cognito user pool and its client ID.</p>
    pub fn set_cognito_identity_providers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CognitoIdentityProvider>>) -> Self {
        self.cognito_identity_providers = input;
        self
    }
    /// <p>A list representing an Amazon Cognito user pool and its client ID.</p>
    pub fn get_cognito_identity_providers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CognitoIdentityProvider>> {
        &self.cognito_identity_providers
    }
    /// Appends an item to `saml_provider_arns`.
    ///
    /// To override the contents of this collection use [`set_saml_provider_arns`](Self::set_saml_provider_arns).
    ///
    /// <p>An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.</p>
    pub fn saml_provider_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.saml_provider_arns.unwrap_or_default();
        v.push(input.into());
        self.saml_provider_arns = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.</p>
    pub fn set_saml_provider_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.saml_provider_arns = input;
        self
    }
    /// <p>An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.</p>
    pub fn get_saml_provider_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.saml_provider_arns
    }
    /// Adds a key-value pair to `identity_pool_tags`.
    ///
    /// To override the contents of this collection use [`set_identity_pool_tags`](Self::set_identity_pool_tags).
    ///
    /// <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>
    pub fn identity_pool_tags(
        mut self,
        k: impl ::std::convert::Into<::std::string::String>,
        v: impl ::std::convert::Into<::std::string::String>,
    ) -> Self {
        let mut hash_map = self.identity_pool_tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.identity_pool_tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <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>
    pub fn set_identity_pool_tags(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    ) -> Self {
        self.identity_pool_tags = input;
        self
    }
    /// <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>
    pub fn get_identity_pool_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.identity_pool_tags
    }
    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 [`UpdateIdentityPoolOutput`](crate::operation::update_identity_pool::UpdateIdentityPoolOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`identity_pool_id`](crate::operation::update_identity_pool::builders::UpdateIdentityPoolOutputBuilder::identity_pool_id)
    /// - [`identity_pool_name`](crate::operation::update_identity_pool::builders::UpdateIdentityPoolOutputBuilder::identity_pool_name)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_identity_pool::UpdateIdentityPoolOutput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_identity_pool::UpdateIdentityPoolOutput {
            identity_pool_id: self.identity_pool_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "identity_pool_id",
                    "identity_pool_id was not specified but it is required when building UpdateIdentityPoolOutput",
                )
            })?,
            identity_pool_name: self.identity_pool_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "identity_pool_name",
                    "identity_pool_name was not specified but it is required when building UpdateIdentityPoolOutput",
                )
            })?,
            allow_unauthenticated_identities: self.allow_unauthenticated_identities.unwrap_or_default(),
            allow_classic_flow: self.allow_classic_flow,
            supported_login_providers: self.supported_login_providers,
            developer_provider_name: self.developer_provider_name,
            open_id_connect_provider_arns: self.open_id_connect_provider_arns,
            cognito_identity_providers: self.cognito_identity_providers,
            saml_provider_arns: self.saml_provider_arns,
            identity_pool_tags: self.identity_pool_tags,
            _request_id: self._request_id,
        })
    }
}