aws-sdk-entityresolution 1.108.0

AWS SDK for AWS EntityResolution
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::generate_match_id::_generate_match_id_input::GenerateMatchIdInputBuilder;

pub use crate::operation::generate_match_id::_generate_match_id_output::GenerateMatchIdOutputBuilder;

impl crate::operation::generate_match_id::builders::GenerateMatchIdInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::generate_match_id::GenerateMatchIdOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::generate_match_id::GenerateMatchIdError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.generate_match_id();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `GenerateMatchId`.
///
/// <p>Generates or retrieves Match IDs for records using a rule-based matching workflow. When you call this operation, it processes your records against the workflow's matching rules to identify potential matches. For existing records, it retrieves their Match IDs and associated rules. For records without matches, it generates new Match IDs. The operation saves results to Amazon S3.</p>
/// <p>The processing type (<code>processingType</code>) you choose affects both the accuracy and response time of the operation. Additional charges apply for each API call, whether made through the Entity Resolution console or directly via the API. The rule-based matching workflow must exist and be active before calling this operation.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct GenerateMatchIdFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::generate_match_id::builders::GenerateMatchIdInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::generate_match_id::GenerateMatchIdOutput,
        crate::operation::generate_match_id::GenerateMatchIdError,
    > for GenerateMatchIdFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::generate_match_id::GenerateMatchIdOutput,
            crate::operation::generate_match_id::GenerateMatchIdError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl GenerateMatchIdFluentBuilder {
    /// Creates a new `GenerateMatchIdFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the GenerateMatchId as a reference.
    pub fn as_input(&self) -> &crate::operation::generate_match_id::builders::GenerateMatchIdInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::generate_match_id::GenerateMatchIdOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::generate_match_id::GenerateMatchIdError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::generate_match_id::GenerateMatchId::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::generate_match_id::GenerateMatchId::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::generate_match_id::GenerateMatchIdOutput,
        crate::operation::generate_match_id::GenerateMatchIdError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>The name of the rule-based matching workflow.</p>
    pub fn workflow_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.workflow_name(input.into());
        self
    }
    /// <p>The name of the rule-based matching workflow.</p>
    pub fn set_workflow_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_workflow_name(input);
        self
    }
    /// <p>The name of the rule-based matching workflow.</p>
    pub fn get_workflow_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_workflow_name()
    }
    ///
    /// Appends an item to `records`.
    ///
    /// To override the contents of this collection use [`set_records`](Self::set_records).
    ///
    /// <p>The records to match.</p>
    pub fn records(mut self, input: crate::types::Record) -> Self {
        self.inner = self.inner.records(input);
        self
    }
    /// <p>The records to match.</p>
    pub fn set_records(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Record>>) -> Self {
        self.inner = self.inner.set_records(input);
        self
    }
    /// <p>The records to match.</p>
    pub fn get_records(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Record>> {
        self.inner.get_records()
    }
    /// <p>The processing mode that determines how Match IDs are generated and results are saved. Each mode provides different levels of accuracy, response time, and completeness of results.</p>
    /// <p>If not specified, defaults to <code>CONSISTENT</code>.</p>
    /// <p><code>CONSISTENT</code>: Performs immediate lookup and matching against all existing records, with results saved synchronously. Provides highest accuracy but slower response time.</p>
    /// <p><code>EVENTUAL</code> (shown as <i>Background</i> in the console): Performs initial match ID lookup or generation immediately, with record updates processed asynchronously in the background. Offers faster initial response time, with complete matching results available later in S3.</p>
    /// <p><code>EVENTUAL_NO_LOOKUP</code> (shown as <i>Quick ID generation</i> in the console): Generates new match IDs without checking existing matches, with updates processed asynchronously. Provides fastest response time but should only be used for records known to be unique.</p>
    pub fn processing_type(mut self, input: crate::types::ProcessingType) -> Self {
        self.inner = self.inner.processing_type(input);
        self
    }
    /// <p>The processing mode that determines how Match IDs are generated and results are saved. Each mode provides different levels of accuracy, response time, and completeness of results.</p>
    /// <p>If not specified, defaults to <code>CONSISTENT</code>.</p>
    /// <p><code>CONSISTENT</code>: Performs immediate lookup and matching against all existing records, with results saved synchronously. Provides highest accuracy but slower response time.</p>
    /// <p><code>EVENTUAL</code> (shown as <i>Background</i> in the console): Performs initial match ID lookup or generation immediately, with record updates processed asynchronously in the background. Offers faster initial response time, with complete matching results available later in S3.</p>
    /// <p><code>EVENTUAL_NO_LOOKUP</code> (shown as <i>Quick ID generation</i> in the console): Generates new match IDs without checking existing matches, with updates processed asynchronously. Provides fastest response time but should only be used for records known to be unique.</p>
    pub fn set_processing_type(mut self, input: ::std::option::Option<crate::types::ProcessingType>) -> Self {
        self.inner = self.inner.set_processing_type(input);
        self
    }
    /// <p>The processing mode that determines how Match IDs are generated and results are saved. Each mode provides different levels of accuracy, response time, and completeness of results.</p>
    /// <p>If not specified, defaults to <code>CONSISTENT</code>.</p>
    /// <p><code>CONSISTENT</code>: Performs immediate lookup and matching against all existing records, with results saved synchronously. Provides highest accuracy but slower response time.</p>
    /// <p><code>EVENTUAL</code> (shown as <i>Background</i> in the console): Performs initial match ID lookup or generation immediately, with record updates processed asynchronously in the background. Offers faster initial response time, with complete matching results available later in S3.</p>
    /// <p><code>EVENTUAL_NO_LOOKUP</code> (shown as <i>Quick ID generation</i> in the console): Generates new match IDs without checking existing matches, with updates processed asynchronously. Provides fastest response time but should only be used for records known to be unique.</p>
    pub fn get_processing_type(&self) -> &::std::option::Option<crate::types::ProcessingType> {
        self.inner.get_processing_type()
    }
}