aws_sdk_directory/operation/describe_client_authentication_settings/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_client_authentication_settings::_describe_client_authentication_settings_output::DescribeClientAuthenticationSettingsOutputBuilder;
3
4pub use crate::operation::describe_client_authentication_settings::_describe_client_authentication_settings_input::DescribeClientAuthenticationSettingsInputBuilder;
5
6impl crate::operation::describe_client_authentication_settings::builders::DescribeClientAuthenticationSettingsInputBuilder {
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::describe_client_authentication_settings::DescribeClientAuthenticationSettingsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_client_authentication_settings::DescribeClientAuthenticationSettingsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_client_authentication_settings();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeClientAuthenticationSettings`.
24///
25/// <p>Retrieves information about the type of client authentication for the specified directory, if the type is specified. If no type is specified, information about all client authentication types that are supported for the specified directory is retrieved. Currently, only <code>SmartCard</code> is supported.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct DescribeClientAuthenticationSettingsFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::describe_client_authentication_settings::builders::DescribeClientAuthenticationSettingsInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::describe_client_authentication_settings::DescribeClientAuthenticationSettingsOutput,
35        crate::operation::describe_client_authentication_settings::DescribeClientAuthenticationSettingsError,
36    > for DescribeClientAuthenticationSettingsFluentBuilder
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::describe_client_authentication_settings::DescribeClientAuthenticationSettingsOutput,
44            crate::operation::describe_client_authentication_settings::DescribeClientAuthenticationSettingsError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl DescribeClientAuthenticationSettingsFluentBuilder {
51    /// Creates a new `DescribeClientAuthenticationSettingsFluentBuilder`.
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 DescribeClientAuthenticationSettings as a reference.
60    pub fn as_input(&self) -> &crate::operation::describe_client_authentication_settings::builders::DescribeClientAuthenticationSettingsInputBuilder {
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::describe_client_authentication_settings::DescribeClientAuthenticationSettingsOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::describe_client_authentication_settings::DescribeClientAuthenticationSettingsError,
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 =
85            crate::operation::describe_client_authentication_settings::DescribeClientAuthenticationSettings::operation_runtime_plugins(
86                self.handle.runtime_plugins.clone(),
87                &self.handle.conf,
88                self.config_override,
89            );
90        crate::operation::describe_client_authentication_settings::DescribeClientAuthenticationSettings::orchestrate(&runtime_plugins, input).await
91    }
92
93    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94    pub fn customize(
95        self,
96    ) -> crate::client::customize::CustomizableOperation<
97        crate::operation::describe_client_authentication_settings::DescribeClientAuthenticationSettingsOutput,
98        crate::operation::describe_client_authentication_settings::DescribeClientAuthenticationSettingsError,
99        Self,
100    > {
101        crate::client::customize::CustomizableOperation::new(self)
102    }
103    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104        self.set_config_override(::std::option::Option::Some(config_override.into()));
105        self
106    }
107
108    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109        self.config_override = config_override;
110        self
111    }
112    /// Create a paginator for this request
113    ///
114    /// Paginators are used by calling [`send().await`](crate::operation::describe_client_authentication_settings::paginator::DescribeClientAuthenticationSettingsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
115    pub fn into_paginator(
116        self,
117    ) -> crate::operation::describe_client_authentication_settings::paginator::DescribeClientAuthenticationSettingsPaginator {
118        crate::operation::describe_client_authentication_settings::paginator::DescribeClientAuthenticationSettingsPaginator::new(
119            self.handle,
120            self.inner,
121        )
122    }
123    /// <p>The identifier of the directory for which to retrieve information.</p>
124    pub fn directory_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125        self.inner = self.inner.directory_id(input.into());
126        self
127    }
128    /// <p>The identifier of the directory for which to retrieve information.</p>
129    pub fn set_directory_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130        self.inner = self.inner.set_directory_id(input);
131        self
132    }
133    /// <p>The identifier of the directory for which to retrieve information.</p>
134    pub fn get_directory_id(&self) -> &::std::option::Option<::std::string::String> {
135        self.inner.get_directory_id()
136    }
137    /// <p>The type of client authentication for which to retrieve information. If no type is specified, a list of all client authentication types that are supported for the specified directory is retrieved.</p>
138    pub fn r#type(mut self, input: crate::types::ClientAuthenticationType) -> Self {
139        self.inner = self.inner.r#type(input);
140        self
141    }
142    /// <p>The type of client authentication for which to retrieve information. If no type is specified, a list of all client authentication types that are supported for the specified directory is retrieved.</p>
143    pub fn set_type(mut self, input: ::std::option::Option<crate::types::ClientAuthenticationType>) -> Self {
144        self.inner = self.inner.set_type(input);
145        self
146    }
147    /// <p>The type of client authentication for which to retrieve information. If no type is specified, a list of all client authentication types that are supported for the specified directory is retrieved.</p>
148    pub fn get_type(&self) -> &::std::option::Option<crate::types::ClientAuthenticationType> {
149        self.inner.get_type()
150    }
151    /// <p>The <i>DescribeClientAuthenticationSettingsResult.NextToken</i> value from a previous call to <code>DescribeClientAuthenticationSettings</code>. Pass null if this is the first call.</p>
152    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153        self.inner = self.inner.next_token(input.into());
154        self
155    }
156    /// <p>The <i>DescribeClientAuthenticationSettingsResult.NextToken</i> value from a previous call to <code>DescribeClientAuthenticationSettings</code>. Pass null if this is the first call.</p>
157    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158        self.inner = self.inner.set_next_token(input);
159        self
160    }
161    /// <p>The <i>DescribeClientAuthenticationSettingsResult.NextToken</i> value from a previous call to <code>DescribeClientAuthenticationSettings</code>. Pass null if this is the first call.</p>
162    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
163        self.inner.get_next_token()
164    }
165    /// <p>The maximum number of items to return. If this value is zero, the maximum number of items is specified by the limitations of the operation.</p>
166    pub fn limit(mut self, input: i32) -> Self {
167        self.inner = self.inner.limit(input);
168        self
169    }
170    /// <p>The maximum number of items to return. If this value is zero, the maximum number of items is specified by the limitations of the operation.</p>
171    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
172        self.inner = self.inner.set_limit(input);
173        self
174    }
175    /// <p>The maximum number of items to return. If this value is zero, the maximum number of items is specified by the limitations of the operation.</p>
176    pub fn get_limit(&self) -> &::std::option::Option<i32> {
177        self.inner.get_limit()
178    }
179}