aws_sdk_connect/operation/search_contact_evaluations/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::search_contact_evaluations::_search_contact_evaluations_output::SearchContactEvaluationsOutputBuilder;
3
4pub use crate::operation::search_contact_evaluations::_search_contact_evaluations_input::SearchContactEvaluationsInputBuilder;
5
6impl crate::operation::search_contact_evaluations::builders::SearchContactEvaluationsInputBuilder {
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_contact_evaluations::SearchContactEvaluationsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::search_contact_evaluations::SearchContactEvaluationsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.search_contact_evaluations();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `SearchContactEvaluations`.
24///
25/// <p>Searches contact evaluations 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>Find contact evaluations by using specific search criteria.</p></li>
31/// <li>
32/// <p>Find contact evaluations that are tagged with a specific set of tags.</p></li>
33/// </ul>
34/// <p><b>Important things to know</b></p>
35/// <ul>
36/// <li>
37/// <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. Contact Evaluations may not be fully backfilled with historical data in all regions yet, however all recently created Contact Evaluations should be available for search.</p></li>
38/// </ul>
39/// <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>
40#[derive(::std::clone::Clone, ::std::fmt::Debug)]
41pub struct SearchContactEvaluationsFluentBuilder {
42    handle: ::std::sync::Arc<crate::client::Handle>,
43    inner: crate::operation::search_contact_evaluations::builders::SearchContactEvaluationsInputBuilder,
44    config_override: ::std::option::Option<crate::config::Builder>,
45}
46impl
47    crate::client::customize::internal::CustomizableSend<
48        crate::operation::search_contact_evaluations::SearchContactEvaluationsOutput,
49        crate::operation::search_contact_evaluations::SearchContactEvaluationsError,
50    > for SearchContactEvaluationsFluentBuilder
51{
52    fn send(
53        self,
54        config_override: crate::config::Builder,
55    ) -> crate::client::customize::internal::BoxFuture<
56        crate::client::customize::internal::SendResult<
57            crate::operation::search_contact_evaluations::SearchContactEvaluationsOutput,
58            crate::operation::search_contact_evaluations::SearchContactEvaluationsError,
59        >,
60    > {
61        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
62    }
63}
64impl SearchContactEvaluationsFluentBuilder {
65    /// Creates a new `SearchContactEvaluationsFluentBuilder`.
66    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
67        Self {
68            handle,
69            inner: ::std::default::Default::default(),
70            config_override: ::std::option::Option::None,
71        }
72    }
73    /// Access the SearchContactEvaluations as a reference.
74    pub fn as_input(&self) -> &crate::operation::search_contact_evaluations::builders::SearchContactEvaluationsInputBuilder {
75        &self.inner
76    }
77    /// Sends the request and returns the response.
78    ///
79    /// If an error occurs, an `SdkError` will be returned with additional details that
80    /// can be matched against.
81    ///
82    /// By default, any retryable failures will be retried twice. Retry behavior
83    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
84    /// set when configuring the client.
85    pub async fn send(
86        self,
87    ) -> ::std::result::Result<
88        crate::operation::search_contact_evaluations::SearchContactEvaluationsOutput,
89        ::aws_smithy_runtime_api::client::result::SdkError<
90            crate::operation::search_contact_evaluations::SearchContactEvaluationsError,
91            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
92        >,
93    > {
94        let input = self
95            .inner
96            .build()
97            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
98        let runtime_plugins = crate::operation::search_contact_evaluations::SearchContactEvaluations::operation_runtime_plugins(
99            self.handle.runtime_plugins.clone(),
100            &self.handle.conf,
101            self.config_override,
102        );
103        crate::operation::search_contact_evaluations::SearchContactEvaluations::orchestrate(&runtime_plugins, input).await
104    }
105
106    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
107    pub fn customize(
108        self,
109    ) -> crate::client::customize::CustomizableOperation<
110        crate::operation::search_contact_evaluations::SearchContactEvaluationsOutput,
111        crate::operation::search_contact_evaluations::SearchContactEvaluationsError,
112        Self,
113    > {
114        crate::client::customize::CustomizableOperation::new(self)
115    }
116    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
117        self.set_config_override(::std::option::Option::Some(config_override.into()));
118        self
119    }
120
121    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
122        self.config_override = config_override;
123        self
124    }
125    /// <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>
126    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.instance_id(input.into());
128        self
129    }
130    /// <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>
131    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_instance_id(input);
133        self
134    }
135    /// <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>
136    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_instance_id()
138    }
139    /// <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>
140    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.inner = self.inner.next_token(input.into());
142        self
143    }
144    /// <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>
145    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.inner = self.inner.set_next_token(input);
147        self
148    }
149    /// <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>
150    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_next_token()
152    }
153    /// <p>The maximum number of results to return per page.</p>
154    pub fn max_results(mut self, input: i32) -> Self {
155        self.inner = self.inner.max_results(input);
156        self
157    }
158    /// <p>The maximum number of results to return per page.</p>
159    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
160        self.inner = self.inner.set_max_results(input);
161        self
162    }
163    /// <p>The maximum number of results to return per page.</p>
164    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
165        self.inner.get_max_results()
166    }
167    /// <p>The search criteria to be used to return contact evaluations.</p>
168    pub fn search_criteria(mut self, input: crate::types::EvaluationSearchCriteria) -> Self {
169        self.inner = self.inner.search_criteria(input);
170        self
171    }
172    /// <p>The search criteria to be used to return contact evaluations.</p>
173    pub fn set_search_criteria(mut self, input: ::std::option::Option<crate::types::EvaluationSearchCriteria>) -> Self {
174        self.inner = self.inner.set_search_criteria(input);
175        self
176    }
177    /// <p>The search criteria to be used to return contact evaluations.</p>
178    pub fn get_search_criteria(&self) -> &::std::option::Option<crate::types::EvaluationSearchCriteria> {
179        self.inner.get_search_criteria()
180    }
181    /// <p>Filters to be applied to search results.</p>
182    pub fn search_filter(mut self, input: crate::types::EvaluationSearchFilter) -> Self {
183        self.inner = self.inner.search_filter(input);
184        self
185    }
186    /// <p>Filters to be applied to search results.</p>
187    pub fn set_search_filter(mut self, input: ::std::option::Option<crate::types::EvaluationSearchFilter>) -> Self {
188        self.inner = self.inner.set_search_filter(input);
189        self
190    }
191    /// <p>Filters to be applied to search results.</p>
192    pub fn get_search_filter(&self) -> &::std::option::Option<crate::types::EvaluationSearchFilter> {
193        self.inner.get_search_filter()
194    }
195}