aws_sdk_sso/operation/list_accounts/
_list_accounts_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 ListAccountsInput {
6    /// <p>(Optional) When requesting subsequent pages, this is the page token from the previous response output.</p>
7    pub next_token: ::std::option::Option<::std::string::String>,
8    /// <p>This is the number of items clients can request per page.</p>
9    pub max_results: ::std::option::Option<i32>,
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 access_token: ::std::option::Option<::std::string::String>,
12}
13impl ListAccountsInput {
14    /// <p>(Optional) When requesting subsequent pages, this is the page token from the previous response output.</p>
15    pub fn next_token(&self) -> ::std::option::Option<&str> {
16        self.next_token.as_deref()
17    }
18    /// <p>This is the number of items clients can request per page.</p>
19    pub fn max_results(&self) -> ::std::option::Option<i32> {
20        self.max_results
21    }
22    /// <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>
23    pub fn access_token(&self) -> ::std::option::Option<&str> {
24        self.access_token.as_deref()
25    }
26}
27impl ::std::fmt::Debug for ListAccountsInput {
28    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29        let mut formatter = f.debug_struct("ListAccountsInput");
30        formatter.field("next_token", &self.next_token);
31        formatter.field("max_results", &self.max_results);
32        formatter.field("access_token", &"*** Sensitive Data Redacted ***");
33        formatter.finish()
34    }
35}
36impl ListAccountsInput {
37    /// Creates a new builder-style object to manufacture [`ListAccountsInput`](crate::operation::list_accounts::ListAccountsInput).
38    pub fn builder() -> crate::operation::list_accounts::builders::ListAccountsInputBuilder {
39        crate::operation::list_accounts::builders::ListAccountsInputBuilder::default()
40    }
41}
42
43/// A builder for [`ListAccountsInput`](crate::operation::list_accounts::ListAccountsInput).
44#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
45#[non_exhaustive]
46pub struct ListAccountsInputBuilder {
47    pub(crate) next_token: ::std::option::Option<::std::string::String>,
48    pub(crate) max_results: ::std::option::Option<i32>,
49    pub(crate) access_token: ::std::option::Option<::std::string::String>,
50}
51impl ListAccountsInputBuilder {
52    /// <p>(Optional) When requesting subsequent pages, this is the page token from the previous response output.</p>
53    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.next_token = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>(Optional) When requesting subsequent pages, this is the page token from the previous response output.</p>
58    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.next_token = input;
60        self
61    }
62    /// <p>(Optional) When requesting subsequent pages, this is the page token from the previous response output.</p>
63    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
64        &self.next_token
65    }
66    /// <p>This is the number of items clients can request per page.</p>
67    pub fn max_results(mut self, input: i32) -> Self {
68        self.max_results = ::std::option::Option::Some(input);
69        self
70    }
71    /// <p>This is the number of items clients can request per page.</p>
72    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
73        self.max_results = input;
74        self
75    }
76    /// <p>This is the number of items clients can request per page.</p>
77    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
78        &self.max_results
79    }
80    /// <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>
81    /// This field is required.
82    pub fn access_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.access_token = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <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>
87    pub fn set_access_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.access_token = input;
89        self
90    }
91    /// <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>
92    pub fn get_access_token(&self) -> &::std::option::Option<::std::string::String> {
93        &self.access_token
94    }
95    /// Consumes the builder and constructs a [`ListAccountsInput`](crate::operation::list_accounts::ListAccountsInput).
96    pub fn build(
97        self,
98    ) -> ::std::result::Result<crate::operation::list_accounts::ListAccountsInput, ::aws_smithy_types::error::operation::BuildError> {
99        ::std::result::Result::Ok(crate::operation::list_accounts::ListAccountsInput {
100            next_token: self.next_token,
101            max_results: self.max_results,
102            access_token: self.access_token,
103        })
104    }
105}
106impl ::std::fmt::Debug for ListAccountsInputBuilder {
107    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
108        let mut formatter = f.debug_struct("ListAccountsInputBuilder");
109        formatter.field("next_token", &self.next_token);
110        formatter.field("max_results", &self.max_results);
111        formatter.field("access_token", &"*** Sensitive Data Redacted ***");
112        formatter.finish()
113    }
114}