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 LogoutInput {
6/// <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>
7pub access_token: ::std::option::Option<::std::string::String>,
8}
9impl LogoutInput {
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 fn access_token(&self) -> ::std::option::Option<&str> {
12self.access_token.as_deref()
13 }
14}
15impl ::std::fmt::Debug for LogoutInput {
16fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17let mut formatter = f.debug_struct("LogoutInput");
18 formatter.field("access_token", &"*** Sensitive Data Redacted ***");
19 formatter.finish()
20 }
21}
22impl LogoutInput {
23/// Creates a new builder-style object to manufacture [`LogoutInput`](crate::operation::logout::LogoutInput).
24pub fn builder() -> crate::operation::logout::builders::LogoutInputBuilder {
25crate::operation::logout::builders::LogoutInputBuilder::default()
26 }
27}
2829/// A builder for [`LogoutInput`](crate::operation::logout::LogoutInput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
31#[non_exhaustive]
32pub struct LogoutInputBuilder {
33pub(crate) access_token: ::std::option::Option<::std::string::String>,
34}
35impl LogoutInputBuilder {
36/// <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>
37 /// This field is required.
38pub fn access_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39self.access_token = ::std::option::Option::Some(input.into());
40self
41}
42/// <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>
43pub fn set_access_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44self.access_token = input;
45self
46}
47/// <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>
48pub fn get_access_token(&self) -> &::std::option::Option<::std::string::String> {
49&self.access_token
50 }
51/// Consumes the builder and constructs a [`LogoutInput`](crate::operation::logout::LogoutInput).
52pub fn build(self) -> ::std::result::Result<crate::operation::logout::LogoutInput, ::aws_smithy_types::error::operation::BuildError> {
53 ::std::result::Result::Ok(crate::operation::logout::LogoutInput {
54 access_token: self.access_token,
55 })
56 }
57}
58impl ::std::fmt::Debug for LogoutInputBuilder {
59fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
60let mut formatter = f.debug_struct("LogoutInputBuilder");
61 formatter.field("access_token", &"*** Sensitive Data Redacted ***");
62 formatter.finish()
63 }
64}