aws_sdk_connect/operation/search_evaluation_forms/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::search_evaluation_forms::_search_evaluation_forms_output::SearchEvaluationFormsOutputBuilder;
3
4pub use crate::operation::search_evaluation_forms::_search_evaluation_forms_input::SearchEvaluationFormsInputBuilder;
5
6impl crate::operation::search_evaluation_forms::builders::SearchEvaluationFormsInputBuilder {
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::search_evaluation_forms::SearchEvaluationFormsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::search_evaluation_forms::SearchEvaluationFormsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.search_evaluation_forms();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `SearchEvaluationForms`.
24///
25/// <p>Searches evaluation forms in an Amazon Connect instance, with optional filtering.</p>
26/// <p><b>Use cases</b></p>
27/// <p>Following are common uses cases for this API:</p>
28/// <ul>
29/// <li>
30/// <p>List all evaluation forms in an instance.</p></li>
31/// <li>
32/// <p>Find all evaluation forms that meet specific criteria, such as Title, Description, Status, and more.</p></li>
33/// <li>
34/// <p>Find all evaluation forms that are tagged with a specific set of tags.</p></li>
35/// </ul>
36/// <p><b>Important things to know</b></p>
37/// <ul>
38/// <li>
39/// <p>A Search operation, unlike a List operation, takes time to index changes to resource (create, update or delete). If you don't see updated information for recently changed contact evaluations, try calling the API again in a few seconds.</p></li>
40/// </ul>
41/// <p><b>Endpoints</b>: See <a href="https://docs.aws.amazon.com/general/latest/gr/connect_region.html">Amazon Connect endpoints and quotas</a>.</p>
42#[derive(::std::clone::Clone, ::std::fmt::Debug)]
43pub struct SearchEvaluationFormsFluentBuilder {
44    handle: ::std::sync::Arc<crate::client::Handle>,
45    inner: crate::operation::search_evaluation_forms::builders::SearchEvaluationFormsInputBuilder,
46    config_override: ::std::option::Option<crate::config::Builder>,
47}
48impl
49    crate::client::customize::internal::CustomizableSend<
50        crate::operation::search_evaluation_forms::SearchEvaluationFormsOutput,
51        crate::operation::search_evaluation_forms::SearchEvaluationFormsError,
52    > for SearchEvaluationFormsFluentBuilder
53{
54    fn send(
55        self,
56        config_override: crate::config::Builder,
57    ) -> crate::client::customize::internal::BoxFuture<
58        crate::client::customize::internal::SendResult<
59            crate::operation::search_evaluation_forms::SearchEvaluationFormsOutput,
60            crate::operation::search_evaluation_forms::SearchEvaluationFormsError,
61        >,
62    > {
63        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
64    }
65}
66impl SearchEvaluationFormsFluentBuilder {
67    /// Creates a new `SearchEvaluationFormsFluentBuilder`.
68    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
69        Self {
70            handle,
71            inner: ::std::default::Default::default(),
72            config_override: ::std::option::Option::None,
73        }
74    }
75    /// Access the SearchEvaluationForms as a reference.
76    pub fn as_input(&self) -> &crate::operation::search_evaluation_forms::builders::SearchEvaluationFormsInputBuilder {
77        &self.inner
78    }
79    /// Sends the request and returns the response.
80    ///
81    /// If an error occurs, an `SdkError` will be returned with additional details that
82    /// can be matched against.
83    ///
84    /// By default, any retryable failures will be retried twice. Retry behavior
85    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
86    /// set when configuring the client.
87    pub async fn send(
88        self,
89    ) -> ::std::result::Result<
90        crate::operation::search_evaluation_forms::SearchEvaluationFormsOutput,
91        ::aws_smithy_runtime_api::client::result::SdkError<
92            crate::operation::search_evaluation_forms::SearchEvaluationFormsError,
93            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
94        >,
95    > {
96        let input = self
97            .inner
98            .build()
99            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
100        let runtime_plugins = crate::operation::search_evaluation_forms::SearchEvaluationForms::operation_runtime_plugins(
101            self.handle.runtime_plugins.clone(),
102            &self.handle.conf,
103            self.config_override,
104        );
105        crate::operation::search_evaluation_forms::SearchEvaluationForms::orchestrate(&runtime_plugins, input).await
106    }
107
108    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
109    pub fn customize(
110        self,
111    ) -> crate::client::customize::CustomizableOperation<
112        crate::operation::search_evaluation_forms::SearchEvaluationFormsOutput,
113        crate::operation::search_evaluation_forms::SearchEvaluationFormsError,
114        Self,
115    > {
116        crate::client::customize::CustomizableOperation::new(self)
117    }
118    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
119        self.set_config_override(::std::option::Option::Some(config_override.into()));
120        self
121    }
122
123    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
124        self.config_override = config_override;
125        self
126    }
127    /// <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>
128    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.inner = self.inner.instance_id(input.into());
130        self
131    }
132    /// <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>
133    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.inner = self.inner.set_instance_id(input);
135        self
136    }
137    /// <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>
138    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
139        self.inner.get_instance_id()
140    }
141    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
142    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.inner = self.inner.next_token(input.into());
144        self
145    }
146    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
147    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.inner = self.inner.set_next_token(input);
149        self
150    }
151    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
152    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
153        self.inner.get_next_token()
154    }
155    /// <p>The maximum number of results to return per page.</p>
156    pub fn max_results(mut self, input: i32) -> Self {
157        self.inner = self.inner.max_results(input);
158        self
159    }
160    /// <p>The maximum number of results to return per page.</p>
161    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
162        self.inner = self.inner.set_max_results(input);
163        self
164    }
165    /// <p>The maximum number of results to return per page.</p>
166    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
167        self.inner.get_max_results()
168    }
169    /// <p>The search criteria to be used to return evaluation forms.</p>
170    pub fn search_criteria(mut self, input: crate::types::EvaluationFormSearchCriteria) -> Self {
171        self.inner = self.inner.search_criteria(input);
172        self
173    }
174    /// <p>The search criteria to be used to return evaluation forms.</p>
175    pub fn set_search_criteria(mut self, input: ::std::option::Option<crate::types::EvaluationFormSearchCriteria>) -> Self {
176        self.inner = self.inner.set_search_criteria(input);
177        self
178    }
179    /// <p>The search criteria to be used to return evaluation forms.</p>
180    pub fn get_search_criteria(&self) -> &::std::option::Option<crate::types::EvaluationFormSearchCriteria> {
181        self.inner.get_search_criteria()
182    }
183    /// <p>Filters to be applied to search results.</p>
184    pub fn search_filter(mut self, input: crate::types::EvaluationFormSearchFilter) -> Self {
185        self.inner = self.inner.search_filter(input);
186        self
187    }
188    /// <p>Filters to be applied to search results.</p>
189    pub fn set_search_filter(mut self, input: ::std::option::Option<crate::types::EvaluationFormSearchFilter>) -> Self {
190        self.inner = self.inner.set_search_filter(input);
191        self
192    }
193    /// <p>Filters to be applied to search results.</p>
194    pub fn get_search_filter(&self) -> &::std::option::Option<crate::types::EvaluationFormSearchFilter> {
195        self.inner.get_search_filter()
196    }
197}