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;
45        self
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>
48    pub 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).
52    pub 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 {
59    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
60        let mut formatter = f.debug_struct("LogoutInputBuilder");
61        formatter.field("access_token", &"*** Sensitive Data Redacted ***");
62        formatter.finish()
63    }
64}