aws_sdk_ssooidc/operation/register_client/
_register_client_output.rs

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 RegisterClientOutput  {
6    /// <p>The unique identifier string for each client. This client uses this identifier to get authenticated by the service in subsequent calls.</p>
7    pub client_id: ::std::option::Option<::std::string::String>,
8    /// <p>A secret string generated for the client. The client will use this string to get authenticated by the service in subsequent calls.</p>
9    pub client_secret: ::std::option::Option<::std::string::String>,
10    /// <p>Indicates the time at which the <code>clientId</code> and <code>clientSecret</code> were issued.</p>
11    pub client_id_issued_at: i64,
12    /// <p>Indicates the time at which the <code>clientId</code> and <code>clientSecret</code> will become invalid.</p>
13    pub client_secret_expires_at: i64,
14    /// <p>An endpoint that the client can use to request authorization.</p>
15    pub authorization_endpoint: ::std::option::Option<::std::string::String>,
16    /// <p>An endpoint that the client can use to create tokens.</p>
17    pub token_endpoint: ::std::option::Option<::std::string::String>,
18    _request_id: Option<String>,
19}
20impl  RegisterClientOutput  {
21    /// <p>The unique identifier string for each client. This client uses this identifier to get authenticated by the service in subsequent calls.</p>
22    pub fn client_id(&self) -> ::std::option::Option<&str> {
23        self.client_id.as_deref()
24    }
25    /// <p>A secret string generated for the client. The client will use this string to get authenticated by the service in subsequent calls.</p>
26    pub fn client_secret(&self) -> ::std::option::Option<&str> {
27        self.client_secret.as_deref()
28    }
29    /// <p>Indicates the time at which the <code>clientId</code> and <code>clientSecret</code> were issued.</p>
30    pub fn client_id_issued_at(&self) -> i64 {
31        self.client_id_issued_at
32    }
33    /// <p>Indicates the time at which the <code>clientId</code> and <code>clientSecret</code> will become invalid.</p>
34    pub fn client_secret_expires_at(&self) -> i64 {
35        self.client_secret_expires_at
36    }
37    /// <p>An endpoint that the client can use to request authorization.</p>
38    pub fn authorization_endpoint(&self) -> ::std::option::Option<&str> {
39        self.authorization_endpoint.as_deref()
40    }
41    /// <p>An endpoint that the client can use to create tokens.</p>
42    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}
59impl ::aws_types::request_id::RequestId for RegisterClientOutput {
60                                    fn request_id(&self) -> Option<&str> {
61                                        self._request_id.as_deref()
62                                    }
63                                }
64impl RegisterClientOutput {
65    /// Creates a new builder-style object to manufacture [`RegisterClientOutput`](crate::operation::register_client::RegisterClientOutput).
66    pub fn builder() -> crate::operation::register_client::builders::RegisterClientOutputBuilder {
67        crate::operation::register_client::builders::RegisterClientOutputBuilder::default()
68    }
69}
70
71/// A builder for [`RegisterClientOutput`](crate::operation::register_client::RegisterClientOutput).
72#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
73#[non_exhaustive]
74pub struct RegisterClientOutputBuilder {
75    pub(crate) client_id: ::std::option::Option<::std::string::String>,
76    pub(crate) client_secret: ::std::option::Option<::std::string::String>,
77    pub(crate) client_id_issued_at: ::std::option::Option<i64>,
78    pub(crate) client_secret_expires_at: ::std::option::Option<i64>,
79    pub(crate) authorization_endpoint: ::std::option::Option<::std::string::String>,
80    pub(crate) token_endpoint: ::std::option::Option<::std::string::String>,
81    _request_id: Option<String>,
82}
83impl RegisterClientOutputBuilder {
84    /// <p>The unique identifier string for each client. This client uses this identifier to get authenticated by the service in subsequent calls.</p>
85    pub fn client_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86        self.client_id = ::std::option::Option::Some(input.into());
87        self
88    }
89    /// <p>The unique identifier string for each client. This client uses this identifier to get authenticated by the service in subsequent calls.</p>
90    pub fn set_client_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91        self.client_id = input; self
92    }
93    /// <p>The unique identifier string for each client. This client uses this identifier to get authenticated by the service in subsequent calls.</p>
94    pub fn get_client_id(&self) -> &::std::option::Option<::std::string::String> {
95        &self.client_id
96    }
97    /// <p>A secret string generated for the client. The client will use this string to get authenticated by the service in subsequent calls.</p>
98    pub fn client_secret(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
99        self.client_secret = ::std::option::Option::Some(input.into());
100        self
101    }
102    /// <p>A secret string generated for the client. The client will use this string to get authenticated by the service in subsequent calls.</p>
103    pub fn set_client_secret(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104        self.client_secret = input; self
105    }
106    /// <p>A secret string generated for the client. The client will use this string to get authenticated by the service in subsequent calls.</p>
107    pub fn get_client_secret(&self) -> &::std::option::Option<::std::string::String> {
108        &self.client_secret
109    }
110    /// <p>Indicates the time at which the <code>clientId</code> and <code>clientSecret</code> were issued.</p>
111    pub fn client_id_issued_at(mut self, input: i64) -> Self {
112        self.client_id_issued_at = ::std::option::Option::Some(input);
113        self
114    }
115    /// <p>Indicates the time at which the <code>clientId</code> and <code>clientSecret</code> were issued.</p>
116    pub fn set_client_id_issued_at(mut self, input: ::std::option::Option<i64>) -> Self {
117        self.client_id_issued_at = input; self
118    }
119    /// <p>Indicates the time at which the <code>clientId</code> and <code>clientSecret</code> were issued.</p>
120    pub fn get_client_id_issued_at(&self) -> &::std::option::Option<i64> {
121        &self.client_id_issued_at
122    }
123    /// <p>Indicates the time at which the <code>clientId</code> and <code>clientSecret</code> will become invalid.</p>
124    pub fn client_secret_expires_at(mut self, input: i64) -> Self {
125        self.client_secret_expires_at = ::std::option::Option::Some(input);
126        self
127    }
128    /// <p>Indicates the time at which the <code>clientId</code> and <code>clientSecret</code> will become invalid.</p>
129    pub fn set_client_secret_expires_at(mut self, input: ::std::option::Option<i64>) -> Self {
130        self.client_secret_expires_at = input; self
131    }
132    /// <p>Indicates the time at which the <code>clientId</code> and <code>clientSecret</code> will become invalid.</p>
133    pub fn get_client_secret_expires_at(&self) -> &::std::option::Option<i64> {
134        &self.client_secret_expires_at
135    }
136    /// <p>An endpoint that the client can use to request authorization.</p>
137    pub fn authorization_endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138        self.authorization_endpoint = ::std::option::Option::Some(input.into());
139        self
140    }
141    /// <p>An endpoint that the client can use to request authorization.</p>
142    pub fn set_authorization_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143        self.authorization_endpoint = input; self
144    }
145    /// <p>An endpoint that the client can use to request authorization.</p>
146    pub fn get_authorization_endpoint(&self) -> &::std::option::Option<::std::string::String> {
147        &self.authorization_endpoint
148    }
149    /// <p>An endpoint that the client can use to create tokens.</p>
150    pub fn token_endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151        self.token_endpoint = ::std::option::Option::Some(input.into());
152        self
153    }
154    /// <p>An endpoint that the client can use to create tokens.</p>
155    pub fn set_token_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156        self.token_endpoint = input; self
157    }
158    /// <p>An endpoint that the client can use to create tokens.</p>
159    pub fn get_token_endpoint(&self) -> &::std::option::Option<::std::string::String> {
160        &self.token_endpoint
161    }
162    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
163                                        self._request_id = Some(request_id.into());
164                                        self
165                                    }
166    
167                                    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
168                                        self._request_id = request_id;
169                                        self
170                                    }
171    /// Consumes the builder and constructs a [`RegisterClientOutput`](crate::operation::register_client::RegisterClientOutput).
172    pub fn build(self) -> crate::operation::register_client::RegisterClientOutput {
173        crate::operation::register_client::RegisterClientOutput {
174            client_id: self.client_id
175            ,
176            client_secret: self.client_secret
177            ,
178            client_id_issued_at: self.client_id_issued_at
179                .unwrap_or_default()
180            ,
181            client_secret_expires_at: self.client_secret_expires_at
182                .unwrap_or_default()
183            ,
184            authorization_endpoint: self.authorization_endpoint
185            ,
186            token_endpoint: self.token_endpoint
187            ,
188            _request_id: self._request_id,
189        }
190    }
191}
192impl ::std::fmt::Debug for RegisterClientOutputBuilder {
193    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
194        let mut formatter = f.debug_struct("RegisterClientOutputBuilder");
195        formatter.field("client_id", &self.client_id);
196        formatter.field("client_secret", &"*** Sensitive Data Redacted ***");
197        formatter.field("client_id_issued_at", &self.client_id_issued_at);
198        formatter.field("client_secret_expires_at", &self.client_secret_expires_at);
199        formatter.field("authorization_endpoint", &self.authorization_endpoint);
200        formatter.field("token_endpoint", &self.token_endpoint);
201        formatter.field("_request_id", &self._request_id);
202        formatter.finish()
203    }
204}
205