aws_sdk_ssooidc/operation/register_client/
_register_client_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct RegisterClientOutput {
6 pub client_id: ::std::option::Option<::std::string::String>,
8 pub client_secret: ::std::option::Option<::std::string::String>,
10 pub client_id_issued_at: i64,
12 pub client_secret_expires_at: i64,
14 pub authorization_endpoint: ::std::option::Option<::std::string::String>,
16 pub token_endpoint: ::std::option::Option<::std::string::String>,
18 _request_id: Option<String>,
19}
20impl RegisterClientOutput {
21 pub fn client_id(&self) -> ::std::option::Option<&str> {
23 self.client_id.as_deref()
24 }
25 pub fn client_secret(&self) -> ::std::option::Option<&str> {
27 self.client_secret.as_deref()
28 }
29 pub fn client_id_issued_at(&self) -> i64 {
31 self.client_id_issued_at
32 }
33 pub fn client_secret_expires_at(&self) -> i64 {
35 self.client_secret_expires_at
36 }
37 pub fn authorization_endpoint(&self) -> ::std::option::Option<&str> {
39 self.authorization_endpoint.as_deref()
40 }
41 pub fn token_endpoint(&self) -> ::std::option::Option<&str> {
43 self.token_endpoint.as_deref()
44 }
45}
46impl ::std::fmt::Debug for RegisterClientOutput {
47 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
48 let mut formatter = f.debug_struct("RegisterClientOutput");
49 formatter.field("client_id", &self.client_id);
50 formatter.field("client_secret", &"*** Sensitive Data Redacted ***");
51 formatter.field("client_id_issued_at", &self.client_id_issued_at);
52 formatter.field("client_secret_expires_at", &self.client_secret_expires_at);
53 formatter.field("authorization_endpoint", &self.authorization_endpoint);
54 formatter.field("token_endpoint", &self.token_endpoint);
55 formatter.field("_request_id", &self._request_id);
56 formatter.finish()
57 }
58}
59static REGISTERCLIENTOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ssooidc.synthetic#RegisterClientOutput", "com.amazonaws.ssooidc.synthetic", "RegisterClientOutput");
60static REGISTERCLIENTOUTPUT_MEMBER_CLIENT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
61 ::aws_smithy_schema::ShapeId::from_static(
62 "com.amazonaws.ssooidc.synthetic#RegisterClientOutput$clientId",
63 "com.amazonaws.ssooidc.synthetic",
64 "RegisterClientOutput",
65 ),
66 ::aws_smithy_schema::ShapeType::String,
67 "clientId",
68 0,
69 );
70static REGISTERCLIENTOUTPUT_MEMBER_CLIENT_SECRET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
71 ::aws_smithy_schema::ShapeId::from_static(
72 "com.amazonaws.ssooidc.synthetic#RegisterClientOutput$clientSecret",
73 "com.amazonaws.ssooidc.synthetic",
74 "RegisterClientOutput",
75 ),
76 ::aws_smithy_schema::ShapeType::String,
77 "clientSecret",
78 1,
79 );
80static REGISTERCLIENTOUTPUT_MEMBER_CLIENT_ID_ISSUED_AT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
81 ::aws_smithy_schema::ShapeId::from_static(
82 "com.amazonaws.ssooidc.synthetic#RegisterClientOutput$clientIdIssuedAt",
83 "com.amazonaws.ssooidc.synthetic",
84 "RegisterClientOutput",
85 ),
86 ::aws_smithy_schema::ShapeType::Long,
87 "clientIdIssuedAt",
88 2,
89 );
90static REGISTERCLIENTOUTPUT_MEMBER_CLIENT_SECRET_EXPIRES_AT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
91 ::aws_smithy_schema::ShapeId::from_static(
92 "com.amazonaws.ssooidc.synthetic#RegisterClientOutput$clientSecretExpiresAt",
93 "com.amazonaws.ssooidc.synthetic",
94 "RegisterClientOutput",
95 ),
96 ::aws_smithy_schema::ShapeType::Long,
97 "clientSecretExpiresAt",
98 3,
99 );
100static REGISTERCLIENTOUTPUT_MEMBER_AUTHORIZATION_ENDPOINT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
101 ::aws_smithy_schema::ShapeId::from_static(
102 "com.amazonaws.ssooidc.synthetic#RegisterClientOutput$authorizationEndpoint",
103 "com.amazonaws.ssooidc.synthetic",
104 "RegisterClientOutput",
105 ),
106 ::aws_smithy_schema::ShapeType::String,
107 "authorizationEndpoint",
108 4,
109 );
110static REGISTERCLIENTOUTPUT_MEMBER_TOKEN_ENDPOINT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
111 ::aws_smithy_schema::ShapeId::from_static(
112 "com.amazonaws.ssooidc.synthetic#RegisterClientOutput$tokenEndpoint",
113 "com.amazonaws.ssooidc.synthetic",
114 "RegisterClientOutput",
115 ),
116 ::aws_smithy_schema::ShapeType::String,
117 "tokenEndpoint",
118 5,
119 );
120static REGISTERCLIENTOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
121 ::aws_smithy_schema::ShapeId::from_static(
122 "synthetic#request_id",
123 "synthetic",
124 "request_id",
125 ),
126 ::aws_smithy_schema::ShapeType::String,
127 "request_id",
128 6,
129 ).with_http_header("x-amzn-requestid");
130static REGISTERCLIENTOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
131 REGISTERCLIENTOUTPUT_SCHEMA_ID,
132 ::aws_smithy_schema::ShapeType::Structure,
133 &[®ISTERCLIENTOUTPUT_MEMBER_CLIENT_ID, ®ISTERCLIENTOUTPUT_MEMBER_CLIENT_SECRET, ®ISTERCLIENTOUTPUT_MEMBER_CLIENT_ID_ISSUED_AT, ®ISTERCLIENTOUTPUT_MEMBER_CLIENT_SECRET_EXPIRES_AT, ®ISTERCLIENTOUTPUT_MEMBER_AUTHORIZATION_ENDPOINT, ®ISTERCLIENTOUTPUT_MEMBER_TOKEN_ENDPOINT, ®ISTERCLIENTOUTPUT_MEMBER__REQUEST_ID],
134 );
135impl RegisterClientOutput {
136 pub const SCHEMA: &'static ::aws_smithy_schema::Schema = ®ISTERCLIENTOUTPUT_SCHEMA;
138 }
139impl ::aws_smithy_schema::serde::SerializableStruct for RegisterClientOutput {
140 #[allow(unused_variables, clippy::diverging_sub_expression)]
141 fn serialize_members(&self, ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
142 if let Some(ref val) = self.client_id {
143 ser.write_string(®ISTERCLIENTOUTPUT_MEMBER_CLIENT_ID, val)?;
144 }
145if let Some(ref val) = self.client_secret {
146 ser.write_string(®ISTERCLIENTOUTPUT_MEMBER_CLIENT_SECRET, val)?;
147 }
148{
149 let val = &self.client_id_issued_at;
150 ser.write_long(®ISTERCLIENTOUTPUT_MEMBER_CLIENT_ID_ISSUED_AT, *val)?;
151 }
152{
153 let val = &self.client_secret_expires_at;
154 ser.write_long(®ISTERCLIENTOUTPUT_MEMBER_CLIENT_SECRET_EXPIRES_AT, *val)?;
155 }
156if let Some(ref val) = self.authorization_endpoint {
157 ser.write_string(®ISTERCLIENTOUTPUT_MEMBER_AUTHORIZATION_ENDPOINT, val)?;
158 }
159if let Some(ref val) = self.token_endpoint {
160 ser.write_string(®ISTERCLIENTOUTPUT_MEMBER_TOKEN_ENDPOINT, val)?;
161 }
162 Ok(())
163 }
164 }
165impl RegisterClientOutput {
166 pub fn deserialize(deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
168 #[allow(unused_variables, unused_mut)]
169 let mut builder = Self::builder();
170 #[allow(unused_variables, unreachable_code, clippy::single_match, clippy::match_single_binding, clippy::diverging_sub_expression)]
171 deserializer.read_struct(®ISTERCLIENTOUTPUT_SCHEMA, &mut |member, deser| {
172 match member.member_index() {
173 Some(0) => {
174 builder.client_id = Some(deser.read_string(member)?);
175 }
176Some(1) => {
177 builder.client_secret = Some(deser.read_string(member)?);
178 }
179Some(2) => { builder.client_id_issued_at = Some(deser.read_long(member)?); }
180Some(3) => { builder.client_secret_expires_at = Some(deser.read_long(member)?); }
181Some(4) => {
182 builder.authorization_endpoint = Some(deser.read_string(member)?);
183 }
184Some(5) => {
185 builder.token_endpoint = Some(deser.read_string(member)?);
186 }
187Some(6) => {
188 builder._request_id = Some(deser.read_string(member)?);
189 }
190 _ => {}
191 }
192 Ok(())
193 })?;
194 Ok(builder.build())
195 }
196 }
197impl RegisterClientOutput {
198 pub fn deserialize_with_response(
202 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
203 headers: &::aws_smithy_runtime_api::http::Headers,
204 _status: u16,
205 _body: &[u8],
206 ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
207 #[allow(unused_variables, unused_mut)]
208 let mut builder = Self::builder();
209if let Some(val) = headers.get("x-amzn-requestid") {
210 builder._request_id = Some(val.to_string());
211 }
212#[allow(unused_variables, unreachable_code, clippy::single_match, clippy::match_single_binding, clippy::diverging_sub_expression)]
213 deserializer.read_struct(®ISTERCLIENTOUTPUT_SCHEMA, &mut |member, deser| {
214 match member.member_index() {
215 Some(0) => { builder.client_id = Some(deser.read_string(member)?); }
216Some(1) => { builder.client_secret = Some(deser.read_string(member)?); }
217Some(2) => { builder.client_id_issued_at = Some(deser.read_long(member)?); }
218Some(3) => { builder.client_secret_expires_at = Some(deser.read_long(member)?); }
219Some(4) => { builder.authorization_endpoint = Some(deser.read_string(member)?); }
220Some(5) => { builder.token_endpoint = Some(deser.read_string(member)?); }
221 _ => {}
222 }
223 Ok(())
224 })?;
225 Ok(builder.build())
226 }
227 }
228impl ::aws_types::request_id::RequestId for RegisterClientOutput {
229 fn request_id(&self) -> Option<&str> {
230 self._request_id.as_deref()
231 }
232 }
233impl RegisterClientOutput {
234 pub fn builder() -> crate::operation::register_client::builders::RegisterClientOutputBuilder {
236 crate::operation::register_client::builders::RegisterClientOutputBuilder::default()
237 }
238}
239
240#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
242#[non_exhaustive]
243pub struct RegisterClientOutputBuilder {
244 pub(crate) client_id: ::std::option::Option<::std::string::String>,
245 pub(crate) client_secret: ::std::option::Option<::std::string::String>,
246 pub(crate) client_id_issued_at: ::std::option::Option<i64>,
247 pub(crate) client_secret_expires_at: ::std::option::Option<i64>,
248 pub(crate) authorization_endpoint: ::std::option::Option<::std::string::String>,
249 pub(crate) token_endpoint: ::std::option::Option<::std::string::String>,
250 _request_id: Option<String>,
251}
252impl RegisterClientOutputBuilder {
253 pub fn client_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
255 self.client_id = ::std::option::Option::Some(input.into());
256 self
257 }
258 pub fn set_client_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
260 self.client_id = input; self
261 }
262 pub fn get_client_id(&self) -> &::std::option::Option<::std::string::String> {
264 &self.client_id
265 }
266 pub fn client_secret(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
268 self.client_secret = ::std::option::Option::Some(input.into());
269 self
270 }
271 pub fn set_client_secret(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
273 self.client_secret = input; self
274 }
275 pub fn get_client_secret(&self) -> &::std::option::Option<::std::string::String> {
277 &self.client_secret
278 }
279 pub fn client_id_issued_at(mut self, input: i64) -> Self {
281 self.client_id_issued_at = ::std::option::Option::Some(input);
282 self
283 }
284 pub fn set_client_id_issued_at(mut self, input: ::std::option::Option<i64>) -> Self {
286 self.client_id_issued_at = input; self
287 }
288 pub fn get_client_id_issued_at(&self) -> &::std::option::Option<i64> {
290 &self.client_id_issued_at
291 }
292 pub fn client_secret_expires_at(mut self, input: i64) -> Self {
294 self.client_secret_expires_at = ::std::option::Option::Some(input);
295 self
296 }
297 pub fn set_client_secret_expires_at(mut self, input: ::std::option::Option<i64>) -> Self {
299 self.client_secret_expires_at = input; self
300 }
301 pub fn get_client_secret_expires_at(&self) -> &::std::option::Option<i64> {
303 &self.client_secret_expires_at
304 }
305 pub fn authorization_endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
307 self.authorization_endpoint = ::std::option::Option::Some(input.into());
308 self
309 }
310 pub fn set_authorization_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
312 self.authorization_endpoint = input; self
313 }
314 pub fn get_authorization_endpoint(&self) -> &::std::option::Option<::std::string::String> {
316 &self.authorization_endpoint
317 }
318 pub fn token_endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
320 self.token_endpoint = ::std::option::Option::Some(input.into());
321 self
322 }
323 pub fn set_token_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
325 self.token_endpoint = input; self
326 }
327 pub fn get_token_endpoint(&self) -> &::std::option::Option<::std::string::String> {
329 &self.token_endpoint
330 }
331 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
332 self._request_id = Some(request_id.into());
333 self
334 }
335
336 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
337 self._request_id = request_id;
338 self
339 }
340 pub fn build(self) -> crate::operation::register_client::RegisterClientOutput {
342 crate::operation::register_client::RegisterClientOutput {
343 client_id: self.client_id
344 ,
345 client_secret: self.client_secret
346 ,
347 client_id_issued_at: self.client_id_issued_at
348 .unwrap_or_default()
349 ,
350 client_secret_expires_at: self.client_secret_expires_at
351 .unwrap_or_default()
352 ,
353 authorization_endpoint: self.authorization_endpoint
354 ,
355 token_endpoint: self.token_endpoint
356 ,
357 _request_id: self._request_id,
358 }
359 }
360}
361impl ::std::fmt::Debug for RegisterClientOutputBuilder {
362 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
363 let mut formatter = f.debug_struct("RegisterClientOutputBuilder");
364 formatter.field("client_id", &self.client_id);
365 formatter.field("client_secret", &"*** Sensitive Data Redacted ***");
366 formatter.field("client_id_issued_at", &self.client_id_issued_at);
367 formatter.field("client_secret_expires_at", &self.client_secret_expires_at);
368 formatter.field("authorization_endpoint", &self.authorization_endpoint);
369 formatter.field("token_endpoint", &self.token_endpoint);
370 formatter.field("_request_id", &self._request_id);
371 formatter.finish()
372 }
373}
374