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
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A structure containing the configuration details of an experiment.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Experiment {
    /// <p>The ARN of the experiment.</p>
    pub arn: ::std::string::String,
    /// <p>The name of the experiment.</p>
    pub name: ::std::string::String,
    /// <p>The name or ARN of the project that contains this experiment.</p>
    pub project: ::std::option::Option<::std::string::String>,
    /// <p>The current state of the experiment.</p>
    pub status: crate::types::ExperimentStatus,
    /// <p>If the experiment was stopped, this is the string that was entered by the person who stopped the experiment, to explain why it was stopped.</p>
    pub status_reason: ::std::option::Option<::std::string::String>,
    /// <p>A description of the experiment.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The date and time that the experiment is first created.</p>
    pub created_time: ::aws_smithy_types::DateTime,
    /// <p>The date and time that the experiment was most recently updated.</p>
    pub last_updated_time: ::aws_smithy_types::DateTime,
    /// <p>A structure that contains the time and date that Evidently completed the analysis of the experiment.</p>
    pub schedule: ::std::option::Option<crate::types::ExperimentSchedule>,
    /// <p>A structure that contains the date and time that the experiment started and ended.</p>
    pub execution: ::std::option::Option<crate::types::ExperimentExecution>,
    /// <p>An array of structures that describe the configuration of each feature variation used in the experiment.</p>
    pub treatments: ::std::option::Option<::std::vec::Vec<crate::types::Treatment>>,
    /// <p>An array of structures that defines the metrics used for the experiment, and whether a higher or lower value for each metric is the goal.</p>
    pub metric_goals: ::std::option::Option<::std::vec::Vec<crate::types::MetricGoal>>,
    /// <p>This value is used when Evidently assigns a particular user session to the experiment. It helps create a randomization ID to determine which variation the user session is served. This randomization ID is a combination of the entity ID and <code>randomizationSalt</code>.</p>
    pub randomization_salt: ::std::option::Option<::std::string::String>,
    /// <p>In thousandths of a percent, the amount of the available audience that is allocated to this experiment. The available audience is the total audience minus the audience that you have allocated to overrides or current launches of this feature.</p>
    /// <p>This is represented in thousandths of a percent, so a value of 10,000 is 10% of the available audience.</p>
    pub sampling_rate: i64,
    /// <p>The audience segment being used for the experiment, if a segment is being used.</p>
    pub segment: ::std::option::Option<::std::string::String>,
    /// <p>The type of this experiment. Currently, this value must be <code>aws.experiment.onlineab</code>.</p>
    pub r#type: crate::types::ExperimentType,
    /// <p>A structure that contains the configuration of which variation to use as the "control" version. The "control" version is used for comparison with other variations. This structure also specifies how much experiment traffic is allocated to each variation.</p>
    pub online_ab_definition: ::std::option::Option<crate::types::OnlineAbDefinition>,
    /// <p>The list of tag keys and values associated with this experiment.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl Experiment {
    /// <p>The ARN of the experiment.</p>
    pub fn arn(&self) -> &str {
        use std::ops::Deref;
        self.arn.deref()
    }
    /// <p>The name of the experiment.</p>
    pub fn name(&self) -> &str {
        use std::ops::Deref;
        self.name.deref()
    }
    /// <p>The name or ARN of the project that contains this experiment.</p>
    pub fn project(&self) -> ::std::option::Option<&str> {
        self.project.as_deref()
    }
    /// <p>The current state of the experiment.</p>
    pub fn status(&self) -> &crate::types::ExperimentStatus {
        &self.status
    }
    /// <p>If the experiment was stopped, this is the string that was entered by the person who stopped the experiment, to explain why it was stopped.</p>
    pub fn status_reason(&self) -> ::std::option::Option<&str> {
        self.status_reason.as_deref()
    }
    /// <p>A description of the experiment.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The date and time that the experiment is first created.</p>
    pub fn created_time(&self) -> &::aws_smithy_types::DateTime {
        &self.created_time
    }
    /// <p>The date and time that the experiment was most recently updated.</p>
    pub fn last_updated_time(&self) -> &::aws_smithy_types::DateTime {
        &self.last_updated_time
    }
    /// <p>A structure that contains the time and date that Evidently completed the analysis of the experiment.</p>
    pub fn schedule(&self) -> ::std::option::Option<&crate::types::ExperimentSchedule> {
        self.schedule.as_ref()
    }
    /// <p>A structure that contains the date and time that the experiment started and ended.</p>
    pub fn execution(&self) -> ::std::option::Option<&crate::types::ExperimentExecution> {
        self.execution.as_ref()
    }
    /// <p>An array of structures that describe the configuration of each feature variation used in the experiment.</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 `.treatments.is_none()`.
    pub fn treatments(&self) -> &[crate::types::Treatment] {
        self.treatments.as_deref().unwrap_or_default()
    }
    /// <p>An array of structures that defines the metrics used for the experiment, and whether a higher or lower value for each metric is the goal.</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 `.metric_goals.is_none()`.
    pub fn metric_goals(&self) -> &[crate::types::MetricGoal] {
        self.metric_goals.as_deref().unwrap_or_default()
    }
    /// <p>This value is used when Evidently assigns a particular user session to the experiment. It helps create a randomization ID to determine which variation the user session is served. This randomization ID is a combination of the entity ID and <code>randomizationSalt</code>.</p>
    pub fn randomization_salt(&self) -> ::std::option::Option<&str> {
        self.randomization_salt.as_deref()
    }
    /// <p>In thousandths of a percent, the amount of the available audience that is allocated to this experiment. The available audience is the total audience minus the audience that you have allocated to overrides or current launches of this feature.</p>
    /// <p>This is represented in thousandths of a percent, so a value of 10,000 is 10% of the available audience.</p>
    pub fn sampling_rate(&self) -> i64 {
        self.sampling_rate
    }
    /// <p>The audience segment being used for the experiment, if a segment is being used.</p>
    pub fn segment(&self) -> ::std::option::Option<&str> {
        self.segment.as_deref()
    }
    /// <p>The type of this experiment. Currently, this value must be <code>aws.experiment.onlineab</code>.</p>
    pub fn r#type(&self) -> &crate::types::ExperimentType {
        &self.r#type
    }
    /// <p>A structure that contains the configuration of which variation to use as the "control" version. The "control" version is used for comparison with other variations. This structure also specifies how much experiment traffic is allocated to each variation.</p>
    pub fn online_ab_definition(&self) -> ::std::option::Option<&crate::types::OnlineAbDefinition> {
        self.online_ab_definition.as_ref()
    }
    /// <p>The list of tag keys and values associated with this experiment.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl Experiment {
    /// Creates a new builder-style object to manufacture [`Experiment`](crate::types::Experiment).
    pub fn builder() -> crate::types::builders::ExperimentBuilder {
        crate::types::builders::ExperimentBuilder::default()
    }
}

/// A builder for [`Experiment`](crate::types::Experiment).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ExperimentBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) project: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::ExperimentStatus>,
    pub(crate) status_reason: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) schedule: ::std::option::Option<crate::types::ExperimentSchedule>,
    pub(crate) execution: ::std::option::Option<crate::types::ExperimentExecution>,
    pub(crate) treatments: ::std::option::Option<::std::vec::Vec<crate::types::Treatment>>,
    pub(crate) metric_goals: ::std::option::Option<::std::vec::Vec<crate::types::MetricGoal>>,
    pub(crate) randomization_salt: ::std::option::Option<::std::string::String>,
    pub(crate) sampling_rate: ::std::option::Option<i64>,
    pub(crate) segment: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<crate::types::ExperimentType>,
    pub(crate) online_ab_definition: ::std::option::Option<crate::types::OnlineAbDefinition>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl ExperimentBuilder {
    /// <p>The ARN of the experiment.</p>
    /// This field is required.
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the experiment.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The ARN of the experiment.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The name of the experiment.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the experiment.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the experiment.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The name or ARN of the project that contains this experiment.</p>
    pub fn project(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.project = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name or ARN of the project that contains this experiment.</p>
    pub fn set_project(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.project = input;
        self
    }
    /// <p>The name or ARN of the project that contains this experiment.</p>
    pub fn get_project(&self) -> &::std::option::Option<::std::string::String> {
        &self.project
    }
    /// <p>The current state of the experiment.</p>
    /// This field is required.
    pub fn status(mut self, input: crate::types::ExperimentStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current state of the experiment.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ExperimentStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The current state of the experiment.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::ExperimentStatus> {
        &self.status
    }
    /// <p>If the experiment was stopped, this is the string that was entered by the person who stopped the experiment, to explain why it was stopped.</p>
    pub fn status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>If the experiment was stopped, this is the string that was entered by the person who stopped the experiment, to explain why it was stopped.</p>
    pub fn set_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status_reason = input;
        self
    }
    /// <p>If the experiment was stopped, this is the string that was entered by the person who stopped the experiment, to explain why it was stopped.</p>
    pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_reason
    }
    /// <p>A description of the experiment.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the experiment.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the experiment.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The date and time that the experiment is first created.</p>
    /// This field is required.
    pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time that the experiment is first created.</p>
    pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_time = input;
        self
    }
    /// <p>The date and time that the experiment is first created.</p>
    pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_time
    }
    /// <p>The date and time that the experiment was most recently updated.</p>
    /// This field is required.
    pub fn last_updated_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_updated_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time that the experiment was most recently updated.</p>
    pub fn set_last_updated_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_updated_time = input;
        self
    }
    /// <p>The date and time that the experiment was most recently updated.</p>
    pub fn get_last_updated_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated_time
    }
    /// <p>A structure that contains the time and date that Evidently completed the analysis of the experiment.</p>
    pub fn schedule(mut self, input: crate::types::ExperimentSchedule) -> Self {
        self.schedule = ::std::option::Option::Some(input);
        self
    }
    /// <p>A structure that contains the time and date that Evidently completed the analysis of the experiment.</p>
    pub fn set_schedule(mut self, input: ::std::option::Option<crate::types::ExperimentSchedule>) -> Self {
        self.schedule = input;
        self
    }
    /// <p>A structure that contains the time and date that Evidently completed the analysis of the experiment.</p>
    pub fn get_schedule(&self) -> &::std::option::Option<crate::types::ExperimentSchedule> {
        &self.schedule
    }
    /// <p>A structure that contains the date and time that the experiment started and ended.</p>
    pub fn execution(mut self, input: crate::types::ExperimentExecution) -> Self {
        self.execution = ::std::option::Option::Some(input);
        self
    }
    /// <p>A structure that contains the date and time that the experiment started and ended.</p>
    pub fn set_execution(mut self, input: ::std::option::Option<crate::types::ExperimentExecution>) -> Self {
        self.execution = input;
        self
    }
    /// <p>A structure that contains the date and time that the experiment started and ended.</p>
    pub fn get_execution(&self) -> &::std::option::Option<crate::types::ExperimentExecution> {
        &self.execution
    }
    /// Appends an item to `treatments`.
    ///
    /// To override the contents of this collection use [`set_treatments`](Self::set_treatments).
    ///
    /// <p>An array of structures that describe the configuration of each feature variation used in the experiment.</p>
    pub fn treatments(mut self, input: crate::types::Treatment) -> Self {
        let mut v = self.treatments.unwrap_or_default();
        v.push(input);
        self.treatments = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of structures that describe the configuration of each feature variation used in the experiment.</p>
    pub fn set_treatments(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Treatment>>) -> Self {
        self.treatments = input;
        self
    }
    /// <p>An array of structures that describe the configuration of each feature variation used in the experiment.</p>
    pub fn get_treatments(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Treatment>> {
        &self.treatments
    }
    /// Appends an item to `metric_goals`.
    ///
    /// To override the contents of this collection use [`set_metric_goals`](Self::set_metric_goals).
    ///
    /// <p>An array of structures that defines the metrics used for the experiment, and whether a higher or lower value for each metric is the goal.</p>
    pub fn metric_goals(mut self, input: crate::types::MetricGoal) -> Self {
        let mut v = self.metric_goals.unwrap_or_default();
        v.push(input);
        self.metric_goals = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of structures that defines the metrics used for the experiment, and whether a higher or lower value for each metric is the goal.</p>
    pub fn set_metric_goals(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MetricGoal>>) -> Self {
        self.metric_goals = input;
        self
    }
    /// <p>An array of structures that defines the metrics used for the experiment, and whether a higher or lower value for each metric is the goal.</p>
    pub fn get_metric_goals(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MetricGoal>> {
        &self.metric_goals
    }
    /// <p>This value is used when Evidently assigns a particular user session to the experiment. It helps create a randomization ID to determine which variation the user session is served. This randomization ID is a combination of the entity ID and <code>randomizationSalt</code>.</p>
    pub fn randomization_salt(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.randomization_salt = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>This value is used when Evidently assigns a particular user session to the experiment. It helps create a randomization ID to determine which variation the user session is served. This randomization ID is a combination of the entity ID and <code>randomizationSalt</code>.</p>
    pub fn set_randomization_salt(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.randomization_salt = input;
        self
    }
    /// <p>This value is used when Evidently assigns a particular user session to the experiment. It helps create a randomization ID to determine which variation the user session is served. This randomization ID is a combination of the entity ID and <code>randomizationSalt</code>.</p>
    pub fn get_randomization_salt(&self) -> &::std::option::Option<::std::string::String> {
        &self.randomization_salt
    }
    /// <p>In thousandths of a percent, the amount of the available audience that is allocated to this experiment. The available audience is the total audience minus the audience that you have allocated to overrides or current launches of this feature.</p>
    /// <p>This is represented in thousandths of a percent, so a value of 10,000 is 10% of the available audience.</p>
    pub fn sampling_rate(mut self, input: i64) -> Self {
        self.sampling_rate = ::std::option::Option::Some(input);
        self
    }
    /// <p>In thousandths of a percent, the amount of the available audience that is allocated to this experiment. The available audience is the total audience minus the audience that you have allocated to overrides or current launches of this feature.</p>
    /// <p>This is represented in thousandths of a percent, so a value of 10,000 is 10% of the available audience.</p>
    pub fn set_sampling_rate(mut self, input: ::std::option::Option<i64>) -> Self {
        self.sampling_rate = input;
        self
    }
    /// <p>In thousandths of a percent, the amount of the available audience that is allocated to this experiment. The available audience is the total audience minus the audience that you have allocated to overrides or current launches of this feature.</p>
    /// <p>This is represented in thousandths of a percent, so a value of 10,000 is 10% of the available audience.</p>
    pub fn get_sampling_rate(&self) -> &::std::option::Option<i64> {
        &self.sampling_rate
    }
    /// <p>The audience segment being used for the experiment, if a segment is being used.</p>
    pub fn segment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.segment = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The audience segment being used for the experiment, if a segment is being used.</p>
    pub fn set_segment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.segment = input;
        self
    }
    /// <p>The audience segment being used for the experiment, if a segment is being used.</p>
    pub fn get_segment(&self) -> &::std::option::Option<::std::string::String> {
        &self.segment
    }
    /// <p>The type of this experiment. Currently, this value must be <code>aws.experiment.onlineab</code>.</p>
    /// This field is required.
    pub fn r#type(mut self, input: crate::types::ExperimentType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of this experiment. Currently, this value must be <code>aws.experiment.onlineab</code>.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::ExperimentType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of this experiment. Currently, this value must be <code>aws.experiment.onlineab</code>.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::ExperimentType> {
        &self.r#type
    }
    /// <p>A structure that contains the configuration of which variation to use as the "control" version. The "control" version is used for comparison with other variations. This structure also specifies how much experiment traffic is allocated to each variation.</p>
    pub fn online_ab_definition(mut self, input: crate::types::OnlineAbDefinition) -> Self {
        self.online_ab_definition = ::std::option::Option::Some(input);
        self
    }
    /// <p>A structure that contains the configuration of which variation to use as the "control" version. The "control" version is used for comparison with other variations. This structure also specifies how much experiment traffic is allocated to each variation.</p>
    pub fn set_online_ab_definition(mut self, input: ::std::option::Option<crate::types::OnlineAbDefinition>) -> Self {
        self.online_ab_definition = input;
        self
    }
    /// <p>A structure that contains the configuration of which variation to use as the "control" version. The "control" version is used for comparison with other variations. This structure also specifies how much experiment traffic is allocated to each variation.</p>
    pub fn get_online_ab_definition(&self) -> &::std::option::Option<crate::types::OnlineAbDefinition> {
        &self.online_ab_definition
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The list of tag keys and values associated with this experiment.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The list of tag keys and values associated with this experiment.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The list of tag keys and values associated with this experiment.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`Experiment`](crate::types::Experiment).
    /// This method will fail if any of the following fields are not set:
    /// - [`arn`](crate::types::builders::ExperimentBuilder::arn)
    /// - [`name`](crate::types::builders::ExperimentBuilder::name)
    /// - [`status`](crate::types::builders::ExperimentBuilder::status)
    /// - [`created_time`](crate::types::builders::ExperimentBuilder::created_time)
    /// - [`last_updated_time`](crate::types::builders::ExperimentBuilder::last_updated_time)
    /// - [`r#type`](crate::types::builders::ExperimentBuilder::r#type)
    pub fn build(self) -> ::std::result::Result<crate::types::Experiment, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::Experiment {
            arn: self.arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "arn",
                    "arn was not specified but it is required when building Experiment",
                )
            })?,
            name: self.name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "name",
                    "name was not specified but it is required when building Experiment",
                )
            })?,
            project: self.project,
            status: self.status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "status",
                    "status was not specified but it is required when building Experiment",
                )
            })?,
            status_reason: self.status_reason,
            description: self.description,
            created_time: self.created_time.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "created_time",
                    "created_time was not specified but it is required when building Experiment",
                )
            })?,
            last_updated_time: self.last_updated_time.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "last_updated_time",
                    "last_updated_time was not specified but it is required when building Experiment",
                )
            })?,
            schedule: self.schedule,
            execution: self.execution,
            treatments: self.treatments,
            metric_goals: self.metric_goals,
            randomization_salt: self.randomization_salt,
            sampling_rate: self.sampling_rate.unwrap_or_default(),
            segment: self.segment,
            r#type: self.r#type.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "r#type",
                    "r#type was not specified but it is required when building Experiment",
                )
            })?,
            online_ab_definition: self.online_ab_definition,
            tags: self.tags,
        })
    }
}