1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Configuration settings for how to perform the auto-merging of profiles.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AutoMerging {
/// <p>The flag that enables the auto-merging of duplicate profiles.</p>
pub enabled: bool,
/// <p>A list of matching attributes that represent matching criteria. If two profiles meet at least one of the requirements in the matching attributes list, they will be merged.</p>
pub consolidation: ::std::option::Option<crate::types::Consolidation>,
/// <p>How the auto-merging process should resolve conflicts between different profiles. For example, if Profile A and Profile B have the same <code>FirstName</code> and <code>LastName</code> (and that is the matching criteria), which <code>EmailAddress</code> should be used?</p>
pub conflict_resolution: ::std::option::Option<crate::types::ConflictResolution>,
/// <p>A number between 0 and 1 that represents the minimum confidence score required for profiles within a matching group to be merged during the auto-merge process. A higher score means higher similarity required to merge profiles.</p>
pub min_allowed_confidence_score_for_merging: ::std::option::Option<f64>,
}
impl AutoMerging {
/// <p>The flag that enables the auto-merging of duplicate profiles.</p>
pub fn enabled(&self) -> bool {
self.enabled
}
/// <p>A list of matching attributes that represent matching criteria. If two profiles meet at least one of the requirements in the matching attributes list, they will be merged.</p>
pub fn consolidation(&self) -> ::std::option::Option<&crate::types::Consolidation> {
self.consolidation.as_ref()
}
/// <p>How the auto-merging process should resolve conflicts between different profiles. For example, if Profile A and Profile B have the same <code>FirstName</code> and <code>LastName</code> (and that is the matching criteria), which <code>EmailAddress</code> should be used?</p>
pub fn conflict_resolution(&self) -> ::std::option::Option<&crate::types::ConflictResolution> {
self.conflict_resolution.as_ref()
}
/// <p>A number between 0 and 1 that represents the minimum confidence score required for profiles within a matching group to be merged during the auto-merge process. A higher score means higher similarity required to merge profiles.</p>
pub fn min_allowed_confidence_score_for_merging(&self) -> ::std::option::Option<f64> {
self.min_allowed_confidence_score_for_merging
}
}
impl AutoMerging {
/// Creates a new builder-style object to manufacture [`AutoMerging`](crate::types::AutoMerging).
pub fn builder() -> crate::types::builders::AutoMergingBuilder {
crate::types::builders::AutoMergingBuilder::default()
}
}
/// A builder for [`AutoMerging`](crate::types::AutoMerging).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AutoMergingBuilder {
pub(crate) enabled: ::std::option::Option<bool>,
pub(crate) consolidation: ::std::option::Option<crate::types::Consolidation>,
pub(crate) conflict_resolution: ::std::option::Option<crate::types::ConflictResolution>,
pub(crate) min_allowed_confidence_score_for_merging: ::std::option::Option<f64>,
}
impl AutoMergingBuilder {
/// <p>The flag that enables the auto-merging of duplicate profiles.</p>
/// This field is required.
pub fn enabled(mut self, input: bool) -> Self {
self.enabled = ::std::option::Option::Some(input);
self
}
/// <p>The flag that enables the auto-merging of duplicate profiles.</p>
pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
self.enabled = input;
self
}
/// <p>The flag that enables the auto-merging of duplicate profiles.</p>
pub fn get_enabled(&self) -> &::std::option::Option<bool> {
&self.enabled
}
/// <p>A list of matching attributes that represent matching criteria. If two profiles meet at least one of the requirements in the matching attributes list, they will be merged.</p>
pub fn consolidation(mut self, input: crate::types::Consolidation) -> Self {
self.consolidation = ::std::option::Option::Some(input);
self
}
/// <p>A list of matching attributes that represent matching criteria. If two profiles meet at least one of the requirements in the matching attributes list, they will be merged.</p>
pub fn set_consolidation(mut self, input: ::std::option::Option<crate::types::Consolidation>) -> Self {
self.consolidation = input;
self
}
/// <p>A list of matching attributes that represent matching criteria. If two profiles meet at least one of the requirements in the matching attributes list, they will be merged.</p>
pub fn get_consolidation(&self) -> &::std::option::Option<crate::types::Consolidation> {
&self.consolidation
}
/// <p>How the auto-merging process should resolve conflicts between different profiles. For example, if Profile A and Profile B have the same <code>FirstName</code> and <code>LastName</code> (and that is the matching criteria), which <code>EmailAddress</code> should be used?</p>
pub fn conflict_resolution(mut self, input: crate::types::ConflictResolution) -> Self {
self.conflict_resolution = ::std::option::Option::Some(input);
self
}
/// <p>How the auto-merging process should resolve conflicts between different profiles. For example, if Profile A and Profile B have the same <code>FirstName</code> and <code>LastName</code> (and that is the matching criteria), which <code>EmailAddress</code> should be used?</p>
pub fn set_conflict_resolution(mut self, input: ::std::option::Option<crate::types::ConflictResolution>) -> Self {
self.conflict_resolution = input;
self
}
/// <p>How the auto-merging process should resolve conflicts between different profiles. For example, if Profile A and Profile B have the same <code>FirstName</code> and <code>LastName</code> (and that is the matching criteria), which <code>EmailAddress</code> should be used?</p>
pub fn get_conflict_resolution(&self) -> &::std::option::Option<crate::types::ConflictResolution> {
&self.conflict_resolution
}
/// <p>A number between 0 and 1 that represents the minimum confidence score required for profiles within a matching group to be merged during the auto-merge process. A higher score means higher similarity required to merge profiles.</p>
pub fn min_allowed_confidence_score_for_merging(mut self, input: f64) -> Self {
self.min_allowed_confidence_score_for_merging = ::std::option::Option::Some(input);
self
}
/// <p>A number between 0 and 1 that represents the minimum confidence score required for profiles within a matching group to be merged during the auto-merge process. A higher score means higher similarity required to merge profiles.</p>
pub fn set_min_allowed_confidence_score_for_merging(mut self, input: ::std::option::Option<f64>) -> Self {
self.min_allowed_confidence_score_for_merging = input;
self
}
/// <p>A number between 0 and 1 that represents the minimum confidence score required for profiles within a matching group to be merged during the auto-merge process. A higher score means higher similarity required to merge profiles.</p>
pub fn get_min_allowed_confidence_score_for_merging(&self) -> &::std::option::Option<f64> {
&self.min_allowed_confidence_score_for_merging
}
/// Consumes the builder and constructs a [`AutoMerging`](crate::types::AutoMerging).
/// This method will fail if any of the following fields are not set:
/// - [`enabled`](crate::types::builders::AutoMergingBuilder::enabled)
pub fn build(self) -> ::std::result::Result<crate::types::AutoMerging, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::AutoMerging {
enabled: self.enabled.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"enabled",
"enabled was not specified but it is required when building AutoMerging",
)
})?,
consolidation: self.consolidation,
conflict_resolution: self.conflict_resolution,
min_allowed_confidence_score_for_merging: self.min_allowed_confidence_score_for_merging,
})
}
}