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
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains the response to a successful <code>GetSessionToken</code> request, including temporary Amazon Web Services credentials that can be used to make Amazon Web Services requests. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetSessionTokenOutput {
    /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p> <note>
    /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
    /// </note>
    #[doc(hidden)]
    pub credentials: std::option::Option<crate::model::Credentials>,
}
impl GetSessionTokenOutput {
    /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p> <note>
    /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
    /// </note>
    pub fn credentials(&self) -> std::option::Option<&crate::model::Credentials> {
        self.credentials.as_ref()
    }
}
/// See [`GetSessionTokenOutput`](crate::output::GetSessionTokenOutput).
pub mod get_session_token_output {

    /// A builder for [`GetSessionTokenOutput`](crate::output::GetSessionTokenOutput).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) credentials: std::option::Option<crate::model::Credentials>,
    }
    impl Builder {
        /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p> <note>
        /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
        /// </note>
        pub fn credentials(mut self, input: crate::model::Credentials) -> Self {
            self.credentials = Some(input);
            self
        }
        /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p> <note>
        /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
        /// </note>
        pub fn set_credentials(
            mut self,
            input: std::option::Option<crate::model::Credentials>,
        ) -> Self {
            self.credentials = input;
            self
        }
        /// Consumes the builder and constructs a [`GetSessionTokenOutput`](crate::output::GetSessionTokenOutput).
        pub fn build(self) -> crate::output::GetSessionTokenOutput {
            crate::output::GetSessionTokenOutput {
                credentials: self.credentials,
            }
        }
    }
}
impl GetSessionTokenOutput {
    /// Creates a new builder-style object to manufacture [`GetSessionTokenOutput`](crate::output::GetSessionTokenOutput).
    pub fn builder() -> crate::output::get_session_token_output::Builder {
        crate::output::get_session_token_output::Builder::default()
    }
}

/// <p>Contains the response to a successful <code>GetFederationToken</code> request, including temporary Amazon Web Services credentials that can be used to make Amazon Web Services requests. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetFederationTokenOutput {
    /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p> <note>
    /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
    /// </note>
    #[doc(hidden)]
    pub credentials: std::option::Option<crate::model::Credentials>,
    /// <p>Identifiers for the federated user associated with the credentials (such as <code>arn:aws:sts::123456789012:federated-user/Bob</code> or <code>123456789012:Bob</code>). You can use the federated user's ARN in your resource-based policies, such as an Amazon S3 bucket policy. </p>
    #[doc(hidden)]
    pub federated_user: std::option::Option<crate::model::FederatedUser>,
    /// <p>A percentage value that indicates the packed size of the session policies and session tags combined passed in the request. The request fails if the packed size is greater than 100 percent, which means the policies and tags exceeded the allowed space.</p>
    #[doc(hidden)]
    pub packed_policy_size: std::option::Option<i32>,
}
impl GetFederationTokenOutput {
    /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p> <note>
    /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
    /// </note>
    pub fn credentials(&self) -> std::option::Option<&crate::model::Credentials> {
        self.credentials.as_ref()
    }
    /// <p>Identifiers for the federated user associated with the credentials (such as <code>arn:aws:sts::123456789012:federated-user/Bob</code> or <code>123456789012:Bob</code>). You can use the federated user's ARN in your resource-based policies, such as an Amazon S3 bucket policy. </p>
    pub fn federated_user(&self) -> std::option::Option<&crate::model::FederatedUser> {
        self.federated_user.as_ref()
    }
    /// <p>A percentage value that indicates the packed size of the session policies and session tags combined passed in the request. The request fails if the packed size is greater than 100 percent, which means the policies and tags exceeded the allowed space.</p>
    pub fn packed_policy_size(&self) -> std::option::Option<i32> {
        self.packed_policy_size
    }
}
/// See [`GetFederationTokenOutput`](crate::output::GetFederationTokenOutput).
pub mod get_federation_token_output {

    /// A builder for [`GetFederationTokenOutput`](crate::output::GetFederationTokenOutput).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) credentials: std::option::Option<crate::model::Credentials>,
        pub(crate) federated_user: std::option::Option<crate::model::FederatedUser>,
        pub(crate) packed_policy_size: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p> <note>
        /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
        /// </note>
        pub fn credentials(mut self, input: crate::model::Credentials) -> Self {
            self.credentials = Some(input);
            self
        }
        /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p> <note>
        /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
        /// </note>
        pub fn set_credentials(
            mut self,
            input: std::option::Option<crate::model::Credentials>,
        ) -> Self {
            self.credentials = input;
            self
        }
        /// <p>Identifiers for the federated user associated with the credentials (such as <code>arn:aws:sts::123456789012:federated-user/Bob</code> or <code>123456789012:Bob</code>). You can use the federated user's ARN in your resource-based policies, such as an Amazon S3 bucket policy. </p>
        pub fn federated_user(mut self, input: crate::model::FederatedUser) -> Self {
            self.federated_user = Some(input);
            self
        }
        /// <p>Identifiers for the federated user associated with the credentials (such as <code>arn:aws:sts::123456789012:federated-user/Bob</code> or <code>123456789012:Bob</code>). You can use the federated user's ARN in your resource-based policies, such as an Amazon S3 bucket policy. </p>
        pub fn set_federated_user(
            mut self,
            input: std::option::Option<crate::model::FederatedUser>,
        ) -> Self {
            self.federated_user = input;
            self
        }
        /// <p>A percentage value that indicates the packed size of the session policies and session tags combined passed in the request. The request fails if the packed size is greater than 100 percent, which means the policies and tags exceeded the allowed space.</p>
        pub fn packed_policy_size(mut self, input: i32) -> Self {
            self.packed_policy_size = Some(input);
            self
        }
        /// <p>A percentage value that indicates the packed size of the session policies and session tags combined passed in the request. The request fails if the packed size is greater than 100 percent, which means the policies and tags exceeded the allowed space.</p>
        pub fn set_packed_policy_size(mut self, input: std::option::Option<i32>) -> Self {
            self.packed_policy_size = input;
            self
        }
        /// Consumes the builder and constructs a [`GetFederationTokenOutput`](crate::output::GetFederationTokenOutput).
        pub fn build(self) -> crate::output::GetFederationTokenOutput {
            crate::output::GetFederationTokenOutput {
                credentials: self.credentials,
                federated_user: self.federated_user,
                packed_policy_size: self.packed_policy_size,
            }
        }
    }
}
impl GetFederationTokenOutput {
    /// Creates a new builder-style object to manufacture [`GetFederationTokenOutput`](crate::output::GetFederationTokenOutput).
    pub fn builder() -> crate::output::get_federation_token_output::Builder {
        crate::output::get_federation_token_output::Builder::default()
    }
}

/// <p>Contains the response to a successful <code>GetCallerIdentity</code> request, including information about the entity making the request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetCallerIdentityOutput {
    /// <p>The unique identifier of the calling entity. The exact value depends on the type of entity that is making the call. The values returned are those listed in the <b>aws:userid</b> column in the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable">Principal table</a> found on the <b>Policy Variables</b> reference page in the <i>IAM User Guide</i>.</p>
    #[doc(hidden)]
    pub user_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services account ID number of the account that owns or contains the calling entity.</p>
    #[doc(hidden)]
    pub account: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services ARN associated with the calling entity.</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
}
impl GetCallerIdentityOutput {
    /// <p>The unique identifier of the calling entity. The exact value depends on the type of entity that is making the call. The values returned are those listed in the <b>aws:userid</b> column in the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable">Principal table</a> found on the <b>Policy Variables</b> reference page in the <i>IAM User Guide</i>.</p>
    pub fn user_id(&self) -> std::option::Option<&str> {
        self.user_id.as_deref()
    }
    /// <p>The Amazon Web Services account ID number of the account that owns or contains the calling entity.</p>
    pub fn account(&self) -> std::option::Option<&str> {
        self.account.as_deref()
    }
    /// <p>The Amazon Web Services ARN associated with the calling entity.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
}
/// See [`GetCallerIdentityOutput`](crate::output::GetCallerIdentityOutput).
pub mod get_caller_identity_output {

    /// A builder for [`GetCallerIdentityOutput`](crate::output::GetCallerIdentityOutput).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) user_id: std::option::Option<std::string::String>,
        pub(crate) account: std::option::Option<std::string::String>,
        pub(crate) arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The unique identifier of the calling entity. The exact value depends on the type of entity that is making the call. The values returned are those listed in the <b>aws:userid</b> column in the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable">Principal table</a> found on the <b>Policy Variables</b> reference page in the <i>IAM User Guide</i>.</p>
        pub fn user_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.user_id = Some(input.into());
            self
        }
        /// <p>The unique identifier of the calling entity. The exact value depends on the type of entity that is making the call. The values returned are those listed in the <b>aws:userid</b> column in the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable">Principal table</a> found on the <b>Policy Variables</b> reference page in the <i>IAM User Guide</i>.</p>
        pub fn set_user_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.user_id = input;
            self
        }
        /// <p>The Amazon Web Services account ID number of the account that owns or contains the calling entity.</p>
        pub fn account(mut self, input: impl Into<std::string::String>) -> Self {
            self.account = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account ID number of the account that owns or contains the calling entity.</p>
        pub fn set_account(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.account = input;
            self
        }
        /// <p>The Amazon Web Services ARN associated with the calling entity.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services ARN associated with the calling entity.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// Consumes the builder and constructs a [`GetCallerIdentityOutput`](crate::output::GetCallerIdentityOutput).
        pub fn build(self) -> crate::output::GetCallerIdentityOutput {
            crate::output::GetCallerIdentityOutput {
                user_id: self.user_id,
                account: self.account,
                arn: self.arn,
            }
        }
    }
}
impl GetCallerIdentityOutput {
    /// Creates a new builder-style object to manufacture [`GetCallerIdentityOutput`](crate::output::GetCallerIdentityOutput).
    pub fn builder() -> crate::output::get_caller_identity_output::Builder {
        crate::output::get_caller_identity_output::Builder::default()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetAccessKeyInfoOutput {
    /// <p>The number used to identify the Amazon Web Services account.</p>
    #[doc(hidden)]
    pub account: std::option::Option<std::string::String>,
}
impl GetAccessKeyInfoOutput {
    /// <p>The number used to identify the Amazon Web Services account.</p>
    pub fn account(&self) -> std::option::Option<&str> {
        self.account.as_deref()
    }
}
/// See [`GetAccessKeyInfoOutput`](crate::output::GetAccessKeyInfoOutput).
pub mod get_access_key_info_output {

    /// A builder for [`GetAccessKeyInfoOutput`](crate::output::GetAccessKeyInfoOutput).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) account: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The number used to identify the Amazon Web Services account.</p>
        pub fn account(mut self, input: impl Into<std::string::String>) -> Self {
            self.account = Some(input.into());
            self
        }
        /// <p>The number used to identify the Amazon Web Services account.</p>
        pub fn set_account(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.account = input;
            self
        }
        /// Consumes the builder and constructs a [`GetAccessKeyInfoOutput`](crate::output::GetAccessKeyInfoOutput).
        pub fn build(self) -> crate::output::GetAccessKeyInfoOutput {
            crate::output::GetAccessKeyInfoOutput {
                account: self.account,
            }
        }
    }
}
impl GetAccessKeyInfoOutput {
    /// Creates a new builder-style object to manufacture [`GetAccessKeyInfoOutput`](crate::output::GetAccessKeyInfoOutput).
    pub fn builder() -> crate::output::get_access_key_info_output::Builder {
        crate::output::get_access_key_info_output::Builder::default()
    }
}

/// <p>A document that contains additional information about the authorization status of a request from an encoded message that is returned in response to an Amazon Web Services request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DecodeAuthorizationMessageOutput {
    /// <p>The API returns a response with the decoded message.</p>
    #[doc(hidden)]
    pub decoded_message: std::option::Option<std::string::String>,
}
impl DecodeAuthorizationMessageOutput {
    /// <p>The API returns a response with the decoded message.</p>
    pub fn decoded_message(&self) -> std::option::Option<&str> {
        self.decoded_message.as_deref()
    }
}
/// See [`DecodeAuthorizationMessageOutput`](crate::output::DecodeAuthorizationMessageOutput).
pub mod decode_authorization_message_output {

    /// A builder for [`DecodeAuthorizationMessageOutput`](crate::output::DecodeAuthorizationMessageOutput).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) decoded_message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The API returns a response with the decoded message.</p>
        pub fn decoded_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.decoded_message = Some(input.into());
            self
        }
        /// <p>The API returns a response with the decoded message.</p>
        pub fn set_decoded_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.decoded_message = input;
            self
        }
        /// Consumes the builder and constructs a [`DecodeAuthorizationMessageOutput`](crate::output::DecodeAuthorizationMessageOutput).
        pub fn build(self) -> crate::output::DecodeAuthorizationMessageOutput {
            crate::output::DecodeAuthorizationMessageOutput {
                decoded_message: self.decoded_message,
            }
        }
    }
}
impl DecodeAuthorizationMessageOutput {
    /// Creates a new builder-style object to manufacture [`DecodeAuthorizationMessageOutput`](crate::output::DecodeAuthorizationMessageOutput).
    pub fn builder() -> crate::output::decode_authorization_message_output::Builder {
        crate::output::decode_authorization_message_output::Builder::default()
    }
}

/// <p>Contains the response to a successful <code>AssumeRoleWithWebIdentity</code> request, including temporary Amazon Web Services credentials that can be used to make Amazon Web Services requests. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssumeRoleWithWebIdentityOutput {
    /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security token.</p> <note>
    /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
    /// </note>
    #[doc(hidden)]
    pub credentials: std::option::Option<crate::model::Credentials>,
    /// <p>The unique user identifier that is returned by the identity provider. This identifier is associated with the <code>WebIdentityToken</code> that was submitted with the <code>AssumeRoleWithWebIdentity</code> call. The identifier is typically unique to the user and the application that acquired the <code>WebIdentityToken</code> (pairwise identifier). For OpenID Connect ID tokens, this field contains the value returned by the identity provider as the token's <code>sub</code> (Subject) claim. </p>
    #[doc(hidden)]
    pub subject_from_web_identity_token: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you can use to refer to the resulting temporary security credentials. For example, you can reference these credentials as a principal in a resource-based policy by using the ARN or assumed role ID. The ARN and ID include the <code>RoleSessionName</code> that you specified when you called <code>AssumeRole</code>. </p>
    #[doc(hidden)]
    pub assumed_role_user: std::option::Option<crate::model::AssumedRoleUser>,
    /// <p>A percentage value that indicates the packed size of the session policies and session tags combined passed in the request. The request fails if the packed size is greater than 100 percent, which means the policies and tags exceeded the allowed space.</p>
    #[doc(hidden)]
    pub packed_policy_size: std::option::Option<i32>,
    /// <p> The issuing authority of the web identity token presented. For OpenID Connect ID tokens, this contains the value of the <code>iss</code> field. For OAuth 2.0 access tokens, this contains the value of the <code>ProviderId</code> parameter that was passed in the <code>AssumeRoleWithWebIdentity</code> request.</p>
    #[doc(hidden)]
    pub provider: std::option::Option<std::string::String>,
    /// <p>The intended audience (also known as client ID) of the web identity token. This is traditionally the client identifier issued to the application that requested the web identity token.</p>
    #[doc(hidden)]
    pub audience: std::option::Option<std::string::String>,
    /// <p>The value of the source identity that is returned in the JSON web token (JWT) from the identity provider.</p>
    /// <p>You can require users to set a source identity value when they assume a role. You do this by using the <code>sts:SourceIdentity</code> condition key in a role trust policy. That way, actions that are taken with the role are associated with that user. After the source identity is set, the value cannot be changed. It is present in the request for all actions that are taken by the role and persists across <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining">chained role</a> sessions. You can configure your identity provider to use an attribute associated with your users, like user name or email, as the source identity when calling <code>AssumeRoleWithWebIdentity</code>. You do this by adding a claim to the JSON web token. To learn more about OIDC tokens and claims, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html">Using Tokens with User Pools</a> in the <i>Amazon Cognito Developer Guide</i>. For more information about using source identity, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html">Monitor and control actions taken with assumed roles</a> in the <i>IAM User Guide</i>.</p>
    /// <p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
    #[doc(hidden)]
    pub source_identity: std::option::Option<std::string::String>,
}
impl AssumeRoleWithWebIdentityOutput {
    /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security token.</p> <note>
    /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
    /// </note>
    pub fn credentials(&self) -> std::option::Option<&crate::model::Credentials> {
        self.credentials.as_ref()
    }
    /// <p>The unique user identifier that is returned by the identity provider. This identifier is associated with the <code>WebIdentityToken</code> that was submitted with the <code>AssumeRoleWithWebIdentity</code> call. The identifier is typically unique to the user and the application that acquired the <code>WebIdentityToken</code> (pairwise identifier). For OpenID Connect ID tokens, this field contains the value returned by the identity provider as the token's <code>sub</code> (Subject) claim. </p>
    pub fn subject_from_web_identity_token(&self) -> std::option::Option<&str> {
        self.subject_from_web_identity_token.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you can use to refer to the resulting temporary security credentials. For example, you can reference these credentials as a principal in a resource-based policy by using the ARN or assumed role ID. The ARN and ID include the <code>RoleSessionName</code> that you specified when you called <code>AssumeRole</code>. </p>
    pub fn assumed_role_user(&self) -> std::option::Option<&crate::model::AssumedRoleUser> {
        self.assumed_role_user.as_ref()
    }
    /// <p>A percentage value that indicates the packed size of the session policies and session tags combined passed in the request. The request fails if the packed size is greater than 100 percent, which means the policies and tags exceeded the allowed space.</p>
    pub fn packed_policy_size(&self) -> std::option::Option<i32> {
        self.packed_policy_size
    }
    /// <p> The issuing authority of the web identity token presented. For OpenID Connect ID tokens, this contains the value of the <code>iss</code> field. For OAuth 2.0 access tokens, this contains the value of the <code>ProviderId</code> parameter that was passed in the <code>AssumeRoleWithWebIdentity</code> request.</p>
    pub fn provider(&self) -> std::option::Option<&str> {
        self.provider.as_deref()
    }
    /// <p>The intended audience (also known as client ID) of the web identity token. This is traditionally the client identifier issued to the application that requested the web identity token.</p>
    pub fn audience(&self) -> std::option::Option<&str> {
        self.audience.as_deref()
    }
    /// <p>The value of the source identity that is returned in the JSON web token (JWT) from the identity provider.</p>
    /// <p>You can require users to set a source identity value when they assume a role. You do this by using the <code>sts:SourceIdentity</code> condition key in a role trust policy. That way, actions that are taken with the role are associated with that user. After the source identity is set, the value cannot be changed. It is present in the request for all actions that are taken by the role and persists across <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining">chained role</a> sessions. You can configure your identity provider to use an attribute associated with your users, like user name or email, as the source identity when calling <code>AssumeRoleWithWebIdentity</code>. You do this by adding a claim to the JSON web token. To learn more about OIDC tokens and claims, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html">Using Tokens with User Pools</a> in the <i>Amazon Cognito Developer Guide</i>. For more information about using source identity, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html">Monitor and control actions taken with assumed roles</a> in the <i>IAM User Guide</i>.</p>
    /// <p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
    pub fn source_identity(&self) -> std::option::Option<&str> {
        self.source_identity.as_deref()
    }
}
/// See [`AssumeRoleWithWebIdentityOutput`](crate::output::AssumeRoleWithWebIdentityOutput).
pub mod assume_role_with_web_identity_output {

    /// A builder for [`AssumeRoleWithWebIdentityOutput`](crate::output::AssumeRoleWithWebIdentityOutput).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) credentials: std::option::Option<crate::model::Credentials>,
        pub(crate) subject_from_web_identity_token: std::option::Option<std::string::String>,
        pub(crate) assumed_role_user: std::option::Option<crate::model::AssumedRoleUser>,
        pub(crate) packed_policy_size: std::option::Option<i32>,
        pub(crate) provider: std::option::Option<std::string::String>,
        pub(crate) audience: std::option::Option<std::string::String>,
        pub(crate) source_identity: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security token.</p> <note>
        /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
        /// </note>
        pub fn credentials(mut self, input: crate::model::Credentials) -> Self {
            self.credentials = Some(input);
            self
        }
        /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security token.</p> <note>
        /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
        /// </note>
        pub fn set_credentials(
            mut self,
            input: std::option::Option<crate::model::Credentials>,
        ) -> Self {
            self.credentials = input;
            self
        }
        /// <p>The unique user identifier that is returned by the identity provider. This identifier is associated with the <code>WebIdentityToken</code> that was submitted with the <code>AssumeRoleWithWebIdentity</code> call. The identifier is typically unique to the user and the application that acquired the <code>WebIdentityToken</code> (pairwise identifier). For OpenID Connect ID tokens, this field contains the value returned by the identity provider as the token's <code>sub</code> (Subject) claim. </p>
        pub fn subject_from_web_identity_token(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.subject_from_web_identity_token = Some(input.into());
            self
        }
        /// <p>The unique user identifier that is returned by the identity provider. This identifier is associated with the <code>WebIdentityToken</code> that was submitted with the <code>AssumeRoleWithWebIdentity</code> call. The identifier is typically unique to the user and the application that acquired the <code>WebIdentityToken</code> (pairwise identifier). For OpenID Connect ID tokens, this field contains the value returned by the identity provider as the token's <code>sub</code> (Subject) claim. </p>
        pub fn set_subject_from_web_identity_token(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.subject_from_web_identity_token = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you can use to refer to the resulting temporary security credentials. For example, you can reference these credentials as a principal in a resource-based policy by using the ARN or assumed role ID. The ARN and ID include the <code>RoleSessionName</code> that you specified when you called <code>AssumeRole</code>. </p>
        pub fn assumed_role_user(mut self, input: crate::model::AssumedRoleUser) -> Self {
            self.assumed_role_user = Some(input);
            self
        }
        /// <p>The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you can use to refer to the resulting temporary security credentials. For example, you can reference these credentials as a principal in a resource-based policy by using the ARN or assumed role ID. The ARN and ID include the <code>RoleSessionName</code> that you specified when you called <code>AssumeRole</code>. </p>
        pub fn set_assumed_role_user(
            mut self,
            input: std::option::Option<crate::model::AssumedRoleUser>,
        ) -> Self {
            self.assumed_role_user = input;
            self
        }
        /// <p>A percentage value that indicates the packed size of the session policies and session tags combined passed in the request. The request fails if the packed size is greater than 100 percent, which means the policies and tags exceeded the allowed space.</p>
        pub fn packed_policy_size(mut self, input: i32) -> Self {
            self.packed_policy_size = Some(input);
            self
        }
        /// <p>A percentage value that indicates the packed size of the session policies and session tags combined passed in the request. The request fails if the packed size is greater than 100 percent, which means the policies and tags exceeded the allowed space.</p>
        pub fn set_packed_policy_size(mut self, input: std::option::Option<i32>) -> Self {
            self.packed_policy_size = input;
            self
        }
        /// <p> The issuing authority of the web identity token presented. For OpenID Connect ID tokens, this contains the value of the <code>iss</code> field. For OAuth 2.0 access tokens, this contains the value of the <code>ProviderId</code> parameter that was passed in the <code>AssumeRoleWithWebIdentity</code> request.</p>
        pub fn provider(mut self, input: impl Into<std::string::String>) -> Self {
            self.provider = Some(input.into());
            self
        }
        /// <p> The issuing authority of the web identity token presented. For OpenID Connect ID tokens, this contains the value of the <code>iss</code> field. For OAuth 2.0 access tokens, this contains the value of the <code>ProviderId</code> parameter that was passed in the <code>AssumeRoleWithWebIdentity</code> request.</p>
        pub fn set_provider(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.provider = input;
            self
        }
        /// <p>The intended audience (also known as client ID) of the web identity token. This is traditionally the client identifier issued to the application that requested the web identity token.</p>
        pub fn audience(mut self, input: impl Into<std::string::String>) -> Self {
            self.audience = Some(input.into());
            self
        }
        /// <p>The intended audience (also known as client ID) of the web identity token. This is traditionally the client identifier issued to the application that requested the web identity token.</p>
        pub fn set_audience(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.audience = input;
            self
        }
        /// <p>The value of the source identity that is returned in the JSON web token (JWT) from the identity provider.</p>
        /// <p>You can require users to set a source identity value when they assume a role. You do this by using the <code>sts:SourceIdentity</code> condition key in a role trust policy. That way, actions that are taken with the role are associated with that user. After the source identity is set, the value cannot be changed. It is present in the request for all actions that are taken by the role and persists across <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining">chained role</a> sessions. You can configure your identity provider to use an attribute associated with your users, like user name or email, as the source identity when calling <code>AssumeRoleWithWebIdentity</code>. You do this by adding a claim to the JSON web token. To learn more about OIDC tokens and claims, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html">Using Tokens with User Pools</a> in the <i>Amazon Cognito Developer Guide</i>. For more information about using source identity, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html">Monitor and control actions taken with assumed roles</a> in the <i>IAM User Guide</i>.</p>
        /// <p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
        pub fn source_identity(mut self, input: impl Into<std::string::String>) -> Self {
            self.source_identity = Some(input.into());
            self
        }
        /// <p>The value of the source identity that is returned in the JSON web token (JWT) from the identity provider.</p>
        /// <p>You can require users to set a source identity value when they assume a role. You do this by using the <code>sts:SourceIdentity</code> condition key in a role trust policy. That way, actions that are taken with the role are associated with that user. After the source identity is set, the value cannot be changed. It is present in the request for all actions that are taken by the role and persists across <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining">chained role</a> sessions. You can configure your identity provider to use an attribute associated with your users, like user name or email, as the source identity when calling <code>AssumeRoleWithWebIdentity</code>. You do this by adding a claim to the JSON web token. To learn more about OIDC tokens and claims, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html">Using Tokens with User Pools</a> in the <i>Amazon Cognito Developer Guide</i>. For more information about using source identity, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html">Monitor and control actions taken with assumed roles</a> in the <i>IAM User Guide</i>.</p>
        /// <p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
        pub fn set_source_identity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.source_identity = input;
            self
        }
        /// Consumes the builder and constructs a [`AssumeRoleWithWebIdentityOutput`](crate::output::AssumeRoleWithWebIdentityOutput).
        pub fn build(self) -> crate::output::AssumeRoleWithWebIdentityOutput {
            crate::output::AssumeRoleWithWebIdentityOutput {
                credentials: self.credentials,
                subject_from_web_identity_token: self.subject_from_web_identity_token,
                assumed_role_user: self.assumed_role_user,
                packed_policy_size: self.packed_policy_size,
                provider: self.provider,
                audience: self.audience,
                source_identity: self.source_identity,
            }
        }
    }
}
impl AssumeRoleWithWebIdentityOutput {
    /// Creates a new builder-style object to manufacture [`AssumeRoleWithWebIdentityOutput`](crate::output::AssumeRoleWithWebIdentityOutput).
    pub fn builder() -> crate::output::assume_role_with_web_identity_output::Builder {
        crate::output::assume_role_with_web_identity_output::Builder::default()
    }
}

/// <p>Contains the response to a successful <code>AssumeRoleWithSAML</code> request, including temporary Amazon Web Services credentials that can be used to make Amazon Web Services requests. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssumeRoleWithSamlOutput {
    /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p> <note>
    /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
    /// </note>
    #[doc(hidden)]
    pub credentials: std::option::Option<crate::model::Credentials>,
    /// <p>The identifiers for the temporary security credentials that the operation returns.</p>
    #[doc(hidden)]
    pub assumed_role_user: std::option::Option<crate::model::AssumedRoleUser>,
    /// <p>A percentage value that indicates the packed size of the session policies and session tags combined passed in the request. The request fails if the packed size is greater than 100 percent, which means the policies and tags exceeded the allowed space.</p>
    #[doc(hidden)]
    pub packed_policy_size: std::option::Option<i32>,
    /// <p>The value of the <code>NameID</code> element in the <code>Subject</code> element of the SAML assertion.</p>
    #[doc(hidden)]
    pub subject: std::option::Option<std::string::String>,
    /// <p> The format of the name ID, as defined by the <code>Format</code> attribute in the <code>NameID</code> element of the SAML assertion. Typical examples of the format are <code>transient</code> or <code>persistent</code>. </p>
    /// <p> If the format includes the prefix <code>urn:oasis:names:tc:SAML:2.0:nameid-format</code>, that prefix is removed. For example, <code>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</code> is returned as <code>transient</code>. If the format includes any other prefix, the format is returned with no modifications.</p>
    #[doc(hidden)]
    pub subject_type: std::option::Option<std::string::String>,
    /// <p>The value of the <code>Issuer</code> element of the SAML assertion.</p>
    #[doc(hidden)]
    pub issuer: std::option::Option<std::string::String>,
    /// <p> The value of the <code>Recipient</code> attribute of the <code>SubjectConfirmationData</code> element of the SAML assertion. </p>
    #[doc(hidden)]
    pub audience: std::option::Option<std::string::String>,
    /// <p>A hash value based on the concatenation of the following:</p>
    /// <ul>
    /// <li> <p>The <code>Issuer</code> response value.</p> </li>
    /// <li> <p>The Amazon Web Services account ID.</p> </li>
    /// <li> <p>The friendly name (the last part of the ARN) of the SAML provider in IAM.</p> </li>
    /// </ul>
    /// <p>The combination of <code>NameQualifier</code> and <code>Subject</code> can be used to uniquely identify a federated user.</p>
    /// <p>The following pseudocode shows how the hash value is calculated:</p>
    /// <p> <code>BASE64 ( SHA1 ( "https://example.com/saml" + "123456789012" + "/MySAMLIdP" ) )</code> </p>
    #[doc(hidden)]
    pub name_qualifier: std::option::Option<std::string::String>,
    /// <p>The value in the <code>SourceIdentity</code> attribute in the SAML assertion. </p>
    /// <p>You can require users to set a source identity value when they assume a role. You do this by using the <code>sts:SourceIdentity</code> condition key in a role trust policy. That way, actions that are taken with the role are associated with that user. After the source identity is set, the value cannot be changed. It is present in the request for all actions that are taken by the role and persists across <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining">chained role</a> sessions. You can configure your SAML identity provider to use an attribute associated with your users, like user name or email, as the source identity when calling <code>AssumeRoleWithSAML</code>. You do this by adding an attribute to the SAML assertion. For more information about using source identity, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html">Monitor and control actions taken with assumed roles</a> in the <i>IAM User Guide</i>.</p>
    /// <p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
    #[doc(hidden)]
    pub source_identity: std::option::Option<std::string::String>,
}
impl AssumeRoleWithSamlOutput {
    /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p> <note>
    /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
    /// </note>
    pub fn credentials(&self) -> std::option::Option<&crate::model::Credentials> {
        self.credentials.as_ref()
    }
    /// <p>The identifiers for the temporary security credentials that the operation returns.</p>
    pub fn assumed_role_user(&self) -> std::option::Option<&crate::model::AssumedRoleUser> {
        self.assumed_role_user.as_ref()
    }
    /// <p>A percentage value that indicates the packed size of the session policies and session tags combined passed in the request. The request fails if the packed size is greater than 100 percent, which means the policies and tags exceeded the allowed space.</p>
    pub fn packed_policy_size(&self) -> std::option::Option<i32> {
        self.packed_policy_size
    }
    /// <p>The value of the <code>NameID</code> element in the <code>Subject</code> element of the SAML assertion.</p>
    pub fn subject(&self) -> std::option::Option<&str> {
        self.subject.as_deref()
    }
    /// <p> The format of the name ID, as defined by the <code>Format</code> attribute in the <code>NameID</code> element of the SAML assertion. Typical examples of the format are <code>transient</code> or <code>persistent</code>. </p>
    /// <p> If the format includes the prefix <code>urn:oasis:names:tc:SAML:2.0:nameid-format</code>, that prefix is removed. For example, <code>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</code> is returned as <code>transient</code>. If the format includes any other prefix, the format is returned with no modifications.</p>
    pub fn subject_type(&self) -> std::option::Option<&str> {
        self.subject_type.as_deref()
    }
    /// <p>The value of the <code>Issuer</code> element of the SAML assertion.</p>
    pub fn issuer(&self) -> std::option::Option<&str> {
        self.issuer.as_deref()
    }
    /// <p> The value of the <code>Recipient</code> attribute of the <code>SubjectConfirmationData</code> element of the SAML assertion. </p>
    pub fn audience(&self) -> std::option::Option<&str> {
        self.audience.as_deref()
    }
    /// <p>A hash value based on the concatenation of the following:</p>
    /// <ul>
    /// <li> <p>The <code>Issuer</code> response value.</p> </li>
    /// <li> <p>The Amazon Web Services account ID.</p> </li>
    /// <li> <p>The friendly name (the last part of the ARN) of the SAML provider in IAM.</p> </li>
    /// </ul>
    /// <p>The combination of <code>NameQualifier</code> and <code>Subject</code> can be used to uniquely identify a federated user.</p>
    /// <p>The following pseudocode shows how the hash value is calculated:</p>
    /// <p> <code>BASE64 ( SHA1 ( "https://example.com/saml" + "123456789012" + "/MySAMLIdP" ) )</code> </p>
    pub fn name_qualifier(&self) -> std::option::Option<&str> {
        self.name_qualifier.as_deref()
    }
    /// <p>The value in the <code>SourceIdentity</code> attribute in the SAML assertion. </p>
    /// <p>You can require users to set a source identity value when they assume a role. You do this by using the <code>sts:SourceIdentity</code> condition key in a role trust policy. That way, actions that are taken with the role are associated with that user. After the source identity is set, the value cannot be changed. It is present in the request for all actions that are taken by the role and persists across <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining">chained role</a> sessions. You can configure your SAML identity provider to use an attribute associated with your users, like user name or email, as the source identity when calling <code>AssumeRoleWithSAML</code>. You do this by adding an attribute to the SAML assertion. For more information about using source identity, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html">Monitor and control actions taken with assumed roles</a> in the <i>IAM User Guide</i>.</p>
    /// <p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
    pub fn source_identity(&self) -> std::option::Option<&str> {
        self.source_identity.as_deref()
    }
}
/// See [`AssumeRoleWithSamlOutput`](crate::output::AssumeRoleWithSamlOutput).
pub mod assume_role_with_saml_output {

    /// A builder for [`AssumeRoleWithSamlOutput`](crate::output::AssumeRoleWithSamlOutput).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) credentials: std::option::Option<crate::model::Credentials>,
        pub(crate) assumed_role_user: std::option::Option<crate::model::AssumedRoleUser>,
        pub(crate) packed_policy_size: std::option::Option<i32>,
        pub(crate) subject: std::option::Option<std::string::String>,
        pub(crate) subject_type: std::option::Option<std::string::String>,
        pub(crate) issuer: std::option::Option<std::string::String>,
        pub(crate) audience: std::option::Option<std::string::String>,
        pub(crate) name_qualifier: std::option::Option<std::string::String>,
        pub(crate) source_identity: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p> <note>
        /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
        /// </note>
        pub fn credentials(mut self, input: crate::model::Credentials) -> Self {
            self.credentials = Some(input);
            self
        }
        /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p> <note>
        /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
        /// </note>
        pub fn set_credentials(
            mut self,
            input: std::option::Option<crate::model::Credentials>,
        ) -> Self {
            self.credentials = input;
            self
        }
        /// <p>The identifiers for the temporary security credentials that the operation returns.</p>
        pub fn assumed_role_user(mut self, input: crate::model::AssumedRoleUser) -> Self {
            self.assumed_role_user = Some(input);
            self
        }
        /// <p>The identifiers for the temporary security credentials that the operation returns.</p>
        pub fn set_assumed_role_user(
            mut self,
            input: std::option::Option<crate::model::AssumedRoleUser>,
        ) -> Self {
            self.assumed_role_user = input;
            self
        }
        /// <p>A percentage value that indicates the packed size of the session policies and session tags combined passed in the request. The request fails if the packed size is greater than 100 percent, which means the policies and tags exceeded the allowed space.</p>
        pub fn packed_policy_size(mut self, input: i32) -> Self {
            self.packed_policy_size = Some(input);
            self
        }
        /// <p>A percentage value that indicates the packed size of the session policies and session tags combined passed in the request. The request fails if the packed size is greater than 100 percent, which means the policies and tags exceeded the allowed space.</p>
        pub fn set_packed_policy_size(mut self, input: std::option::Option<i32>) -> Self {
            self.packed_policy_size = input;
            self
        }
        /// <p>The value of the <code>NameID</code> element in the <code>Subject</code> element of the SAML assertion.</p>
        pub fn subject(mut self, input: impl Into<std::string::String>) -> Self {
            self.subject = Some(input.into());
            self
        }
        /// <p>The value of the <code>NameID</code> element in the <code>Subject</code> element of the SAML assertion.</p>
        pub fn set_subject(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subject = input;
            self
        }
        /// <p> The format of the name ID, as defined by the <code>Format</code> attribute in the <code>NameID</code> element of the SAML assertion. Typical examples of the format are <code>transient</code> or <code>persistent</code>. </p>
        /// <p> If the format includes the prefix <code>urn:oasis:names:tc:SAML:2.0:nameid-format</code>, that prefix is removed. For example, <code>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</code> is returned as <code>transient</code>. If the format includes any other prefix, the format is returned with no modifications.</p>
        pub fn subject_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.subject_type = Some(input.into());
            self
        }
        /// <p> The format of the name ID, as defined by the <code>Format</code> attribute in the <code>NameID</code> element of the SAML assertion. Typical examples of the format are <code>transient</code> or <code>persistent</code>. </p>
        /// <p> If the format includes the prefix <code>urn:oasis:names:tc:SAML:2.0:nameid-format</code>, that prefix is removed. For example, <code>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</code> is returned as <code>transient</code>. If the format includes any other prefix, the format is returned with no modifications.</p>
        pub fn set_subject_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subject_type = input;
            self
        }
        /// <p>The value of the <code>Issuer</code> element of the SAML assertion.</p>
        pub fn issuer(mut self, input: impl Into<std::string::String>) -> Self {
            self.issuer = Some(input.into());
            self
        }
        /// <p>The value of the <code>Issuer</code> element of the SAML assertion.</p>
        pub fn set_issuer(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.issuer = input;
            self
        }
        /// <p> The value of the <code>Recipient</code> attribute of the <code>SubjectConfirmationData</code> element of the SAML assertion. </p>
        pub fn audience(mut self, input: impl Into<std::string::String>) -> Self {
            self.audience = Some(input.into());
            self
        }
        /// <p> The value of the <code>Recipient</code> attribute of the <code>SubjectConfirmationData</code> element of the SAML assertion. </p>
        pub fn set_audience(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.audience = input;
            self
        }
        /// <p>A hash value based on the concatenation of the following:</p>
        /// <ul>
        /// <li> <p>The <code>Issuer</code> response value.</p> </li>
        /// <li> <p>The Amazon Web Services account ID.</p> </li>
        /// <li> <p>The friendly name (the last part of the ARN) of the SAML provider in IAM.</p> </li>
        /// </ul>
        /// <p>The combination of <code>NameQualifier</code> and <code>Subject</code> can be used to uniquely identify a federated user.</p>
        /// <p>The following pseudocode shows how the hash value is calculated:</p>
        /// <p> <code>BASE64 ( SHA1 ( "https://example.com/saml" + "123456789012" + "/MySAMLIdP" ) )</code> </p>
        pub fn name_qualifier(mut self, input: impl Into<std::string::String>) -> Self {
            self.name_qualifier = Some(input.into());
            self
        }
        /// <p>A hash value based on the concatenation of the following:</p>
        /// <ul>
        /// <li> <p>The <code>Issuer</code> response value.</p> </li>
        /// <li> <p>The Amazon Web Services account ID.</p> </li>
        /// <li> <p>The friendly name (the last part of the ARN) of the SAML provider in IAM.</p> </li>
        /// </ul>
        /// <p>The combination of <code>NameQualifier</code> and <code>Subject</code> can be used to uniquely identify a federated user.</p>
        /// <p>The following pseudocode shows how the hash value is calculated:</p>
        /// <p> <code>BASE64 ( SHA1 ( "https://example.com/saml" + "123456789012" + "/MySAMLIdP" ) )</code> </p>
        pub fn set_name_qualifier(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.name_qualifier = input;
            self
        }
        /// <p>The value in the <code>SourceIdentity</code> attribute in the SAML assertion. </p>
        /// <p>You can require users to set a source identity value when they assume a role. You do this by using the <code>sts:SourceIdentity</code> condition key in a role trust policy. That way, actions that are taken with the role are associated with that user. After the source identity is set, the value cannot be changed. It is present in the request for all actions that are taken by the role and persists across <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining">chained role</a> sessions. You can configure your SAML identity provider to use an attribute associated with your users, like user name or email, as the source identity when calling <code>AssumeRoleWithSAML</code>. You do this by adding an attribute to the SAML assertion. For more information about using source identity, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html">Monitor and control actions taken with assumed roles</a> in the <i>IAM User Guide</i>.</p>
        /// <p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
        pub fn source_identity(mut self, input: impl Into<std::string::String>) -> Self {
            self.source_identity = Some(input.into());
            self
        }
        /// <p>The value in the <code>SourceIdentity</code> attribute in the SAML assertion. </p>
        /// <p>You can require users to set a source identity value when they assume a role. You do this by using the <code>sts:SourceIdentity</code> condition key in a role trust policy. That way, actions that are taken with the role are associated with that user. After the source identity is set, the value cannot be changed. It is present in the request for all actions that are taken by the role and persists across <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining">chained role</a> sessions. You can configure your SAML identity provider to use an attribute associated with your users, like user name or email, as the source identity when calling <code>AssumeRoleWithSAML</code>. You do this by adding an attribute to the SAML assertion. For more information about using source identity, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html">Monitor and control actions taken with assumed roles</a> in the <i>IAM User Guide</i>.</p>
        /// <p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
        pub fn set_source_identity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.source_identity = input;
            self
        }
        /// Consumes the builder and constructs a [`AssumeRoleWithSamlOutput`](crate::output::AssumeRoleWithSamlOutput).
        pub fn build(self) -> crate::output::AssumeRoleWithSamlOutput {
            crate::output::AssumeRoleWithSamlOutput {
                credentials: self.credentials,
                assumed_role_user: self.assumed_role_user,
                packed_policy_size: self.packed_policy_size,
                subject: self.subject,
                subject_type: self.subject_type,
                issuer: self.issuer,
                audience: self.audience,
                name_qualifier: self.name_qualifier,
                source_identity: self.source_identity,
            }
        }
    }
}
impl AssumeRoleWithSamlOutput {
    /// Creates a new builder-style object to manufacture [`AssumeRoleWithSamlOutput`](crate::output::AssumeRoleWithSamlOutput).
    pub fn builder() -> crate::output::assume_role_with_saml_output::Builder {
        crate::output::assume_role_with_saml_output::Builder::default()
    }
}

/// <p>Contains the response to a successful <code>AssumeRole</code> request, including temporary Amazon Web Services credentials that can be used to make Amazon Web Services requests. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssumeRoleOutput {
    /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p> <note>
    /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
    /// </note>
    #[doc(hidden)]
    pub credentials: std::option::Option<crate::model::Credentials>,
    /// <p>The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you can use to refer to the resulting temporary security credentials. For example, you can reference these credentials as a principal in a resource-based policy by using the ARN or assumed role ID. The ARN and ID include the <code>RoleSessionName</code> that you specified when you called <code>AssumeRole</code>. </p>
    #[doc(hidden)]
    pub assumed_role_user: std::option::Option<crate::model::AssumedRoleUser>,
    /// <p>A percentage value that indicates the packed size of the session policies and session tags combined passed in the request. The request fails if the packed size is greater than 100 percent, which means the policies and tags exceeded the allowed space.</p>
    #[doc(hidden)]
    pub packed_policy_size: std::option::Option<i32>,
    /// <p>The source identity specified by the principal that is calling the <code>AssumeRole</code> operation.</p>
    /// <p>You can require users to specify a source identity when they assume a role. You do this by using the <code>sts:SourceIdentity</code> condition key in a role trust policy. You can use source identity information in CloudTrail logs to determine who took actions with a role. You can use the <code>aws:SourceIdentity</code> condition key to further control access to Amazon Web Services resources based on the value of source identity. For more information about using source identity, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html">Monitor and control actions taken with assumed roles</a> in the <i>IAM User Guide</i>.</p>
    /// <p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
    #[doc(hidden)]
    pub source_identity: std::option::Option<std::string::String>,
}
impl AssumeRoleOutput {
    /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p> <note>
    /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
    /// </note>
    pub fn credentials(&self) -> std::option::Option<&crate::model::Credentials> {
        self.credentials.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you can use to refer to the resulting temporary security credentials. For example, you can reference these credentials as a principal in a resource-based policy by using the ARN or assumed role ID. The ARN and ID include the <code>RoleSessionName</code> that you specified when you called <code>AssumeRole</code>. </p>
    pub fn assumed_role_user(&self) -> std::option::Option<&crate::model::AssumedRoleUser> {
        self.assumed_role_user.as_ref()
    }
    /// <p>A percentage value that indicates the packed size of the session policies and session tags combined passed in the request. The request fails if the packed size is greater than 100 percent, which means the policies and tags exceeded the allowed space.</p>
    pub fn packed_policy_size(&self) -> std::option::Option<i32> {
        self.packed_policy_size
    }
    /// <p>The source identity specified by the principal that is calling the <code>AssumeRole</code> operation.</p>
    /// <p>You can require users to specify a source identity when they assume a role. You do this by using the <code>sts:SourceIdentity</code> condition key in a role trust policy. You can use source identity information in CloudTrail logs to determine who took actions with a role. You can use the <code>aws:SourceIdentity</code> condition key to further control access to Amazon Web Services resources based on the value of source identity. For more information about using source identity, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html">Monitor and control actions taken with assumed roles</a> in the <i>IAM User Guide</i>.</p>
    /// <p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
    pub fn source_identity(&self) -> std::option::Option<&str> {
        self.source_identity.as_deref()
    }
}
/// See [`AssumeRoleOutput`](crate::output::AssumeRoleOutput).
pub mod assume_role_output {

    /// A builder for [`AssumeRoleOutput`](crate::output::AssumeRoleOutput).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) credentials: std::option::Option<crate::model::Credentials>,
        pub(crate) assumed_role_user: std::option::Option<crate::model::AssumedRoleUser>,
        pub(crate) packed_policy_size: std::option::Option<i32>,
        pub(crate) source_identity: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p> <note>
        /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
        /// </note>
        pub fn credentials(mut self, input: crate::model::Credentials) -> Self {
            self.credentials = Some(input);
            self
        }
        /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p> <note>
        /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
        /// </note>
        pub fn set_credentials(
            mut self,
            input: std::option::Option<crate::model::Credentials>,
        ) -> Self {
            self.credentials = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you can use to refer to the resulting temporary security credentials. For example, you can reference these credentials as a principal in a resource-based policy by using the ARN or assumed role ID. The ARN and ID include the <code>RoleSessionName</code> that you specified when you called <code>AssumeRole</code>. </p>
        pub fn assumed_role_user(mut self, input: crate::model::AssumedRoleUser) -> Self {
            self.assumed_role_user = Some(input);
            self
        }
        /// <p>The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you can use to refer to the resulting temporary security credentials. For example, you can reference these credentials as a principal in a resource-based policy by using the ARN or assumed role ID. The ARN and ID include the <code>RoleSessionName</code> that you specified when you called <code>AssumeRole</code>. </p>
        pub fn set_assumed_role_user(
            mut self,
            input: std::option::Option<crate::model::AssumedRoleUser>,
        ) -> Self {
            self.assumed_role_user = input;
            self
        }
        /// <p>A percentage value that indicates the packed size of the session policies and session tags combined passed in the request. The request fails if the packed size is greater than 100 percent, which means the policies and tags exceeded the allowed space.</p>
        pub fn packed_policy_size(mut self, input: i32) -> Self {
            self.packed_policy_size = Some(input);
            self
        }
        /// <p>A percentage value that indicates the packed size of the session policies and session tags combined passed in the request. The request fails if the packed size is greater than 100 percent, which means the policies and tags exceeded the allowed space.</p>
        pub fn set_packed_policy_size(mut self, input: std::option::Option<i32>) -> Self {
            self.packed_policy_size = input;
            self
        }
        /// <p>The source identity specified by the principal that is calling the <code>AssumeRole</code> operation.</p>
        /// <p>You can require users to specify a source identity when they assume a role. You do this by using the <code>sts:SourceIdentity</code> condition key in a role trust policy. You can use source identity information in CloudTrail logs to determine who took actions with a role. You can use the <code>aws:SourceIdentity</code> condition key to further control access to Amazon Web Services resources based on the value of source identity. For more information about using source identity, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html">Monitor and control actions taken with assumed roles</a> in the <i>IAM User Guide</i>.</p>
        /// <p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
        pub fn source_identity(mut self, input: impl Into<std::string::String>) -> Self {
            self.source_identity = Some(input.into());
            self
        }
        /// <p>The source identity specified by the principal that is calling the <code>AssumeRole</code> operation.</p>
        /// <p>You can require users to specify a source identity when they assume a role. You do this by using the <code>sts:SourceIdentity</code> condition key in a role trust policy. You can use source identity information in CloudTrail logs to determine who took actions with a role. You can use the <code>aws:SourceIdentity</code> condition key to further control access to Amazon Web Services resources based on the value of source identity. For more information about using source identity, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html">Monitor and control actions taken with assumed roles</a> in the <i>IAM User Guide</i>.</p>
        /// <p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
        pub fn set_source_identity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.source_identity = input;
            self
        }
        /// Consumes the builder and constructs a [`AssumeRoleOutput`](crate::output::AssumeRoleOutput).
        pub fn build(self) -> crate::output::AssumeRoleOutput {
            crate::output::AssumeRoleOutput {
                credentials: self.credentials,
                assumed_role_user: self.assumed_role_user,
                packed_policy_size: self.packed_policy_size,
                source_identity: self.source_identity,
            }
        }
    }
}
impl AssumeRoleOutput {
    /// Creates a new builder-style object to manufacture [`AssumeRoleOutput`](crate::output::AssumeRoleOutput).
    pub fn builder() -> crate::output::assume_role_output::Builder {
        crate::output::assume_role_output::Builder::default()
    }
}