aws-sdk-medialive 1.76.0

AWS SDK for AWS Elemental MediaLive
Documentation
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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Reserved resources available to use
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Reservation {
    /// Unique reservation ARN, e.g. 'arn:aws:medialive:us-west-2:123456789012:reservation:1234567'
    pub arn: ::std::option::Option<::std::string::String>,
    /// Number of reserved resources
    pub count: ::std::option::Option<i32>,
    /// Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD'
    pub currency_code: ::std::option::Option<::std::string::String>,
    /// Lease duration, e.g. '12'
    pub duration: ::std::option::Option<i32>,
    /// Units for duration, e.g. 'MONTHS'
    pub duration_units: ::std::option::Option<crate::types::OfferingDurationUnits>,
    /// Reservation UTC end date and time in ISO-8601 format, e.g. '2019-03-01T00:00:00'
    pub end: ::std::option::Option<::std::string::String>,
    /// One-time charge for each reserved resource, e.g. '0.0' for a NO_UPFRONT offering
    pub fixed_price: ::std::option::Option<f64>,
    /// User specified reservation name
    pub name: ::std::option::Option<::std::string::String>,
    /// Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard VQ in US West (Oregon)'
    pub offering_description: ::std::option::Option<::std::string::String>,
    /// Unique offering ID, e.g. '87654321'
    pub offering_id: ::std::option::Option<::std::string::String>,
    /// Offering type, e.g. 'NO_UPFRONT'
    pub offering_type: ::std::option::Option<crate::types::OfferingType>,
    /// AWS region, e.g. 'us-west-2'
    pub region: ::std::option::Option<::std::string::String>,
    /// Renewal settings for the reservation
    pub renewal_settings: ::std::option::Option<crate::types::RenewalSettings>,
    /// Unique reservation ID, e.g. '1234567'
    pub reservation_id: ::std::option::Option<::std::string::String>,
    /// Resource configuration details
    pub resource_specification: ::std::option::Option<crate::types::ReservationResourceSpecification>,
    /// Reservation UTC start date and time in ISO-8601 format, e.g. '2018-03-01T00:00:00'
    pub start: ::std::option::Option<::std::string::String>,
    /// Current state of reservation, e.g. 'ACTIVE'
    pub state: ::std::option::Option<crate::types::ReservationState>,
    /// A collection of key-value pairs
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// Recurring usage charge for each reserved resource, e.g. '157.0'
    pub usage_price: ::std::option::Option<f64>,
}
impl Reservation {
    /// Unique reservation ARN, e.g. 'arn:aws:medialive:us-west-2:123456789012:reservation:1234567'
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// Number of reserved resources
    pub fn count(&self) -> ::std::option::Option<i32> {
        self.count
    }
    /// Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD'
    pub fn currency_code(&self) -> ::std::option::Option<&str> {
        self.currency_code.as_deref()
    }
    /// Lease duration, e.g. '12'
    pub fn duration(&self) -> ::std::option::Option<i32> {
        self.duration
    }
    /// Units for duration, e.g. 'MONTHS'
    pub fn duration_units(&self) -> ::std::option::Option<&crate::types::OfferingDurationUnits> {
        self.duration_units.as_ref()
    }
    /// Reservation UTC end date and time in ISO-8601 format, e.g. '2019-03-01T00:00:00'
    pub fn end(&self) -> ::std::option::Option<&str> {
        self.end.as_deref()
    }
    /// One-time charge for each reserved resource, e.g. '0.0' for a NO_UPFRONT offering
    pub fn fixed_price(&self) -> ::std::option::Option<f64> {
        self.fixed_price
    }
    /// User specified reservation name
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard VQ in US West (Oregon)'
    pub fn offering_description(&self) -> ::std::option::Option<&str> {
        self.offering_description.as_deref()
    }
    /// Unique offering ID, e.g. '87654321'
    pub fn offering_id(&self) -> ::std::option::Option<&str> {
        self.offering_id.as_deref()
    }
    /// Offering type, e.g. 'NO_UPFRONT'
    pub fn offering_type(&self) -> ::std::option::Option<&crate::types::OfferingType> {
        self.offering_type.as_ref()
    }
    /// AWS region, e.g. 'us-west-2'
    pub fn region(&self) -> ::std::option::Option<&str> {
        self.region.as_deref()
    }
    /// Renewal settings for the reservation
    pub fn renewal_settings(&self) -> ::std::option::Option<&crate::types::RenewalSettings> {
        self.renewal_settings.as_ref()
    }
    /// Unique reservation ID, e.g. '1234567'
    pub fn reservation_id(&self) -> ::std::option::Option<&str> {
        self.reservation_id.as_deref()
    }
    /// Resource configuration details
    pub fn resource_specification(&self) -> ::std::option::Option<&crate::types::ReservationResourceSpecification> {
        self.resource_specification.as_ref()
    }
    /// Reservation UTC start date and time in ISO-8601 format, e.g. '2018-03-01T00:00:00'
    pub fn start(&self) -> ::std::option::Option<&str> {
        self.start.as_deref()
    }
    /// Current state of reservation, e.g. 'ACTIVE'
    pub fn state(&self) -> ::std::option::Option<&crate::types::ReservationState> {
        self.state.as_ref()
    }
    /// A collection of key-value pairs
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// Recurring usage charge for each reserved resource, e.g. '157.0'
    pub fn usage_price(&self) -> ::std::option::Option<f64> {
        self.usage_price
    }
}
impl Reservation {
    /// Creates a new builder-style object to manufacture [`Reservation`](crate::types::Reservation).
    pub fn builder() -> crate::types::builders::ReservationBuilder {
        crate::types::builders::ReservationBuilder::default()
    }
}

/// A builder for [`Reservation`](crate::types::Reservation).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ReservationBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) count: ::std::option::Option<i32>,
    pub(crate) currency_code: ::std::option::Option<::std::string::String>,
    pub(crate) duration: ::std::option::Option<i32>,
    pub(crate) duration_units: ::std::option::Option<crate::types::OfferingDurationUnits>,
    pub(crate) end: ::std::option::Option<::std::string::String>,
    pub(crate) fixed_price: ::std::option::Option<f64>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) offering_description: ::std::option::Option<::std::string::String>,
    pub(crate) offering_id: ::std::option::Option<::std::string::String>,
    pub(crate) offering_type: ::std::option::Option<crate::types::OfferingType>,
    pub(crate) region: ::std::option::Option<::std::string::String>,
    pub(crate) renewal_settings: ::std::option::Option<crate::types::RenewalSettings>,
    pub(crate) reservation_id: ::std::option::Option<::std::string::String>,
    pub(crate) resource_specification: ::std::option::Option<crate::types::ReservationResourceSpecification>,
    pub(crate) start: ::std::option::Option<::std::string::String>,
    pub(crate) state: ::std::option::Option<crate::types::ReservationState>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) usage_price: ::std::option::Option<f64>,
}
impl ReservationBuilder {
    /// Unique reservation ARN, e.g. 'arn:aws:medialive:us-west-2:123456789012:reservation:1234567'
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// Unique reservation ARN, e.g. 'arn:aws:medialive:us-west-2:123456789012:reservation:1234567'
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// Unique reservation ARN, e.g. 'arn:aws:medialive:us-west-2:123456789012:reservation:1234567'
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// Number of reserved resources
    pub fn count(mut self, input: i32) -> Self {
        self.count = ::std::option::Option::Some(input);
        self
    }
    /// Number of reserved resources
    pub fn set_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.count = input;
        self
    }
    /// Number of reserved resources
    pub fn get_count(&self) -> &::std::option::Option<i32> {
        &self.count
    }
    /// Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD'
    pub fn currency_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.currency_code = ::std::option::Option::Some(input.into());
        self
    }
    /// Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD'
    pub fn set_currency_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.currency_code = input;
        self
    }
    /// Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD'
    pub fn get_currency_code(&self) -> &::std::option::Option<::std::string::String> {
        &self.currency_code
    }
    /// Lease duration, e.g. '12'
    pub fn duration(mut self, input: i32) -> Self {
        self.duration = ::std::option::Option::Some(input);
        self
    }
    /// Lease duration, e.g. '12'
    pub fn set_duration(mut self, input: ::std::option::Option<i32>) -> Self {
        self.duration = input;
        self
    }
    /// Lease duration, e.g. '12'
    pub fn get_duration(&self) -> &::std::option::Option<i32> {
        &self.duration
    }
    /// Units for duration, e.g. 'MONTHS'
    pub fn duration_units(mut self, input: crate::types::OfferingDurationUnits) -> Self {
        self.duration_units = ::std::option::Option::Some(input);
        self
    }
    /// Units for duration, e.g. 'MONTHS'
    pub fn set_duration_units(mut self, input: ::std::option::Option<crate::types::OfferingDurationUnits>) -> Self {
        self.duration_units = input;
        self
    }
    /// Units for duration, e.g. 'MONTHS'
    pub fn get_duration_units(&self) -> &::std::option::Option<crate::types::OfferingDurationUnits> {
        &self.duration_units
    }
    /// Reservation UTC end date and time in ISO-8601 format, e.g. '2019-03-01T00:00:00'
    pub fn end(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.end = ::std::option::Option::Some(input.into());
        self
    }
    /// Reservation UTC end date and time in ISO-8601 format, e.g. '2019-03-01T00:00:00'
    pub fn set_end(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.end = input;
        self
    }
    /// Reservation UTC end date and time in ISO-8601 format, e.g. '2019-03-01T00:00:00'
    pub fn get_end(&self) -> &::std::option::Option<::std::string::String> {
        &self.end
    }
    /// One-time charge for each reserved resource, e.g. '0.0' for a NO_UPFRONT offering
    pub fn fixed_price(mut self, input: f64) -> Self {
        self.fixed_price = ::std::option::Option::Some(input);
        self
    }
    /// One-time charge for each reserved resource, e.g. '0.0' for a NO_UPFRONT offering
    pub fn set_fixed_price(mut self, input: ::std::option::Option<f64>) -> Self {
        self.fixed_price = input;
        self
    }
    /// One-time charge for each reserved resource, e.g. '0.0' for a NO_UPFRONT offering
    pub fn get_fixed_price(&self) -> &::std::option::Option<f64> {
        &self.fixed_price
    }
    /// User specified reservation name
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// User specified reservation name
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// User specified reservation name
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard VQ in US West (Oregon)'
    pub fn offering_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.offering_description = ::std::option::Option::Some(input.into());
        self
    }
    /// Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard VQ in US West (Oregon)'
    pub fn set_offering_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.offering_description = input;
        self
    }
    /// Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard VQ in US West (Oregon)'
    pub fn get_offering_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.offering_description
    }
    /// Unique offering ID, e.g. '87654321'
    pub fn offering_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.offering_id = ::std::option::Option::Some(input.into());
        self
    }
    /// Unique offering ID, e.g. '87654321'
    pub fn set_offering_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.offering_id = input;
        self
    }
    /// Unique offering ID, e.g. '87654321'
    pub fn get_offering_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.offering_id
    }
    /// Offering type, e.g. 'NO_UPFRONT'
    pub fn offering_type(mut self, input: crate::types::OfferingType) -> Self {
        self.offering_type = ::std::option::Option::Some(input);
        self
    }
    /// Offering type, e.g. 'NO_UPFRONT'
    pub fn set_offering_type(mut self, input: ::std::option::Option<crate::types::OfferingType>) -> Self {
        self.offering_type = input;
        self
    }
    /// Offering type, e.g. 'NO_UPFRONT'
    pub fn get_offering_type(&self) -> &::std::option::Option<crate::types::OfferingType> {
        &self.offering_type
    }
    /// AWS region, e.g. 'us-west-2'
    pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.region = ::std::option::Option::Some(input.into());
        self
    }
    /// AWS region, e.g. 'us-west-2'
    pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.region = input;
        self
    }
    /// AWS region, e.g. 'us-west-2'
    pub fn get_region(&self) -> &::std::option::Option<::std::string::String> {
        &self.region
    }
    /// Renewal settings for the reservation
    pub fn renewal_settings(mut self, input: crate::types::RenewalSettings) -> Self {
        self.renewal_settings = ::std::option::Option::Some(input);
        self
    }
    /// Renewal settings for the reservation
    pub fn set_renewal_settings(mut self, input: ::std::option::Option<crate::types::RenewalSettings>) -> Self {
        self.renewal_settings = input;
        self
    }
    /// Renewal settings for the reservation
    pub fn get_renewal_settings(&self) -> &::std::option::Option<crate::types::RenewalSettings> {
        &self.renewal_settings
    }
    /// Unique reservation ID, e.g. '1234567'
    pub fn reservation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.reservation_id = ::std::option::Option::Some(input.into());
        self
    }
    /// Unique reservation ID, e.g. '1234567'
    pub fn set_reservation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.reservation_id = input;
        self
    }
    /// Unique reservation ID, e.g. '1234567'
    pub fn get_reservation_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.reservation_id
    }
    /// Resource configuration details
    pub fn resource_specification(mut self, input: crate::types::ReservationResourceSpecification) -> Self {
        self.resource_specification = ::std::option::Option::Some(input);
        self
    }
    /// Resource configuration details
    pub fn set_resource_specification(mut self, input: ::std::option::Option<crate::types::ReservationResourceSpecification>) -> Self {
        self.resource_specification = input;
        self
    }
    /// Resource configuration details
    pub fn get_resource_specification(&self) -> &::std::option::Option<crate::types::ReservationResourceSpecification> {
        &self.resource_specification
    }
    /// Reservation UTC start date and time in ISO-8601 format, e.g. '2018-03-01T00:00:00'
    pub fn start(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.start = ::std::option::Option::Some(input.into());
        self
    }
    /// Reservation UTC start date and time in ISO-8601 format, e.g. '2018-03-01T00:00:00'
    pub fn set_start(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.start = input;
        self
    }
    /// Reservation UTC start date and time in ISO-8601 format, e.g. '2018-03-01T00:00:00'
    pub fn get_start(&self) -> &::std::option::Option<::std::string::String> {
        &self.start
    }
    /// Current state of reservation, e.g. 'ACTIVE'
    pub fn state(mut self, input: crate::types::ReservationState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// Current state of reservation, e.g. 'ACTIVE'
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::ReservationState>) -> Self {
        self.state = input;
        self
    }
    /// Current state of reservation, e.g. 'ACTIVE'
    pub fn get_state(&self) -> &::std::option::Option<crate::types::ReservationState> {
        &self.state
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// A collection of key-value pairs
    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
    }
    /// A collection of key-value pairs
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// A collection of key-value pairs
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Recurring usage charge for each reserved resource, e.g. '157.0'
    pub fn usage_price(mut self, input: f64) -> Self {
        self.usage_price = ::std::option::Option::Some(input);
        self
    }
    /// Recurring usage charge for each reserved resource, e.g. '157.0'
    pub fn set_usage_price(mut self, input: ::std::option::Option<f64>) -> Self {
        self.usage_price = input;
        self
    }
    /// Recurring usage charge for each reserved resource, e.g. '157.0'
    pub fn get_usage_price(&self) -> &::std::option::Option<f64> {
        &self.usage_price
    }
    /// Consumes the builder and constructs a [`Reservation`](crate::types::Reservation).
    pub fn build(self) -> crate::types::Reservation {
        crate::types::Reservation {
            arn: self.arn,
            count: self.count,
            currency_code: self.currency_code,
            duration: self.duration,
            duration_units: self.duration_units,
            end: self.end,
            fixed_price: self.fixed_price,
            name: self.name,
            offering_description: self.offering_description,
            offering_id: self.offering_id,
            offering_type: self.offering_type,
            region: self.region,
            renewal_settings: self.renewal_settings,
            reservation_id: self.reservation_id,
            resource_specification: self.resource_specification,
            start: self.start,
            state: self.state,
            tags: self.tags,
            usage_price: self.usage_price,
        }
    }
}