aws_sdk_customerprofiles/operation/get_auto_merging_preview/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_auto_merging_preview::_get_auto_merging_preview_output::GetAutoMergingPreviewOutputBuilder;
3
4pub use crate::operation::get_auto_merging_preview::_get_auto_merging_preview_input::GetAutoMergingPreviewInputBuilder;
5
6impl crate::operation::get_auto_merging_preview::builders::GetAutoMergingPreviewInputBuilder {
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::get_auto_merging_preview::GetAutoMergingPreviewOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_auto_merging_preview::GetAutoMergingPreviewError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_auto_merging_preview();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetAutoMergingPreview`.
24///
25/// <p>Tests the auto-merging settings of your Identity Resolution Job without merging your data. It randomly selects a sample of matching groups from the existing matching results, and applies the automerging settings that you provided. You can then view the number of profiles in the sample, the number of matches, and the number of profiles identified to be merged. This enables you to evaluate the accuracy of the attributes in your matching list.</p>
26/// <p>You can't view which profiles are matched and would be merged.</p><important>
27/// <p>We strongly recommend you use this API to do a dry run of the automerging process before running the Identity Resolution Job. Include <b>at least</b> two matching attributes. If your matching list includes too few attributes (such as only <code>FirstName</code> or only <code>LastName</code>), there may be a large number of matches. This increases the chances of erroneous merges.</p>
28/// </important>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct GetAutoMergingPreviewFluentBuilder {
31    handle: ::std::sync::Arc<crate::client::Handle>,
32    inner: crate::operation::get_auto_merging_preview::builders::GetAutoMergingPreviewInputBuilder,
33    config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36    crate::client::customize::internal::CustomizableSend<
37        crate::operation::get_auto_merging_preview::GetAutoMergingPreviewOutput,
38        crate::operation::get_auto_merging_preview::GetAutoMergingPreviewError,
39    > for GetAutoMergingPreviewFluentBuilder
40{
41    fn send(
42        self,
43        config_override: crate::config::Builder,
44    ) -> crate::client::customize::internal::BoxFuture<
45        crate::client::customize::internal::SendResult<
46            crate::operation::get_auto_merging_preview::GetAutoMergingPreviewOutput,
47            crate::operation::get_auto_merging_preview::GetAutoMergingPreviewError,
48        >,
49    > {
50        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51    }
52}
53impl GetAutoMergingPreviewFluentBuilder {
54    /// Creates a new `GetAutoMergingPreviewFluentBuilder`.
55    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56        Self {
57            handle,
58            inner: ::std::default::Default::default(),
59            config_override: ::std::option::Option::None,
60        }
61    }
62    /// Access the GetAutoMergingPreview as a reference.
63    pub fn as_input(&self) -> &crate::operation::get_auto_merging_preview::builders::GetAutoMergingPreviewInputBuilder {
64        &self.inner
65    }
66    /// Sends the request and returns the response.
67    ///
68    /// If an error occurs, an `SdkError` will be returned with additional details that
69    /// can be matched against.
70    ///
71    /// By default, any retryable failures will be retried twice. Retry behavior
72    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73    /// set when configuring the client.
74    pub async fn send(
75        self,
76    ) -> ::std::result::Result<
77        crate::operation::get_auto_merging_preview::GetAutoMergingPreviewOutput,
78        ::aws_smithy_runtime_api::client::result::SdkError<
79            crate::operation::get_auto_merging_preview::GetAutoMergingPreviewError,
80            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81        >,
82    > {
83        let input = self
84            .inner
85            .build()
86            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87        let runtime_plugins = crate::operation::get_auto_merging_preview::GetAutoMergingPreview::operation_runtime_plugins(
88            self.handle.runtime_plugins.clone(),
89            &self.handle.conf,
90            self.config_override,
91        );
92        crate::operation::get_auto_merging_preview::GetAutoMergingPreview::orchestrate(&runtime_plugins, input).await
93    }
94
95    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
96    pub fn customize(
97        self,
98    ) -> crate::client::customize::CustomizableOperation<
99        crate::operation::get_auto_merging_preview::GetAutoMergingPreviewOutput,
100        crate::operation::get_auto_merging_preview::GetAutoMergingPreviewError,
101        Self,
102    > {
103        crate::client::customize::CustomizableOperation::new(self)
104    }
105    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
106        self.set_config_override(::std::option::Option::Some(config_override.into()));
107        self
108    }
109
110    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
111        self.config_override = config_override;
112        self
113    }
114    /// <p>The unique name of the domain.</p>
115    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.inner = self.inner.domain_name(input.into());
117        self
118    }
119    /// <p>The unique name of the domain.</p>
120    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.inner = self.inner.set_domain_name(input);
122        self
123    }
124    /// <p>The unique name of the domain.</p>
125    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
126        self.inner.get_domain_name()
127    }
128    /// <p>A list of matching attributes that represent matching criteria.</p>
129    pub fn consolidation(mut self, input: crate::types::Consolidation) -> Self {
130        self.inner = self.inner.consolidation(input);
131        self
132    }
133    /// <p>A list of matching attributes that represent matching criteria.</p>
134    pub fn set_consolidation(mut self, input: ::std::option::Option<crate::types::Consolidation>) -> Self {
135        self.inner = self.inner.set_consolidation(input);
136        self
137    }
138    /// <p>A list of matching attributes that represent matching criteria.</p>
139    pub fn get_consolidation(&self) -> &::std::option::Option<crate::types::Consolidation> {
140        self.inner.get_consolidation()
141    }
142    /// <p>How the auto-merging process should resolve conflicts between different profiles.</p>
143    pub fn conflict_resolution(mut self, input: crate::types::ConflictResolution) -> Self {
144        self.inner = self.inner.conflict_resolution(input);
145        self
146    }
147    /// <p>How the auto-merging process should resolve conflicts between different profiles.</p>
148    pub fn set_conflict_resolution(mut self, input: ::std::option::Option<crate::types::ConflictResolution>) -> Self {
149        self.inner = self.inner.set_conflict_resolution(input);
150        self
151    }
152    /// <p>How the auto-merging process should resolve conflicts between different profiles.</p>
153    pub fn get_conflict_resolution(&self) -> &::std::option::Option<crate::types::ConflictResolution> {
154        self.inner.get_conflict_resolution()
155    }
156    /// <p>Minimum confidence score required for profiles within a matching group to be merged during the auto-merge process.</p>
157    pub fn min_allowed_confidence_score_for_merging(mut self, input: f64) -> Self {
158        self.inner = self.inner.min_allowed_confidence_score_for_merging(input);
159        self
160    }
161    /// <p>Minimum confidence score required for profiles within a matching group to be merged during the auto-merge process.</p>
162    pub fn set_min_allowed_confidence_score_for_merging(mut self, input: ::std::option::Option<f64>) -> Self {
163        self.inner = self.inner.set_min_allowed_confidence_score_for_merging(input);
164        self
165    }
166    /// <p>Minimum confidence score required for profiles within a matching group to be merged during the auto-merge process.</p>
167    pub fn get_min_allowed_confidence_score_for_merging(&self) -> &::std::option::Option<f64> {
168        self.inner.get_min_allowed_confidence_score_for_merging()
169    }
170}