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>
7pub next_token: ::std::option::Option<::std::string::String>,
8/// <p>This is the number of items clients can request per page.</p>
9pub 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>
11pub 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>
15pub fn next_token(&self) -> ::std::option::Option<&str> {
16self.next_token.as_deref()
17 }
18/// <p>This is the number of items clients can request per page.</p>
19pub fn max_results(&self) -> ::std::option::Option<i32> {
20self.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>
23pub fn access_token(&self) -> ::std::option::Option<&str> {
24self.access_token.as_deref()
25 }
26}
27impl ::std::fmt::Debug for ListAccountsInput {
28fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29let 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).
38pub fn builder() -> crate::operation::list_accounts::builders::ListAccountsInputBuilder {
39crate::operation::list_accounts::builders::ListAccountsInputBuilder::default()
40 }
41}
4243/// 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 {
47pub(crate) next_token: ::std::option::Option<::std::string::String>,
48pub(crate) max_results: ::std::option::Option<i32>,
49pub(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>
53pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54self.next_token = ::std::option::Option::Some(input.into());
55self
56}
57/// <p>(Optional) When requesting subsequent pages, this is the page token from the previous response output.</p>
58pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59self.next_token = input;
60self
61}
62/// <p>(Optional) When requesting subsequent pages, this is the page token from the previous response output.</p>
63pub 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>
67pub fn max_results(mut self, input: i32) -> Self {
68self.max_results = ::std::option::Option::Some(input);
69self
70}
71/// <p>This is the number of items clients can request per page.</p>
72pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
73self.max_results = input;
74self
75}
76/// <p>This is the number of items clients can request per page.</p>
77pub 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.
82pub fn access_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83self.access_token = ::std::option::Option::Some(input.into());
84self
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>
87pub fn set_access_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88self.access_token = input;
89self
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>
92pub 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).
96pub fn build(
97self,
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 {
107fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
108let 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}