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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>This structure contains the configuration details of one Evidently launch.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Launch {
    /// <p>The ARN of the launch.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The name of the launch.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The name or ARN of the project that contains the launch.</p>
    pub project: ::std::option::Option<::std::string::String>,
    /// <p>The current state of the launch.</p>
    pub status: ::std::option::Option<crate::types::LaunchStatus>,
    /// <p>If the launch was stopped, this is the string that was entered by the person who stopped the launch, to explain why it was stopped.</p>
    pub status_reason: ::std::option::Option<::std::string::String>,
    /// <p>The description of the launch.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The date and time that the launch is created.</p>
    pub created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date and time that the launch was most recently updated.</p>
    pub last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>A structure that contains information about the start and end times of the launch.</p>
    pub execution: ::std::option::Option<crate::types::LaunchExecution>,
    /// <p>An array of structures that define the feature variations that are being used in the launch.</p>
    pub groups: ::std::option::Option<::std::vec::Vec<crate::types::LaunchGroup>>,
    /// <p>An array of structures that define the metrics that are being used to monitor the launch performance.</p>
    pub metric_monitors: ::std::option::Option<::std::vec::Vec<crate::types::MetricMonitor>>,
    /// <p>This value is used when Evidently assigns a particular user session to the launch, to help 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>The type of launch.</p>
    pub r#type: ::std::option::Option<crate::types::LaunchType>,
    /// <p>An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch.</p>
    pub scheduled_splits_definition: ::std::option::Option<crate::types::ScheduledSplitsLaunchDefinition>,
    /// <p>The list of tag keys and values associated with this launch.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl Launch {
    /// <p>The ARN of the launch.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The name of the launch.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The name or ARN of the project that contains the launch.</p>
    pub fn project(&self) -> ::std::option::Option<&str> {
        self.project.as_deref()
    }
    /// <p>The current state of the launch.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::LaunchStatus> {
        self.status.as_ref()
    }
    /// <p>If the launch was stopped, this is the string that was entered by the person who stopped the launch, to explain why it was stopped.</p>
    pub fn status_reason(&self) -> ::std::option::Option<&str> {
        self.status_reason.as_deref()
    }
    /// <p>The description of the launch.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The date and time that the launch is created.</p>
    pub fn created_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_time.as_ref()
    }
    /// <p>The date and time that the launch was most recently updated.</p>
    pub fn last_updated_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated_time.as_ref()
    }
    /// <p>A structure that contains information about the start and end times of the launch.</p>
    pub fn execution(&self) -> ::std::option::Option<&crate::types::LaunchExecution> {
        self.execution.as_ref()
    }
    /// <p>An array of structures that define the feature variations that are being used in the launch.</p>
    pub fn groups(&self) -> ::std::option::Option<&[crate::types::LaunchGroup]> {
        self.groups.as_deref()
    }
    /// <p>An array of structures that define the metrics that are being used to monitor the launch performance.</p>
    pub fn metric_monitors(&self) -> ::std::option::Option<&[crate::types::MetricMonitor]> {
        self.metric_monitors.as_deref()
    }
    /// <p>This value is used when Evidently assigns a particular user session to the launch, to help 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>The type of launch.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::LaunchType> {
        self.r#type.as_ref()
    }
    /// <p>An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch.</p>
    pub fn scheduled_splits_definition(&self) -> ::std::option::Option<&crate::types::ScheduledSplitsLaunchDefinition> {
        self.scheduled_splits_definition.as_ref()
    }
    /// <p>The list of tag keys and values associated with this launch.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl Launch {
    /// Creates a new builder-style object to manufacture [`Launch`](crate::types::Launch).
    pub fn builder() -> crate::types::builders::LaunchBuilder {
        crate::types::builders::LaunchBuilder::default()
    }
}

/// A builder for [`Launch`](crate::types::Launch).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct LaunchBuilder {
    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::LaunchStatus>,
    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) execution: ::std::option::Option<crate::types::LaunchExecution>,
    pub(crate) groups: ::std::option::Option<::std::vec::Vec<crate::types::LaunchGroup>>,
    pub(crate) metric_monitors: ::std::option::Option<::std::vec::Vec<crate::types::MetricMonitor>>,
    pub(crate) randomization_salt: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<crate::types::LaunchType>,
    pub(crate) scheduled_splits_definition: ::std::option::Option<crate::types::ScheduledSplitsLaunchDefinition>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl LaunchBuilder {
    /// <p>The ARN of the launch.</p>
    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 launch.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The ARN of the launch.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The name of the launch.</p>
    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 launch.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the launch.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The name or ARN of the project that contains the launch.</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 the launch.</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 the launch.</p>
    pub fn get_project(&self) -> &::std::option::Option<::std::string::String> {
        &self.project
    }
    /// <p>The current state of the launch.</p>
    pub fn status(mut self, input: crate::types::LaunchStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current state of the launch.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::LaunchStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The current state of the launch.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::LaunchStatus> {
        &self.status
    }
    /// <p>If the launch was stopped, this is the string that was entered by the person who stopped the launch, 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 launch was stopped, this is the string that was entered by the person who stopped the launch, 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 launch was stopped, this is the string that was entered by the person who stopped the launch, to explain why it was stopped.</p>
    pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_reason
    }
    /// <p>The description of the launch.</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>The description of the launch.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the launch.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The date and time that the launch is created.</p>
    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 launch is 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 launch is 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 launch was most recently updated.</p>
    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 launch 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 launch 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 information about the start and end times of the launch.</p>
    pub fn execution(mut self, input: crate::types::LaunchExecution) -> Self {
        self.execution = ::std::option::Option::Some(input);
        self
    }
    /// <p>A structure that contains information about the start and end times of the launch.</p>
    pub fn set_execution(mut self, input: ::std::option::Option<crate::types::LaunchExecution>) -> Self {
        self.execution = input;
        self
    }
    /// <p>A structure that contains information about the start and end times of the launch.</p>
    pub fn get_execution(&self) -> &::std::option::Option<crate::types::LaunchExecution> {
        &self.execution
    }
    /// Appends an item to `groups`.
    ///
    /// To override the contents of this collection use [`set_groups`](Self::set_groups).
    ///
    /// <p>An array of structures that define the feature variations that are being used in the launch.</p>
    pub fn groups(mut self, input: crate::types::LaunchGroup) -> Self {
        let mut v = self.groups.unwrap_or_default();
        v.push(input);
        self.groups = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of structures that define the feature variations that are being used in the launch.</p>
    pub fn set_groups(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::LaunchGroup>>) -> Self {
        self.groups = input;
        self
    }
    /// <p>An array of structures that define the feature variations that are being used in the launch.</p>
    pub fn get_groups(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LaunchGroup>> {
        &self.groups
    }
    /// Appends an item to `metric_monitors`.
    ///
    /// To override the contents of this collection use [`set_metric_monitors`](Self::set_metric_monitors).
    ///
    /// <p>An array of structures that define the metrics that are being used to monitor the launch performance.</p>
    pub fn metric_monitors(mut self, input: crate::types::MetricMonitor) -> Self {
        let mut v = self.metric_monitors.unwrap_or_default();
        v.push(input);
        self.metric_monitors = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of structures that define the metrics that are being used to monitor the launch performance.</p>
    pub fn set_metric_monitors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MetricMonitor>>) -> Self {
        self.metric_monitors = input;
        self
    }
    /// <p>An array of structures that define the metrics that are being used to monitor the launch performance.</p>
    pub fn get_metric_monitors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MetricMonitor>> {
        &self.metric_monitors
    }
    /// <p>This value is used when Evidently assigns a particular user session to the launch, to help 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 launch, to help 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 launch, to help 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>The type of launch.</p>
    pub fn r#type(mut self, input: crate::types::LaunchType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of launch.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::LaunchType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of launch.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::LaunchType> {
        &self.r#type
    }
    /// <p>An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch.</p>
    pub fn scheduled_splits_definition(mut self, input: crate::types::ScheduledSplitsLaunchDefinition) -> Self {
        self.scheduled_splits_definition = ::std::option::Option::Some(input);
        self
    }
    /// <p>An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch.</p>
    pub fn set_scheduled_splits_definition(mut self, input: ::std::option::Option<crate::types::ScheduledSplitsLaunchDefinition>) -> Self {
        self.scheduled_splits_definition = input;
        self
    }
    /// <p>An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch.</p>
    pub fn get_scheduled_splits_definition(&self) -> &::std::option::Option<crate::types::ScheduledSplitsLaunchDefinition> {
        &self.scheduled_splits_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 launch.</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 launch.</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 launch.</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 [`Launch`](crate::types::Launch).
    pub fn build(self) -> crate::types::Launch {
        crate::types::Launch {
            arn: self.arn,
            name: self.name,
            project: self.project,
            status: self.status,
            status_reason: self.status_reason,
            description: self.description,
            created_time: self.created_time,
            last_updated_time: self.last_updated_time,
            execution: self.execution,
            groups: self.groups,
            metric_monitors: self.metric_monitors,
            randomization_salt: self.randomization_salt,
            r#type: self.r#type,
            scheduled_splits_definition: self.scheduled_splits_definition,
            tags: self.tags,
        }
    }
}