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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The response of the Rule-based matching request.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RuleBasedMatchingResponse {
    /// <p>The flag that enables the rule-based matching process of duplicate profiles.</p>
    pub enabled: ::std::option::Option<bool>,
    /// <p>Configures how the rule-based matching process should match profiles. You can have up to 15 <code>MatchingRule</code> in the <code>MatchingRules</code>.</p>
    pub matching_rules: ::std::option::Option<::std::vec::Vec<crate::types::MatchingRule>>,
    /// <p>PENDING</p>
    /// <ul>
    /// <li>
    /// <p>The first status after configuration a rule-based matching rule. If it is an existing domain, the rule-based Identity Resolution waits one hour before creating the matching rule. If it is a new domain, the system will skip the <code>PENDING</code> stage.</p></li>
    /// </ul>
    /// <p>IN_PROGRESS</p>
    /// <ul>
    /// <li>
    /// <p>The system is creating the rule-based matching rule. Under this status, the system is evaluating the existing data and you can no longer change the Rule-based matching configuration.</p></li>
    /// </ul>
    /// <p>ACTIVE</p>
    /// <ul>
    /// <li>
    /// <p>The rule is ready to use. You can change the rule a day after the status is in <code>ACTIVE</code>.</p></li>
    /// </ul>
    pub status: ::std::option::Option<crate::types::RuleBasedMatchingStatus>,
    /// <p><a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_MatchingRule.html">MatchingRule</a></p>
    pub max_allowed_rule_level_for_merging: ::std::option::Option<i32>,
    /// <p>Indicates the maximum allowed rule level.</p>
    pub max_allowed_rule_level_for_matching: ::std::option::Option<i32>,
    /// <p>Configures information about the <code>AttributeTypesSelector</code> where the rule-based identity resolution uses to match profiles.</p>
    pub attribute_types_selector: ::std::option::Option<crate::types::AttributeTypesSelector>,
    /// <p>How the auto-merging process should resolve conflicts between different profiles.</p>
    pub conflict_resolution: ::std::option::Option<crate::types::ConflictResolution>,
    /// <p>Configuration information about the S3 bucket where Identity Resolution Jobs writes result files.</p><note>
    /// <p>You need to give Customer Profiles service principal write permission to your S3 bucket. Otherwise, you'll get an exception in the API response. For an example policy, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/cross-service-confused-deputy-prevention.html#customer-profiles-cross-service">Amazon Connect Customer Profiles cross-service confused deputy prevention</a>.</p>
    /// </note>
    pub exporting_config: ::std::option::Option<crate::types::ExportingConfig>,
}
impl RuleBasedMatchingResponse {
    /// <p>The flag that enables the rule-based matching process of duplicate profiles.</p>
    pub fn enabled(&self) -> ::std::option::Option<bool> {
        self.enabled
    }
    /// <p>Configures how the rule-based matching process should match profiles. You can have up to 15 <code>MatchingRule</code> in the <code>MatchingRules</code>.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.matching_rules.is_none()`.
    pub fn matching_rules(&self) -> &[crate::types::MatchingRule] {
        self.matching_rules.as_deref().unwrap_or_default()
    }
    /// <p>PENDING</p>
    /// <ul>
    /// <li>
    /// <p>The first status after configuration a rule-based matching rule. If it is an existing domain, the rule-based Identity Resolution waits one hour before creating the matching rule. If it is a new domain, the system will skip the <code>PENDING</code> stage.</p></li>
    /// </ul>
    /// <p>IN_PROGRESS</p>
    /// <ul>
    /// <li>
    /// <p>The system is creating the rule-based matching rule. Under this status, the system is evaluating the existing data and you can no longer change the Rule-based matching configuration.</p></li>
    /// </ul>
    /// <p>ACTIVE</p>
    /// <ul>
    /// <li>
    /// <p>The rule is ready to use. You can change the rule a day after the status is in <code>ACTIVE</code>.</p></li>
    /// </ul>
    pub fn status(&self) -> ::std::option::Option<&crate::types::RuleBasedMatchingStatus> {
        self.status.as_ref()
    }
    /// <p><a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_MatchingRule.html">MatchingRule</a></p>
    pub fn max_allowed_rule_level_for_merging(&self) -> ::std::option::Option<i32> {
        self.max_allowed_rule_level_for_merging
    }
    /// <p>Indicates the maximum allowed rule level.</p>
    pub fn max_allowed_rule_level_for_matching(&self) -> ::std::option::Option<i32> {
        self.max_allowed_rule_level_for_matching
    }
    /// <p>Configures information about the <code>AttributeTypesSelector</code> where the rule-based identity resolution uses to match profiles.</p>
    pub fn attribute_types_selector(&self) -> ::std::option::Option<&crate::types::AttributeTypesSelector> {
        self.attribute_types_selector.as_ref()
    }
    /// <p>How the auto-merging process should resolve conflicts between different profiles.</p>
    pub fn conflict_resolution(&self) -> ::std::option::Option<&crate::types::ConflictResolution> {
        self.conflict_resolution.as_ref()
    }
    /// <p>Configuration information about the S3 bucket where Identity Resolution Jobs writes result files.</p><note>
    /// <p>You need to give Customer Profiles service principal write permission to your S3 bucket. Otherwise, you'll get an exception in the API response. For an example policy, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/cross-service-confused-deputy-prevention.html#customer-profiles-cross-service">Amazon Connect Customer Profiles cross-service confused deputy prevention</a>.</p>
    /// </note>
    pub fn exporting_config(&self) -> ::std::option::Option<&crate::types::ExportingConfig> {
        self.exporting_config.as_ref()
    }
}
impl RuleBasedMatchingResponse {
    /// Creates a new builder-style object to manufacture [`RuleBasedMatchingResponse`](crate::types::RuleBasedMatchingResponse).
    pub fn builder() -> crate::types::builders::RuleBasedMatchingResponseBuilder {
        crate::types::builders::RuleBasedMatchingResponseBuilder::default()
    }
}

/// A builder for [`RuleBasedMatchingResponse`](crate::types::RuleBasedMatchingResponse).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct RuleBasedMatchingResponseBuilder {
    pub(crate) enabled: ::std::option::Option<bool>,
    pub(crate) matching_rules: ::std::option::Option<::std::vec::Vec<crate::types::MatchingRule>>,
    pub(crate) status: ::std::option::Option<crate::types::RuleBasedMatchingStatus>,
    pub(crate) max_allowed_rule_level_for_merging: ::std::option::Option<i32>,
    pub(crate) max_allowed_rule_level_for_matching: ::std::option::Option<i32>,
    pub(crate) attribute_types_selector: ::std::option::Option<crate::types::AttributeTypesSelector>,
    pub(crate) conflict_resolution: ::std::option::Option<crate::types::ConflictResolution>,
    pub(crate) exporting_config: ::std::option::Option<crate::types::ExportingConfig>,
}
impl RuleBasedMatchingResponseBuilder {
    /// <p>The flag that enables the rule-based matching process of duplicate profiles.</p>
    pub fn enabled(mut self, input: bool) -> Self {
        self.enabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>The flag that enables the rule-based matching process 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 rule-based matching process of duplicate profiles.</p>
    pub fn get_enabled(&self) -> &::std::option::Option<bool> {
        &self.enabled
    }
    /// Appends an item to `matching_rules`.
    ///
    /// To override the contents of this collection use [`set_matching_rules`](Self::set_matching_rules).
    ///
    /// <p>Configures how the rule-based matching process should match profiles. You can have up to 15 <code>MatchingRule</code> in the <code>MatchingRules</code>.</p>
    pub fn matching_rules(mut self, input: crate::types::MatchingRule) -> Self {
        let mut v = self.matching_rules.unwrap_or_default();
        v.push(input);
        self.matching_rules = ::std::option::Option::Some(v);
        self
    }
    /// <p>Configures how the rule-based matching process should match profiles. You can have up to 15 <code>MatchingRule</code> in the <code>MatchingRules</code>.</p>
    pub fn set_matching_rules(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MatchingRule>>) -> Self {
        self.matching_rules = input;
        self
    }
    /// <p>Configures how the rule-based matching process should match profiles. You can have up to 15 <code>MatchingRule</code> in the <code>MatchingRules</code>.</p>
    pub fn get_matching_rules(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MatchingRule>> {
        &self.matching_rules
    }
    /// <p>PENDING</p>
    /// <ul>
    /// <li>
    /// <p>The first status after configuration a rule-based matching rule. If it is an existing domain, the rule-based Identity Resolution waits one hour before creating the matching rule. If it is a new domain, the system will skip the <code>PENDING</code> stage.</p></li>
    /// </ul>
    /// <p>IN_PROGRESS</p>
    /// <ul>
    /// <li>
    /// <p>The system is creating the rule-based matching rule. Under this status, the system is evaluating the existing data and you can no longer change the Rule-based matching configuration.</p></li>
    /// </ul>
    /// <p>ACTIVE</p>
    /// <ul>
    /// <li>
    /// <p>The rule is ready to use. You can change the rule a day after the status is in <code>ACTIVE</code>.</p></li>
    /// </ul>
    pub fn status(mut self, input: crate::types::RuleBasedMatchingStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>PENDING</p>
    /// <ul>
    /// <li>
    /// <p>The first status after configuration a rule-based matching rule. If it is an existing domain, the rule-based Identity Resolution waits one hour before creating the matching rule. If it is a new domain, the system will skip the <code>PENDING</code> stage.</p></li>
    /// </ul>
    /// <p>IN_PROGRESS</p>
    /// <ul>
    /// <li>
    /// <p>The system is creating the rule-based matching rule. Under this status, the system is evaluating the existing data and you can no longer change the Rule-based matching configuration.</p></li>
    /// </ul>
    /// <p>ACTIVE</p>
    /// <ul>
    /// <li>
    /// <p>The rule is ready to use. You can change the rule a day after the status is in <code>ACTIVE</code>.</p></li>
    /// </ul>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::RuleBasedMatchingStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>PENDING</p>
    /// <ul>
    /// <li>
    /// <p>The first status after configuration a rule-based matching rule. If it is an existing domain, the rule-based Identity Resolution waits one hour before creating the matching rule. If it is a new domain, the system will skip the <code>PENDING</code> stage.</p></li>
    /// </ul>
    /// <p>IN_PROGRESS</p>
    /// <ul>
    /// <li>
    /// <p>The system is creating the rule-based matching rule. Under this status, the system is evaluating the existing data and you can no longer change the Rule-based matching configuration.</p></li>
    /// </ul>
    /// <p>ACTIVE</p>
    /// <ul>
    /// <li>
    /// <p>The rule is ready to use. You can change the rule a day after the status is in <code>ACTIVE</code>.</p></li>
    /// </ul>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::RuleBasedMatchingStatus> {
        &self.status
    }
    /// <p><a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_MatchingRule.html">MatchingRule</a></p>
    pub fn max_allowed_rule_level_for_merging(mut self, input: i32) -> Self {
        self.max_allowed_rule_level_for_merging = ::std::option::Option::Some(input);
        self
    }
    /// <p><a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_MatchingRule.html">MatchingRule</a></p>
    pub fn set_max_allowed_rule_level_for_merging(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_allowed_rule_level_for_merging = input;
        self
    }
    /// <p><a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_MatchingRule.html">MatchingRule</a></p>
    pub fn get_max_allowed_rule_level_for_merging(&self) -> &::std::option::Option<i32> {
        &self.max_allowed_rule_level_for_merging
    }
    /// <p>Indicates the maximum allowed rule level.</p>
    pub fn max_allowed_rule_level_for_matching(mut self, input: i32) -> Self {
        self.max_allowed_rule_level_for_matching = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates the maximum allowed rule level.</p>
    pub fn set_max_allowed_rule_level_for_matching(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_allowed_rule_level_for_matching = input;
        self
    }
    /// <p>Indicates the maximum allowed rule level.</p>
    pub fn get_max_allowed_rule_level_for_matching(&self) -> &::std::option::Option<i32> {
        &self.max_allowed_rule_level_for_matching
    }
    /// <p>Configures information about the <code>AttributeTypesSelector</code> where the rule-based identity resolution uses to match profiles.</p>
    pub fn attribute_types_selector(mut self, input: crate::types::AttributeTypesSelector) -> Self {
        self.attribute_types_selector = ::std::option::Option::Some(input);
        self
    }
    /// <p>Configures information about the <code>AttributeTypesSelector</code> where the rule-based identity resolution uses to match profiles.</p>
    pub fn set_attribute_types_selector(mut self, input: ::std::option::Option<crate::types::AttributeTypesSelector>) -> Self {
        self.attribute_types_selector = input;
        self
    }
    /// <p>Configures information about the <code>AttributeTypesSelector</code> where the rule-based identity resolution uses to match profiles.</p>
    pub fn get_attribute_types_selector(&self) -> &::std::option::Option<crate::types::AttributeTypesSelector> {
        &self.attribute_types_selector
    }
    /// <p>How the auto-merging process should resolve conflicts between different profiles.</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.</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.</p>
    pub fn get_conflict_resolution(&self) -> &::std::option::Option<crate::types::ConflictResolution> {
        &self.conflict_resolution
    }
    /// <p>Configuration information about the S3 bucket where Identity Resolution Jobs writes result files.</p><note>
    /// <p>You need to give Customer Profiles service principal write permission to your S3 bucket. Otherwise, you'll get an exception in the API response. For an example policy, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/cross-service-confused-deputy-prevention.html#customer-profiles-cross-service">Amazon Connect Customer Profiles cross-service confused deputy prevention</a>.</p>
    /// </note>
    pub fn exporting_config(mut self, input: crate::types::ExportingConfig) -> Self {
        self.exporting_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Configuration information about the S3 bucket where Identity Resolution Jobs writes result files.</p><note>
    /// <p>You need to give Customer Profiles service principal write permission to your S3 bucket. Otherwise, you'll get an exception in the API response. For an example policy, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/cross-service-confused-deputy-prevention.html#customer-profiles-cross-service">Amazon Connect Customer Profiles cross-service confused deputy prevention</a>.</p>
    /// </note>
    pub fn set_exporting_config(mut self, input: ::std::option::Option<crate::types::ExportingConfig>) -> Self {
        self.exporting_config = input;
        self
    }
    /// <p>Configuration information about the S3 bucket where Identity Resolution Jobs writes result files.</p><note>
    /// <p>You need to give Customer Profiles service principal write permission to your S3 bucket. Otherwise, you'll get an exception in the API response. For an example policy, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/cross-service-confused-deputy-prevention.html#customer-profiles-cross-service">Amazon Connect Customer Profiles cross-service confused deputy prevention</a>.</p>
    /// </note>
    pub fn get_exporting_config(&self) -> &::std::option::Option<crate::types::ExportingConfig> {
        &self.exporting_config
    }
    /// Consumes the builder and constructs a [`RuleBasedMatchingResponse`](crate::types::RuleBasedMatchingResponse).
    pub fn build(self) -> crate::types::RuleBasedMatchingResponse {
        crate::types::RuleBasedMatchingResponse {
            enabled: self.enabled,
            matching_rules: self.matching_rules,
            status: self.status,
            max_allowed_rule_level_for_merging: self.max_allowed_rule_level_for_merging,
            max_allowed_rule_level_for_matching: self.max_allowed_rule_level_for_matching,
            attribute_types_selector: self.attribute_types_selector,
            conflict_resolution: self.conflict_resolution,
            exporting_config: self.exporting_config,
        }
    }
}