19 19 | self.access_key_id.as_deref()
|
20 20 | }
|
21 21 | /// <p>The key that is used to sign the request. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the <i>AWS IAM User Guide</i>.</p>
|
22 22 | pub fn secret_access_key(&self) -> ::std::option::Option<&str> {
|
23 23 | self.secret_access_key.as_deref()
|
24 24 | }
|
25 25 | /// <p>The token used for temporary credentials. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the <i>AWS IAM User Guide</i>.</p>
|
26 26 | pub fn session_token(&self) -> ::std::option::Option<&str> {
|
27 27 | self.session_token.as_deref()
|
28 28 | }
|
29 29 | /// <p>The date on which temporary security credentials expire.</p>
|
30 30 | pub fn expiration(&self) -> i64 {
|
31 31 | self.expiration
|
32 32 | }
|
33 33 | }
|
34 34 | impl ::std::fmt::Debug for RoleCredentials {
|
35 35 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
36 36 | let mut formatter = f.debug_struct("RoleCredentials");
|
37 37 | formatter.field("access_key_id", &"*** Sensitive Data Redacted ***");
|
38 38 | formatter.field("secret_access_key", &"*** Sensitive Data Redacted ***");
|
39 39 | formatter.field("session_token", &"*** Sensitive Data Redacted ***");
|
40 40 | formatter.field("expiration", &"*** Sensitive Data Redacted ***");
|
41 41 | formatter.finish()
|
42 42 | }
|
43 43 | }
|
44 44 | static ROLECREDENTIALS_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
|
45 45 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.sso#RoleCredentials", "com.amazonaws.sso", "RoleCredentials");
|
46 46 | static ROLECREDENTIALS_MEMBER_ACCESS_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
47 47 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.sso#RoleCredentials$accessKeyId", "com.amazonaws.sso", "RoleCredentials"),
|
48 48 | ::aws_smithy_schema::ShapeType::String,
|
49 - | "access_key_id",
|
49 + | "accessKeyId",
|
50 50 | 0,
|
51 51 | );
|
52 52 | static ROLECREDENTIALS_MEMBER_SECRET_ACCESS_KEY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
53 53 | ::aws_smithy_schema::ShapeId::from_static(
|
54 54 | "com.amazonaws.sso#RoleCredentials$secretAccessKey",
|
55 55 | "com.amazonaws.sso",
|
56 56 | "RoleCredentials",
|
57 57 | ),
|
58 58 | ::aws_smithy_schema::ShapeType::String,
|
59 - | "secret_access_key",
|
59 + | "secretAccessKey",
|
60 60 | 1,
|
61 61 | );
|
62 62 | static ROLECREDENTIALS_MEMBER_SESSION_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
63 63 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.sso#RoleCredentials$sessionToken", "com.amazonaws.sso", "RoleCredentials"),
|
64 64 | ::aws_smithy_schema::ShapeType::String,
|
65 - | "session_token",
|
65 + | "sessionToken",
|
66 66 | 2,
|
67 67 | );
|
68 68 | static ROLECREDENTIALS_MEMBER_EXPIRATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
69 69 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.sso#RoleCredentials$expiration", "com.amazonaws.sso", "RoleCredentials"),
|
70 70 | ::aws_smithy_schema::ShapeType::Long,
|
71 71 | "expiration",
|
72 72 | 3,
|
73 73 | );
|
74 74 | static ROLECREDENTIALS_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
75 75 | ROLECREDENTIALS_SCHEMA_ID,
|
76 76 | ::aws_smithy_schema::ShapeType::Structure,
|
77 77 | &[
|
78 78 | &ROLECREDENTIALS_MEMBER_ACCESS_KEY_ID,
|
79 79 | &ROLECREDENTIALS_MEMBER_SECRET_ACCESS_KEY,
|
80 80 | &ROLECREDENTIALS_MEMBER_SESSION_TOKEN,
|
81 81 | &ROLECREDENTIALS_MEMBER_EXPIRATION,
|
82 82 | ],
|
83 83 | )
|
84 84 | .with_sensitive();
|
85 85 | impl RoleCredentials {
|
86 86 | /// The schema for this shape.
|
87 87 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &ROLECREDENTIALS_SCHEMA;
|
88 88 | }
|
89 89 | impl ::aws_smithy_schema::serde::SerializableStruct for RoleCredentials {
|
90 90 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
91 91 | fn serialize_members(
|
92 92 | &self,
|
93 93 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
94 94 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
95 95 | if let Some(ref val) = self.access_key_id {
|
96 96 | ser.write_string(&ROLECREDENTIALS_MEMBER_ACCESS_KEY_ID, val)?;
|
97 97 | }
|
98 98 | if let Some(ref val) = self.secret_access_key {
|
99 99 | ser.write_string(&ROLECREDENTIALS_MEMBER_SECRET_ACCESS_KEY, val)?;
|
100 100 | }
|
101 101 | if let Some(ref val) = self.session_token {
|
102 102 | ser.write_string(&ROLECREDENTIALS_MEMBER_SESSION_TOKEN, val)?;
|
103 103 | }
|
104 104 | {
|
105 105 | let val = &self.expiration;
|
106 106 | ser.write_long(&ROLECREDENTIALS_MEMBER_EXPIRATION, *val)?;
|
107 107 | }
|
108 108 | Ok(())
|
109 109 | }
|
110 110 | }
|
111 111 | impl RoleCredentials {
|
112 112 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
113 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
114 - | deserializer: &mut D,
|
113 + | pub fn deserialize(
|
114 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
115 115 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
116 116 | #[allow(unused_variables, unused_mut)]
|
117 117 | let mut builder = Self::builder();
|
118 118 | #[allow(
|
119 119 | unused_variables,
|
120 120 | unreachable_code,
|
121 121 | clippy::single_match,
|
122 122 | clippy::match_single_binding,
|
123 123 | clippy::diverging_sub_expression
|
124 124 | )]
|
125 - | deserializer.read_struct(&ROLECREDENTIALS_SCHEMA, (), |_, member, deser| {
|
125 + | deserializer.read_struct(&ROLECREDENTIALS_SCHEMA, &mut |member, deser| {
|
126 126 | match member.member_index() {
|
127 127 | Some(0) => {
|
128 128 | builder.access_key_id = Some(deser.read_string(member)?);
|
129 129 | }
|
130 130 | Some(1) => {
|
131 131 | builder.secret_access_key = Some(deser.read_string(member)?);
|
132 132 | }
|
133 133 | Some(2) => {
|
134 134 | builder.session_token = Some(deser.read_string(member)?);
|
135 135 | }
|
136 136 | Some(3) => {
|
137 137 | builder.expiration = Some(deser.read_long(member)?);
|
138 138 | }
|
139 139 | _ => {}
|
140 140 | }
|
141 141 | Ok(())
|
142 142 | })?;
|
143 143 | Ok(builder.build())
|
144 144 | }
|
145 145 | }
|
146 + | impl RoleCredentials {
|
147 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
148 + | pub fn deserialize_with_response(
|
149 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
150 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
151 + | _status: u16,
|
152 + | _body: &[u8],
|
153 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
154 + | Self::deserialize(deserializer)
|
155 + | }
|
156 + | }
|
146 157 | impl RoleCredentials {
|
147 158 | /// Creates a new builder-style object to manufacture [`RoleCredentials`](crate::types::RoleCredentials).
|
148 159 | pub fn builder() -> crate::types::builders::RoleCredentialsBuilder {
|
149 160 | crate::types::builders::RoleCredentialsBuilder::default()
|
150 161 | }
|
151 162 | }
|
152 163 |
|
153 164 | /// A builder for [`RoleCredentials`](crate::types::RoleCredentials).
|
154 165 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
|
155 166 | #[non_exhaustive]
|
156 167 | pub struct RoleCredentialsBuilder {
|
157 168 | pub(crate) access_key_id: ::std::option::Option<::std::string::String>,
|
158 169 | pub(crate) secret_access_key: ::std::option::Option<::std::string::String>,
|
159 170 | pub(crate) session_token: ::std::option::Option<::std::string::String>,
|
160 171 | pub(crate) expiration: ::std::option::Option<i64>,
|
161 172 | }
|
162 173 | impl RoleCredentialsBuilder {
|
163 174 | /// <p>The identifier used for the temporary security credentials. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the <i>AWS IAM User Guide</i>.</p>
|
164 175 | pub fn access_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
165 176 | self.access_key_id = ::std::option::Option::Some(input.into());
|
166 177 | self
|
167 178 | }
|
168 179 | /// <p>The identifier used for the temporary security credentials. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the <i>AWS IAM User Guide</i>.</p>
|
169 180 | pub fn set_access_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
170 181 | self.access_key_id = input;
|
171 182 | self
|
172 183 | }
|
173 184 | /// <p>The identifier used for the temporary security credentials. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the <i>AWS IAM User Guide</i>.</p>
|
174 185 | pub fn get_access_key_id(&self) -> &::std::option::Option<::std::string::String> {
|
175 186 | &self.access_key_id
|