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;
92        self
93    }
94    /// <p>The unique identifier string for each client. This client uses this identifier to get authenticated by the service in subsequent calls.</p>
95    pub fn get_client_id(&self) -> &::std::option::Option<::std::string::String> {
96        &self.client_id
97    }
98    /// <p>A secret string generated for the client. The client will use this string to get authenticated by the service in subsequent calls.</p>
99    pub fn client_secret(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100        self.client_secret = ::std::option::Option::Some(input.into());
101        self
102    }
103    /// <p>A secret string generated for the client. The client will use this string to get authenticated by the service in subsequent calls.</p>
104    pub fn set_client_secret(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105        self.client_secret = input;
106        self
107    }
108    /// <p>A secret string generated for the client. The client will use this string to get authenticated by the service in subsequent calls.</p>
109    pub fn get_client_secret(&self) -> &::std::option::Option<::std::string::String> {
110        &self.client_secret
111    }
112    /// <p>Indicates the time at which the <code>clientId</code> and <code>clientSecret</code> were issued.</p>
113    pub fn client_id_issued_at(mut self, input: i64) -> Self {
114        self.client_id_issued_at = ::std::option::Option::Some(input);
115        self
116    }
117    /// <p>Indicates the time at which the <code>clientId</code> and <code>clientSecret</code> were issued.</p>
118    pub fn set_client_id_issued_at(mut self, input: ::std::option::Option<i64>) -> Self {
119        self.client_id_issued_at = input;
120        self
121    }
122    /// <p>Indicates the time at which the <code>clientId</code> and <code>clientSecret</code> were issued.</p>
123    pub fn get_client_id_issued_at(&self) -> &::std::option::Option<i64> {
124        &self.client_id_issued_at
125    }
126    /// <p>Indicates the time at which the <code>clientId</code> and <code>clientSecret</code> will become invalid.</p>
127    pub fn client_secret_expires_at(mut self, input: i64) -> Self {
128        self.client_secret_expires_at = ::std::option::Option::Some(input);
129        self
130    }
131    /// <p>Indicates the time at which the <code>clientId</code> and <code>clientSecret</code> will become invalid.</p>
132    pub fn set_client_secret_expires_at(mut self, input: ::std::option::Option<i64>) -> Self {
133        self.client_secret_expires_at = input;
134        self
135    }
136    /// <p>Indicates the time at which the <code>clientId</code> and <code>clientSecret</code> will become invalid.</p>
137    pub fn get_client_secret_expires_at(&self) -> &::std::option::Option<i64> {
138        &self.client_secret_expires_at
139    }
140    /// <p>An endpoint that the client can use to request authorization.</p>
141    pub fn authorization_endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142        self.authorization_endpoint = ::std::option::Option::Some(input.into());
143        self
144    }
145    /// <p>An endpoint that the client can use to request authorization.</p>
146    pub fn set_authorization_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147        self.authorization_endpoint = input;
148        self
149    }
150    /// <p>An endpoint that the client can use to request authorization.</p>
151    pub fn get_authorization_endpoint(&self) -> &::std::option::Option<::std::string::String> {
152        &self.authorization_endpoint
153    }
154    /// <p>An endpoint that the client can use to create tokens.</p>
155    pub fn token_endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156        self.token_endpoint = ::std::option::Option::Some(input.into());
157        self
158    }
159    /// <p>An endpoint that the client can use to create tokens.</p>
160    pub fn set_token_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
161        self.token_endpoint = input;
162        self
163    }
164    /// <p>An endpoint that the client can use to create tokens.</p>
165    pub fn get_token_endpoint(&self) -> &::std::option::Option<::std::string::String> {
166        &self.token_endpoint
167    }
168    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
169        self._request_id = Some(request_id.into());
170        self
171    }
172
173    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
174        self._request_id = request_id;
175        self
176    }
177    /// Consumes the builder and constructs a [`RegisterClientOutput`](crate::operation::register_client::RegisterClientOutput).
178    pub fn build(self) -> crate::operation::register_client::RegisterClientOutput {
179        crate::operation::register_client::RegisterClientOutput {
180            client_id: self.client_id,
181            client_secret: self.client_secret,
182            client_id_issued_at: self.client_id_issued_at.unwrap_or_default(),
183            client_secret_expires_at: self.client_secret_expires_at.unwrap_or_default(),
184            authorization_endpoint: self.authorization_endpoint,
185            token_endpoint: self.token_endpoint,
186            _request_id: self._request_id,
187        }
188    }
189}
190impl ::std::fmt::Debug for RegisterClientOutputBuilder {
191    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
192        let mut formatter = f.debug_struct("RegisterClientOutputBuilder");
193        formatter.field("client_id", &self.client_id);
194        formatter.field("client_secret", &"*** Sensitive Data Redacted ***");
195        formatter.field("client_id_issued_at", &self.client_id_issued_at);
196        formatter.field("client_secret_expires_at", &self.client_secret_expires_at);
197        formatter.field("authorization_endpoint", &self.authorization_endpoint);
198        formatter.field("token_endpoint", &self.token_endpoint);
199        formatter.field("_request_id", &self._request_id);
200        formatter.finish()
201    }
202}