aws_sdk_connect/operation/update_participant_authentication/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_participant_authentication::_update_participant_authentication_output::UpdateParticipantAuthenticationOutputBuilder;
3
4pub use crate::operation::update_participant_authentication::_update_participant_authentication_input::UpdateParticipantAuthenticationInputBuilder;
5
6impl crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationInputBuilder {
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::update_participant_authentication::UpdateParticipantAuthenticationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_participant_authentication();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateParticipantAuthentication`.
24///
25/// <p>Instructs Amazon Connect to resume the authentication process. The subsequent actions depend on the request body contents:</p>
26/// <ul>
27/// <li>
28/// <p><b>If a code is provided</b>: Connect retrieves the identity information from Amazon Cognito and imports it into Connect Customer Profiles.</p></li>
29/// <li>
30/// <p><b>If an error is provided</b>: The error branch of the Authenticate Customer block is executed.</p></li>
31/// </ul><note>
32/// <p>The API returns a success response to acknowledge the request. However, the interaction and exchange of identity information occur asynchronously after the response is returned.</p>
33/// </note>
34#[derive(::std::clone::Clone, ::std::fmt::Debug)]
35pub struct UpdateParticipantAuthenticationFluentBuilder {
36    handle: ::std::sync::Arc<crate::client::Handle>,
37    inner: crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationInputBuilder,
38    config_override: ::std::option::Option<crate::config::Builder>,
39}
40impl
41    crate::client::customize::internal::CustomizableSend<
42        crate::operation::update_participant_authentication::UpdateParticipantAuthenticationOutput,
43        crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError,
44    > for UpdateParticipantAuthenticationFluentBuilder
45{
46    fn send(
47        self,
48        config_override: crate::config::Builder,
49    ) -> crate::client::customize::internal::BoxFuture<
50        crate::client::customize::internal::SendResult<
51            crate::operation::update_participant_authentication::UpdateParticipantAuthenticationOutput,
52            crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError,
53        >,
54    > {
55        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
56    }
57}
58impl UpdateParticipantAuthenticationFluentBuilder {
59    /// Creates a new `UpdateParticipantAuthenticationFluentBuilder`.
60    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
61        Self {
62            handle,
63            inner: ::std::default::Default::default(),
64            config_override: ::std::option::Option::None,
65        }
66    }
67    /// Access the UpdateParticipantAuthentication as a reference.
68    pub fn as_input(&self) -> &crate::operation::update_participant_authentication::builders::UpdateParticipantAuthenticationInputBuilder {
69        &self.inner
70    }
71    /// Sends the request and returns the response.
72    ///
73    /// If an error occurs, an `SdkError` will be returned with additional details that
74    /// can be matched against.
75    ///
76    /// By default, any retryable failures will be retried twice. Retry behavior
77    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
78    /// set when configuring the client.
79    pub async fn send(
80        self,
81    ) -> ::std::result::Result<
82        crate::operation::update_participant_authentication::UpdateParticipantAuthenticationOutput,
83        ::aws_smithy_runtime_api::client::result::SdkError<
84            crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError,
85            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
86        >,
87    > {
88        let input = self
89            .inner
90            .build()
91            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
92        let runtime_plugins = crate::operation::update_participant_authentication::UpdateParticipantAuthentication::operation_runtime_plugins(
93            self.handle.runtime_plugins.clone(),
94            &self.handle.conf,
95            self.config_override,
96        );
97        crate::operation::update_participant_authentication::UpdateParticipantAuthentication::orchestrate(&runtime_plugins, input).await
98    }
99
100    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
101    pub fn customize(
102        self,
103    ) -> crate::client::customize::CustomizableOperation<
104        crate::operation::update_participant_authentication::UpdateParticipantAuthenticationOutput,
105        crate::operation::update_participant_authentication::UpdateParticipantAuthenticationError,
106        Self,
107    > {
108        crate::client::customize::CustomizableOperation::new(self)
109    }
110    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
111        self.set_config_override(::std::option::Option::Some(config_override.into()));
112        self
113    }
114
115    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
116        self.config_override = config_override;
117        self
118    }
119    /// <p>The <code>state</code> query parameter that was provided by Cognito in the <code>redirectUri</code>. This will also match the <code>state</code> parameter provided in the <code>AuthenticationUrl</code> from the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_GetAuthenticationUrl.html">GetAuthenticationUrl</a> response.</p>
120    pub fn state(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121        self.inner = self.inner.state(input.into());
122        self
123    }
124    /// <p>The <code>state</code> query parameter that was provided by Cognito in the <code>redirectUri</code>. This will also match the <code>state</code> parameter provided in the <code>AuthenticationUrl</code> from the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_GetAuthenticationUrl.html">GetAuthenticationUrl</a> response.</p>
125    pub fn set_state(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126        self.inner = self.inner.set_state(input);
127        self
128    }
129    /// <p>The <code>state</code> query parameter that was provided by Cognito in the <code>redirectUri</code>. This will also match the <code>state</code> parameter provided in the <code>AuthenticationUrl</code> from the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_GetAuthenticationUrl.html">GetAuthenticationUrl</a> response.</p>
130    pub fn get_state(&self) -> &::std::option::Option<::std::string::String> {
131        self.inner.get_state()
132    }
133    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
134    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135        self.inner = self.inner.instance_id(input.into());
136        self
137    }
138    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
139    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140        self.inner = self.inner.set_instance_id(input);
141        self
142    }
143    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
144    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
145        self.inner.get_instance_id()
146    }
147    /// <p>The <code>code</code> query parameter provided by Cognito in the <code>redirectUri</code>.</p>
148    pub fn code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
149        self.inner = self.inner.code(input.into());
150        self
151    }
152    /// <p>The <code>code</code> query parameter provided by Cognito in the <code>redirectUri</code>.</p>
153    pub fn set_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
154        self.inner = self.inner.set_code(input);
155        self
156    }
157    /// <p>The <code>code</code> query parameter provided by Cognito in the <code>redirectUri</code>.</p>
158    pub fn get_code(&self) -> &::std::option::Option<::std::string::String> {
159        self.inner.get_code()
160    }
161    /// <p>The <code>error</code> query parameter provided by Cognito in the <code>redirectUri</code>.</p>
162    pub fn error(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
163        self.inner = self.inner.error(input.into());
164        self
165    }
166    /// <p>The <code>error</code> query parameter provided by Cognito in the <code>redirectUri</code>.</p>
167    pub fn set_error(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
168        self.inner = self.inner.set_error(input);
169        self
170    }
171    /// <p>The <code>error</code> query parameter provided by Cognito in the <code>redirectUri</code>.</p>
172    pub fn get_error(&self) -> &::std::option::Option<::std::string::String> {
173        self.inner.get_error()
174    }
175    /// <p>The <code>error_description</code> parameter provided by Cognito in the <code>redirectUri</code>.</p>
176    pub fn error_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
177        self.inner = self.inner.error_description(input.into());
178        self
179    }
180    /// <p>The <code>error_description</code> parameter provided by Cognito in the <code>redirectUri</code>.</p>
181    pub fn set_error_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
182        self.inner = self.inner.set_error_description(input);
183        self
184    }
185    /// <p>The <code>error_description</code> parameter provided by Cognito in the <code>redirectUri</code>.</p>
186    pub fn get_error_description(&self) -> &::std::option::Option<::std::string::String> {
187        self.inner.get_error_description()
188    }
189}