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

/// Placeholder documentation for Channel
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Channel {
    /// The unique arn of the channel.
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// Specification of CDI inputs for this channel
    #[doc(hidden)]
    pub cdi_input_specification: std::option::Option<crate::types::CdiInputSpecification>,
    /// The class for this channel. STANDARD for a channel with two pipelines or SINGLE_PIPELINE for a channel with one pipeline.
    #[doc(hidden)]
    pub channel_class: std::option::Option<crate::types::ChannelClass>,
    /// A list of destinations of the channel. For UDP outputs, there is one destination per output. For other types (HLS, for example), there is one destination per packager.
    #[doc(hidden)]
    pub destinations: std::option::Option<std::vec::Vec<crate::types::OutputDestination>>,
    /// The endpoints where outgoing connections initiate from
    #[doc(hidden)]
    pub egress_endpoints: std::option::Option<std::vec::Vec<crate::types::ChannelEgressEndpoint>>,
    /// Encoder Settings
    #[doc(hidden)]
    pub encoder_settings: std::option::Option<crate::types::EncoderSettings>,
    /// The unique id of the channel.
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// List of input attachments for channel.
    #[doc(hidden)]
    pub input_attachments: std::option::Option<std::vec::Vec<crate::types::InputAttachment>>,
    /// Specification of network and file inputs for this channel
    #[doc(hidden)]
    pub input_specification: std::option::Option<crate::types::InputSpecification>,
    /// The log level being written to CloudWatch Logs.
    #[doc(hidden)]
    pub log_level: std::option::Option<crate::types::LogLevel>,
    /// Maintenance settings for this channel.
    #[doc(hidden)]
    pub maintenance: std::option::Option<crate::types::MaintenanceStatus>,
    /// The name of the channel. (user-mutable)
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// Runtime details for the pipelines of a running channel.
    #[doc(hidden)]
    pub pipeline_details: std::option::Option<std::vec::Vec<crate::types::PipelineDetail>>,
    /// The number of currently healthy pipelines.
    #[doc(hidden)]
    pub pipelines_running_count: i32,
    /// The Amazon Resource Name (ARN) of the role assumed when running the Channel.
    #[doc(hidden)]
    pub role_arn: std::option::Option<std::string::String>,
    /// Placeholder documentation for ChannelState
    #[doc(hidden)]
    pub state: std::option::Option<crate::types::ChannelState>,
    /// A collection of key-value pairs.
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// Settings for VPC output
    #[doc(hidden)]
    pub vpc: std::option::Option<crate::types::VpcOutputSettingsDescription>,
}
impl Channel {
    /// The unique arn of the channel.
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// Specification of CDI inputs for this channel
    pub fn cdi_input_specification(
        &self,
    ) -> std::option::Option<&crate::types::CdiInputSpecification> {
        self.cdi_input_specification.as_ref()
    }
    /// The class for this channel. STANDARD for a channel with two pipelines or SINGLE_PIPELINE for a channel with one pipeline.
    pub fn channel_class(&self) -> std::option::Option<&crate::types::ChannelClass> {
        self.channel_class.as_ref()
    }
    /// A list of destinations of the channel. For UDP outputs, there is one destination per output. For other types (HLS, for example), there is one destination per packager.
    pub fn destinations(&self) -> std::option::Option<&[crate::types::OutputDestination]> {
        self.destinations.as_deref()
    }
    /// The endpoints where outgoing connections initiate from
    pub fn egress_endpoints(&self) -> std::option::Option<&[crate::types::ChannelEgressEndpoint]> {
        self.egress_endpoints.as_deref()
    }
    /// Encoder Settings
    pub fn encoder_settings(&self) -> std::option::Option<&crate::types::EncoderSettings> {
        self.encoder_settings.as_ref()
    }
    /// The unique id of the channel.
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// List of input attachments for channel.
    pub fn input_attachments(&self) -> std::option::Option<&[crate::types::InputAttachment]> {
        self.input_attachments.as_deref()
    }
    /// Specification of network and file inputs for this channel
    pub fn input_specification(&self) -> std::option::Option<&crate::types::InputSpecification> {
        self.input_specification.as_ref()
    }
    /// The log level being written to CloudWatch Logs.
    pub fn log_level(&self) -> std::option::Option<&crate::types::LogLevel> {
        self.log_level.as_ref()
    }
    /// Maintenance settings for this channel.
    pub fn maintenance(&self) -> std::option::Option<&crate::types::MaintenanceStatus> {
        self.maintenance.as_ref()
    }
    /// The name of the channel. (user-mutable)
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// Runtime details for the pipelines of a running channel.
    pub fn pipeline_details(&self) -> std::option::Option<&[crate::types::PipelineDetail]> {
        self.pipeline_details.as_deref()
    }
    /// The number of currently healthy pipelines.
    pub fn pipelines_running_count(&self) -> i32 {
        self.pipelines_running_count
    }
    /// The Amazon Resource Name (ARN) of the role assumed when running the Channel.
    pub fn role_arn(&self) -> std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// Placeholder documentation for ChannelState
    pub fn state(&self) -> std::option::Option<&crate::types::ChannelState> {
        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()
    }
    /// Settings for VPC output
    pub fn vpc(&self) -> std::option::Option<&crate::types::VpcOutputSettingsDescription> {
        self.vpc.as_ref()
    }
}
impl Channel {
    /// Creates a new builder-style object to manufacture [`Channel`](crate::types::Channel).
    pub fn builder() -> crate::types::builders::ChannelBuilder {
        crate::types::builders::ChannelBuilder::default()
    }
}

/// A builder for [`Channel`](crate::types::Channel).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ChannelBuilder {
    pub(crate) arn: std::option::Option<std::string::String>,
    pub(crate) cdi_input_specification: std::option::Option<crate::types::CdiInputSpecification>,
    pub(crate) channel_class: std::option::Option<crate::types::ChannelClass>,
    pub(crate) destinations: std::option::Option<std::vec::Vec<crate::types::OutputDestination>>,
    pub(crate) egress_endpoints:
        std::option::Option<std::vec::Vec<crate::types::ChannelEgressEndpoint>>,
    pub(crate) encoder_settings: std::option::Option<crate::types::EncoderSettings>,
    pub(crate) id: std::option::Option<std::string::String>,
    pub(crate) input_attachments: std::option::Option<std::vec::Vec<crate::types::InputAttachment>>,
    pub(crate) input_specification: std::option::Option<crate::types::InputSpecification>,
    pub(crate) log_level: std::option::Option<crate::types::LogLevel>,
    pub(crate) maintenance: std::option::Option<crate::types::MaintenanceStatus>,
    pub(crate) name: std::option::Option<std::string::String>,
    pub(crate) pipeline_details: std::option::Option<std::vec::Vec<crate::types::PipelineDetail>>,
    pub(crate) pipelines_running_count: std::option::Option<i32>,
    pub(crate) role_arn: std::option::Option<std::string::String>,
    pub(crate) state: std::option::Option<crate::types::ChannelState>,
    pub(crate) tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    pub(crate) vpc: std::option::Option<crate::types::VpcOutputSettingsDescription>,
}
impl ChannelBuilder {
    /// The unique arn of the channel.
    pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.arn = Some(input.into());
        self
    }
    /// The unique arn of the channel.
    pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// Specification of CDI inputs for this channel
    pub fn cdi_input_specification(mut self, input: crate::types::CdiInputSpecification) -> Self {
        self.cdi_input_specification = Some(input);
        self
    }
    /// Specification of CDI inputs for this channel
    pub fn set_cdi_input_specification(
        mut self,
        input: std::option::Option<crate::types::CdiInputSpecification>,
    ) -> Self {
        self.cdi_input_specification = input;
        self
    }
    /// The class for this channel. STANDARD for a channel with two pipelines or SINGLE_PIPELINE for a channel with one pipeline.
    pub fn channel_class(mut self, input: crate::types::ChannelClass) -> Self {
        self.channel_class = Some(input);
        self
    }
    /// The class for this channel. STANDARD for a channel with two pipelines or SINGLE_PIPELINE for a channel with one pipeline.
    pub fn set_channel_class(
        mut self,
        input: std::option::Option<crate::types::ChannelClass>,
    ) -> Self {
        self.channel_class = input;
        self
    }
    /// Appends an item to `destinations`.
    ///
    /// To override the contents of this collection use [`set_destinations`](Self::set_destinations).
    ///
    /// A list of destinations of the channel. For UDP outputs, there is one destination per output. For other types (HLS, for example), there is one destination per packager.
    pub fn destinations(mut self, input: crate::types::OutputDestination) -> Self {
        let mut v = self.destinations.unwrap_or_default();
        v.push(input);
        self.destinations = Some(v);
        self
    }
    /// A list of destinations of the channel. For UDP outputs, there is one destination per output. For other types (HLS, for example), there is one destination per packager.
    pub fn set_destinations(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::OutputDestination>>,
    ) -> Self {
        self.destinations = input;
        self
    }
    /// Appends an item to `egress_endpoints`.
    ///
    /// To override the contents of this collection use [`set_egress_endpoints`](Self::set_egress_endpoints).
    ///
    /// The endpoints where outgoing connections initiate from
    pub fn egress_endpoints(mut self, input: crate::types::ChannelEgressEndpoint) -> Self {
        let mut v = self.egress_endpoints.unwrap_or_default();
        v.push(input);
        self.egress_endpoints = Some(v);
        self
    }
    /// The endpoints where outgoing connections initiate from
    pub fn set_egress_endpoints(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::ChannelEgressEndpoint>>,
    ) -> Self {
        self.egress_endpoints = input;
        self
    }
    /// Encoder Settings
    pub fn encoder_settings(mut self, input: crate::types::EncoderSettings) -> Self {
        self.encoder_settings = Some(input);
        self
    }
    /// Encoder Settings
    pub fn set_encoder_settings(
        mut self,
        input: std::option::Option<crate::types::EncoderSettings>,
    ) -> Self {
        self.encoder_settings = input;
        self
    }
    /// The unique id of the channel.
    pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
        self.id = Some(input.into());
        self
    }
    /// The unique id of the channel.
    pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// Appends an item to `input_attachments`.
    ///
    /// To override the contents of this collection use [`set_input_attachments`](Self::set_input_attachments).
    ///
    /// List of input attachments for channel.
    pub fn input_attachments(mut self, input: crate::types::InputAttachment) -> Self {
        let mut v = self.input_attachments.unwrap_or_default();
        v.push(input);
        self.input_attachments = Some(v);
        self
    }
    /// List of input attachments for channel.
    pub fn set_input_attachments(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::InputAttachment>>,
    ) -> Self {
        self.input_attachments = input;
        self
    }
    /// Specification of network and file inputs for this channel
    pub fn input_specification(mut self, input: crate::types::InputSpecification) -> Self {
        self.input_specification = Some(input);
        self
    }
    /// Specification of network and file inputs for this channel
    pub fn set_input_specification(
        mut self,
        input: std::option::Option<crate::types::InputSpecification>,
    ) -> Self {
        self.input_specification = input;
        self
    }
    /// The log level being written to CloudWatch Logs.
    pub fn log_level(mut self, input: crate::types::LogLevel) -> Self {
        self.log_level = Some(input);
        self
    }
    /// The log level being written to CloudWatch Logs.
    pub fn set_log_level(mut self, input: std::option::Option<crate::types::LogLevel>) -> Self {
        self.log_level = input;
        self
    }
    /// Maintenance settings for this channel.
    pub fn maintenance(mut self, input: crate::types::MaintenanceStatus) -> Self {
        self.maintenance = Some(input);
        self
    }
    /// Maintenance settings for this channel.
    pub fn set_maintenance(
        mut self,
        input: std::option::Option<crate::types::MaintenanceStatus>,
    ) -> Self {
        self.maintenance = input;
        self
    }
    /// The name of the channel. (user-mutable)
    pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
        self.name = Some(input.into());
        self
    }
    /// The name of the channel. (user-mutable)
    pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// Appends an item to `pipeline_details`.
    ///
    /// To override the contents of this collection use [`set_pipeline_details`](Self::set_pipeline_details).
    ///
    /// Runtime details for the pipelines of a running channel.
    pub fn pipeline_details(mut self, input: crate::types::PipelineDetail) -> Self {
        let mut v = self.pipeline_details.unwrap_or_default();
        v.push(input);
        self.pipeline_details = Some(v);
        self
    }
    /// Runtime details for the pipelines of a running channel.
    pub fn set_pipeline_details(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::PipelineDetail>>,
    ) -> Self {
        self.pipeline_details = input;
        self
    }
    /// The number of currently healthy pipelines.
    pub fn pipelines_running_count(mut self, input: i32) -> Self {
        self.pipelines_running_count = Some(input);
        self
    }
    /// The number of currently healthy pipelines.
    pub fn set_pipelines_running_count(mut self, input: std::option::Option<i32>) -> Self {
        self.pipelines_running_count = input;
        self
    }
    /// The Amazon Resource Name (ARN) of the role assumed when running the Channel.
    pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.role_arn = Some(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) of the role assumed when running the Channel.
    pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.role_arn = input;
        self
    }
    /// Placeholder documentation for ChannelState
    pub fn state(mut self, input: crate::types::ChannelState) -> Self {
        self.state = Some(input);
        self
    }
    /// Placeholder documentation for ChannelState
    pub fn set_state(mut self, input: std::option::Option<crate::types::ChannelState>) -> Self {
        self.state = input;
        self
    }
    /// 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 Into<std::string::String>,
        v: impl Into<std::string::String>,
    ) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = 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
    }
    /// Settings for VPC output
    pub fn vpc(mut self, input: crate::types::VpcOutputSettingsDescription) -> Self {
        self.vpc = Some(input);
        self
    }
    /// Settings for VPC output
    pub fn set_vpc(
        mut self,
        input: std::option::Option<crate::types::VpcOutputSettingsDescription>,
    ) -> Self {
        self.vpc = input;
        self
    }
    /// Consumes the builder and constructs a [`Channel`](crate::types::Channel).
    pub fn build(self) -> crate::types::Channel {
        crate::types::Channel {
            arn: self.arn,
            cdi_input_specification: self.cdi_input_specification,
            channel_class: self.channel_class,
            destinations: self.destinations,
            egress_endpoints: self.egress_endpoints,
            encoder_settings: self.encoder_settings,
            id: self.id,
            input_attachments: self.input_attachments,
            input_specification: self.input_specification,
            log_level: self.log_level,
            maintenance: self.maintenance,
            name: self.name,
            pipeline_details: self.pipeline_details,
            pipelines_running_count: self.pipelines_running_count.unwrap_or_default(),
            role_arn: self.role_arn,
            state: self.state,
            tags: self.tags,
            vpc: self.vpc,
        }
    }
}