aws_sdk_ecs/operation/list_account_settings/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_account_settings::_list_account_settings_output::ListAccountSettingsOutputBuilder;
3
4pub use crate::operation::list_account_settings::_list_account_settings_input::ListAccountSettingsInputBuilder;
5
6impl crate::operation::list_account_settings::builders::ListAccountSettingsInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::list_account_settings::ListAccountSettingsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::list_account_settings::ListAccountSettingsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.list_account_settings();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ListAccountSettings`.
24///
25/// <p>Lists the account settings for a specified principal.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct ListAccountSettingsFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::list_account_settings::builders::ListAccountSettingsInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::list_account_settings::ListAccountSettingsOutput,
35        crate::operation::list_account_settings::ListAccountSettingsError,
36    > for ListAccountSettingsFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::list_account_settings::ListAccountSettingsOutput,
44            crate::operation::list_account_settings::ListAccountSettingsError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl ListAccountSettingsFluentBuilder {
51    /// Creates a new `ListAccountSettingsFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the ListAccountSettings as a reference.
60    pub fn as_input(&self) -> &crate::operation::list_account_settings::builders::ListAccountSettingsInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::list_account_settings::ListAccountSettingsOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::list_account_settings::ListAccountSettingsError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::list_account_settings::ListAccountSettings::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::list_account_settings::ListAccountSettings::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::list_account_settings::ListAccountSettingsOutput,
97        crate::operation::list_account_settings::ListAccountSettingsError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// Create a paginator for this request
112    ///
113    /// Paginators are used by calling [`send().await`](crate::operation::list_account_settings::paginator::ListAccountSettingsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
114    pub fn into_paginator(self) -> crate::operation::list_account_settings::paginator::ListAccountSettingsPaginator {
115        crate::operation::list_account_settings::paginator::ListAccountSettingsPaginator::new(self.handle, self.inner)
116    }
117    /// <p>The name of the account setting you want to list the settings for.</p>
118    pub fn name(mut self, input: crate::types::SettingName) -> Self {
119        self.inner = self.inner.name(input);
120        self
121    }
122    /// <p>The name of the account setting you want to list the settings for.</p>
123    pub fn set_name(mut self, input: ::std::option::Option<crate::types::SettingName>) -> Self {
124        self.inner = self.inner.set_name(input);
125        self
126    }
127    /// <p>The name of the account setting you want to list the settings for.</p>
128    pub fn get_name(&self) -> &::std::option::Option<crate::types::SettingName> {
129        self.inner.get_name()
130    }
131    /// <p>The value of the account settings to filter results with. You must also specify an account setting name to use this parameter.</p>
132    pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133        self.inner = self.inner.value(input.into());
134        self
135    }
136    /// <p>The value of the account settings to filter results with. You must also specify an account setting name to use this parameter.</p>
137    pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138        self.inner = self.inner.set_value(input);
139        self
140    }
141    /// <p>The value of the account settings to filter results with. You must also specify an account setting name to use this parameter.</p>
142    pub fn get_value(&self) -> &::std::option::Option<::std::string::String> {
143        self.inner.get_value()
144    }
145    /// <p>The ARN of the principal, which can be a user, role, or the root user. If this field is omitted, the account settings are listed only for the authenticated user.</p>
146    /// <p>In order to use this parameter, you must be the root user, or the principal.</p><note>
147    /// <p>Federated users assume the account setting of the root user and can't have explicit account settings set for them.</p>
148    /// </note>
149    pub fn principal_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150        self.inner = self.inner.principal_arn(input.into());
151        self
152    }
153    /// <p>The ARN of the principal, which can be a user, role, or the root user. If this field is omitted, the account settings are listed only for the authenticated user.</p>
154    /// <p>In order to use this parameter, you must be the root user, or the principal.</p><note>
155    /// <p>Federated users assume the account setting of the root user and can't have explicit account settings set for them.</p>
156    /// </note>
157    pub fn set_principal_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158        self.inner = self.inner.set_principal_arn(input);
159        self
160    }
161    /// <p>The ARN of the principal, which can be a user, role, or the root user. If this field is omitted, the account settings are listed only for the authenticated user.</p>
162    /// <p>In order to use this parameter, you must be the root user, or the principal.</p><note>
163    /// <p>Federated users assume the account setting of the root user and can't have explicit account settings set for them.</p>
164    /// </note>
165    pub fn get_principal_arn(&self) -> &::std::option::Option<::std::string::String> {
166        self.inner.get_principal_arn()
167    }
168    /// <p>Determines whether to return the effective settings. If <code>true</code>, the account settings for the root user or the default setting for the <code>principalArn</code> are returned. If <code>false</code>, the account settings for the <code>principalArn</code> are returned if they're set. Otherwise, no account settings are returned.</p>
169    pub fn effective_settings(mut self, input: bool) -> Self {
170        self.inner = self.inner.effective_settings(input);
171        self
172    }
173    /// <p>Determines whether to return the effective settings. If <code>true</code>, the account settings for the root user or the default setting for the <code>principalArn</code> are returned. If <code>false</code>, the account settings for the <code>principalArn</code> are returned if they're set. Otherwise, no account settings are returned.</p>
174    pub fn set_effective_settings(mut self, input: ::std::option::Option<bool>) -> Self {
175        self.inner = self.inner.set_effective_settings(input);
176        self
177    }
178    /// <p>Determines whether to return the effective settings. If <code>true</code>, the account settings for the root user or the default setting for the <code>principalArn</code> are returned. If <code>false</code>, the account settings for the <code>principalArn</code> are returned if they're set. Otherwise, no account settings are returned.</p>
179    pub fn get_effective_settings(&self) -> &::std::option::Option<bool> {
180        self.inner.get_effective_settings()
181    }
182    /// <p>The <code>nextToken</code> value returned from a <code>ListAccountSettings</code> request indicating that more results are available to fulfill the request and further calls will be needed. If <code>maxResults</code> was provided, it's possible the number of results to be fewer than <code>maxResults</code>.</p><note>
183    /// <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p>
184    /// </note>
185    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
186        self.inner = self.inner.next_token(input.into());
187        self
188    }
189    /// <p>The <code>nextToken</code> value returned from a <code>ListAccountSettings</code> request indicating that more results are available to fulfill the request and further calls will be needed. If <code>maxResults</code> was provided, it's possible the number of results to be fewer than <code>maxResults</code>.</p><note>
190    /// <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p>
191    /// </note>
192    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193        self.inner = self.inner.set_next_token(input);
194        self
195    }
196    /// <p>The <code>nextToken</code> value returned from a <code>ListAccountSettings</code> request indicating that more results are available to fulfill the request and further calls will be needed. If <code>maxResults</code> was provided, it's possible the number of results to be fewer than <code>maxResults</code>.</p><note>
197    /// <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p>
198    /// </note>
199    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
200        self.inner.get_next_token()
201    }
202    /// <p>The maximum number of account setting results returned by <code>ListAccountSettings</code> in paginated output. When this parameter is used, <code>ListAccountSettings</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListAccountSettings</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 10. If this parameter isn't used, then <code>ListAccountSettings</code> returns up to 10 results and a <code>nextToken</code> value if applicable.</p>
203    pub fn max_results(mut self, input: i32) -> Self {
204        self.inner = self.inner.max_results(input);
205        self
206    }
207    /// <p>The maximum number of account setting results returned by <code>ListAccountSettings</code> in paginated output. When this parameter is used, <code>ListAccountSettings</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListAccountSettings</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 10. If this parameter isn't used, then <code>ListAccountSettings</code> returns up to 10 results and a <code>nextToken</code> value if applicable.</p>
208    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
209        self.inner = self.inner.set_max_results(input);
210        self
211    }
212    /// <p>The maximum number of account setting results returned by <code>ListAccountSettings</code> in paginated output. When this parameter is used, <code>ListAccountSettings</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListAccountSettings</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 10. If this parameter isn't used, then <code>ListAccountSettings</code> returns up to 10 results and a <code>nextToken</code> value if applicable.</p>
213    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
214        self.inner.get_max_results()
215    }
216}