1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetRoleCredentialsInput {
6/// <p>The friendly name of the role that is assigned to the user.</p>
7pub role_name: ::std::option::Option<::std::string::String>,
8/// <p>The identifier for the AWS account that is assigned to the user.</p>
9pub account_id: ::std::option::Option<::std::string::String>,
10/// <p>The token issued by the <code>CreateToken</code> API call. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>IAM Identity Center OIDC API Reference Guide</i>.</p>
11pub access_token: ::std::option::Option<::std::string::String>,
12}
13impl GetRoleCredentialsInput {
14/// <p>The friendly name of the role that is assigned to the user.</p>
15pub fn role_name(&self) -> ::std::option::Option<&str> {
16self.role_name.as_deref()
17 }
18/// <p>The identifier for the AWS account that is assigned to the user.</p>
19pub fn account_id(&self) -> ::std::option::Option<&str> {
20self.account_id.as_deref()
21 }
22/// <p>The token issued by the <code>CreateToken</code> API call. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>IAM Identity Center OIDC API Reference Guide</i>.</p>
23pub fn access_token(&self) -> ::std::option::Option<&str> {
24self.access_token.as_deref()
25 }
26}
27impl ::std::fmt::Debug for GetRoleCredentialsInput {
28fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29let mut formatter = f.debug_struct("GetRoleCredentialsInput");
30 formatter.field("role_name", &self.role_name);
31 formatter.field("account_id", &self.account_id);
32 formatter.field("access_token", &"*** Sensitive Data Redacted ***");
33 formatter.finish()
34 }
35}
36impl GetRoleCredentialsInput {
37/// Creates a new builder-style object to manufacture [`GetRoleCredentialsInput`](crate::operation::get_role_credentials::GetRoleCredentialsInput).
38pub fn builder() -> crate::operation::get_role_credentials::builders::GetRoleCredentialsInputBuilder {
39crate::operation::get_role_credentials::builders::GetRoleCredentialsInputBuilder::default()
40 }
41}
4243/// A builder for [`GetRoleCredentialsInput`](crate::operation::get_role_credentials::GetRoleCredentialsInput).
44#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
45#[non_exhaustive]
46pub struct GetRoleCredentialsInputBuilder {
47pub(crate) role_name: ::std::option::Option<::std::string::String>,
48pub(crate) account_id: ::std::option::Option<::std::string::String>,
49pub(crate) access_token: ::std::option::Option<::std::string::String>,
50}
51impl GetRoleCredentialsInputBuilder {
52/// <p>The friendly name of the role that is assigned to the user.</p>
53 /// This field is required.
54pub fn role_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55self.role_name = ::std::option::Option::Some(input.into());
56self
57}
58/// <p>The friendly name of the role that is assigned to the user.</p>
59pub fn set_role_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60self.role_name = input;
61self
62}
63/// <p>The friendly name of the role that is assigned to the user.</p>
64pub fn get_role_name(&self) -> &::std::option::Option<::std::string::String> {
65&self.role_name
66 }
67/// <p>The identifier for the AWS account that is assigned to the user.</p>
68 /// This field is required.
69pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70self.account_id = ::std::option::Option::Some(input.into());
71self
72}
73/// <p>The identifier for the AWS account that is assigned to the user.</p>
74pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75self.account_id = input;
76self
77}
78/// <p>The identifier for the AWS account that is assigned to the user.</p>
79pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
80&self.account_id
81 }
82/// <p>The token issued by the <code>CreateToken</code> API call. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>IAM Identity Center OIDC API Reference Guide</i>.</p>
83 /// This field is required.
84pub fn access_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
85self.access_token = ::std::option::Option::Some(input.into());
86self
87}
88/// <p>The token issued by the <code>CreateToken</code> API call. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>IAM Identity Center OIDC API Reference Guide</i>.</p>
89pub fn set_access_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90self.access_token = input;
91self
92}
93/// <p>The token issued by the <code>CreateToken</code> API call. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>IAM Identity Center OIDC API Reference Guide</i>.</p>
94pub fn get_access_token(&self) -> &::std::option::Option<::std::string::String> {
95&self.access_token
96 }
97/// Consumes the builder and constructs a [`GetRoleCredentialsInput`](crate::operation::get_role_credentials::GetRoleCredentialsInput).
98pub fn build(
99self,
100 ) -> ::std::result::Result<crate::operation::get_role_credentials::GetRoleCredentialsInput, ::aws_smithy_types::error::operation::BuildError>
101 {
102 ::std::result::Result::Ok(crate::operation::get_role_credentials::GetRoleCredentialsInput {
103 role_name: self.role_name,
104 account_id: self.account_id,
105 access_token: self.access_token,
106 })
107 }
108}
109impl ::std::fmt::Debug for GetRoleCredentialsInputBuilder {
110fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
111let mut formatter = f.debug_struct("GetRoleCredentialsInputBuilder");
112 formatter.field("role_name", &self.role_name);
113 formatter.field("account_id", &self.account_id);
114 formatter.field("access_token", &"*** Sensitive Data Redacted ***");
115 formatter.finish()
116 }
117}