aws_sdk_sso/operation/logout/
_logout_input.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 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>
7    pub 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>
11    pub fn access_token(&self) -> ::std::option::Option<&str> {
12        self.access_token.as_deref()
13    }
14}
15impl  ::std::fmt::Debug for LogoutInput  {
16    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17        let 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).
24    pub fn builder() -> crate::operation::logout::builders::LogoutInputBuilder {
25        crate::operation::logout::builders::LogoutInputBuilder::default()
26    }
27}
28
29/// 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 {
33    pub(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.
38    pub fn access_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.access_token = ::std::option::Option::Some(input.into());
40        self
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>
43    pub fn set_access_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.access_token = input; self
45    }
46    /// <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>
47    pub fn get_access_token(&self) -> &::std::option::Option<::std::string::String> {
48        &self.access_token
49    }
50    /// Consumes the builder and constructs a [`LogoutInput`](crate::operation::logout::LogoutInput).
51    pub fn build(self) -> ::std::result::Result<crate::operation::logout::LogoutInput, ::aws_smithy_types::error::operation::BuildError> {
52        ::std::result::Result::Ok(
53            crate::operation::logout::LogoutInput {
54                access_token: self.access_token
55                ,
56            }
57        )
58    }
59}
60impl ::std::fmt::Debug for LogoutInputBuilder {
61    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
62        let mut formatter = f.debug_struct("LogoutInputBuilder");
63        formatter.field("access_token", &"*** Sensitive Data Redacted ***");
64        formatter.finish()
65    }
66}
67