aws-sdk-mediaconnect 1.109.0

AWS SDK for AWS MediaConnect
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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateFlowInput {
    /// <p>The Availability Zone that you want to create the flow in. These options are limited to the Availability Zones within the current Amazon Web Services Region.</p>
    pub availability_zone: ::std::option::Option<::std::string::String>,
    /// <p>The entitlements that you want to grant on a flow.</p>
    pub entitlements: ::std::option::Option<::std::vec::Vec<crate::types::GrantEntitlementRequest>>,
    /// <p>The media streams that you want to add to the flow. You can associate these media streams with sources and outputs on the flow.</p>
    pub media_streams: ::std::option::Option<::std::vec::Vec<crate::types::AddMediaStreamRequest>>,
    /// <p>The name of the flow.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The outputs that you want to add to this flow.</p>
    pub outputs: ::std::option::Option<::std::vec::Vec<crate::types::AddOutputRequest>>,
    /// <p>The settings for the source that you want to use for the new flow.</p>
    pub source: ::std::option::Option<crate::types::SetSourceRequest>,
    /// <p>The settings for source failover.</p>
    pub source_failover_config: ::std::option::Option<crate::types::FailoverConfig>,
    /// <p>The sources that are assigned to the flow.</p>
    pub sources: ::std::option::Option<::std::vec::Vec<crate::types::SetSourceRequest>>,
    /// <p>The VPC interfaces you want on the flow.</p>
    pub vpc_interfaces: ::std::option::Option<::std::vec::Vec<crate::types::VpcInterfaceRequest>>,
    /// <p>The maintenance settings you want to use for the flow.</p>
    pub maintenance: ::std::option::Option<crate::types::AddMaintenance>,
    /// <p>The settings for source monitoring.</p>
    pub source_monitoring_config: ::std::option::Option<crate::types::MonitoringConfig>,
    /// <p>Determines the processing capacity and feature set of the flow. Set this optional parameter to <code>LARGE</code> if you want to enable NDI sources or outputs on the flow.</p>
    pub flow_size: ::std::option::Option<crate::types::FlowSize>,
    /// <p>Specifies the configuration settings for a flow's NDI source or output. Required when the flow includes an NDI source or output.</p>
    pub ndi_config: ::std::option::Option<crate::types::NdiConfig>,
    /// <p>The encoding configuration to apply to the NDI® source when transcoding it to a transport stream for downstream distribution. You can choose between several predefined encoding profiles based on common use cases.</p>
    pub encoding_config: ::std::option::Option<crate::types::EncodingConfig>,
    /// <p>The key-value pairs that can be used to tag and organize the flow.</p>
    pub flow_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateFlowInput {
    /// <p>The Availability Zone that you want to create the flow in. These options are limited to the Availability Zones within the current Amazon Web Services Region.</p>
    pub fn availability_zone(&self) -> ::std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The entitlements that you want to grant on a flow.</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 `.entitlements.is_none()`.
    pub fn entitlements(&self) -> &[crate::types::GrantEntitlementRequest] {
        self.entitlements.as_deref().unwrap_or_default()
    }
    /// <p>The media streams that you want to add to the flow. You can associate these media streams with sources and outputs on the flow.</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 `.media_streams.is_none()`.
    pub fn media_streams(&self) -> &[crate::types::AddMediaStreamRequest] {
        self.media_streams.as_deref().unwrap_or_default()
    }
    /// <p>The name of the flow.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The outputs that you want to add to this flow.</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 `.outputs.is_none()`.
    pub fn outputs(&self) -> &[crate::types::AddOutputRequest] {
        self.outputs.as_deref().unwrap_or_default()
    }
    /// <p>The settings for the source that you want to use for the new flow.</p>
    pub fn source(&self) -> ::std::option::Option<&crate::types::SetSourceRequest> {
        self.source.as_ref()
    }
    /// <p>The settings for source failover.</p>
    pub fn source_failover_config(&self) -> ::std::option::Option<&crate::types::FailoverConfig> {
        self.source_failover_config.as_ref()
    }
    /// <p>The sources that are assigned to the flow.</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 `.sources.is_none()`.
    pub fn sources(&self) -> &[crate::types::SetSourceRequest] {
        self.sources.as_deref().unwrap_or_default()
    }
    /// <p>The VPC interfaces you want on the flow.</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 `.vpc_interfaces.is_none()`.
    pub fn vpc_interfaces(&self) -> &[crate::types::VpcInterfaceRequest] {
        self.vpc_interfaces.as_deref().unwrap_or_default()
    }
    /// <p>The maintenance settings you want to use for the flow.</p>
    pub fn maintenance(&self) -> ::std::option::Option<&crate::types::AddMaintenance> {
        self.maintenance.as_ref()
    }
    /// <p>The settings for source monitoring.</p>
    pub fn source_monitoring_config(&self) -> ::std::option::Option<&crate::types::MonitoringConfig> {
        self.source_monitoring_config.as_ref()
    }
    /// <p>Determines the processing capacity and feature set of the flow. Set this optional parameter to <code>LARGE</code> if you want to enable NDI sources or outputs on the flow.</p>
    pub fn flow_size(&self) -> ::std::option::Option<&crate::types::FlowSize> {
        self.flow_size.as_ref()
    }
    /// <p>Specifies the configuration settings for a flow's NDI source or output. Required when the flow includes an NDI source or output.</p>
    pub fn ndi_config(&self) -> ::std::option::Option<&crate::types::NdiConfig> {
        self.ndi_config.as_ref()
    }
    /// <p>The encoding configuration to apply to the NDI® source when transcoding it to a transport stream for downstream distribution. You can choose between several predefined encoding profiles based on common use cases.</p>
    pub fn encoding_config(&self) -> ::std::option::Option<&crate::types::EncodingConfig> {
        self.encoding_config.as_ref()
    }
    /// <p>The key-value pairs that can be used to tag and organize the flow.</p>
    pub fn flow_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.flow_tags.as_ref()
    }
}
impl CreateFlowInput {
    /// Creates a new builder-style object to manufacture [`CreateFlowInput`](crate::operation::create_flow::CreateFlowInput).
    pub fn builder() -> crate::operation::create_flow::builders::CreateFlowInputBuilder {
        crate::operation::create_flow::builders::CreateFlowInputBuilder::default()
    }
}

/// A builder for [`CreateFlowInput`](crate::operation::create_flow::CreateFlowInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateFlowInputBuilder {
    pub(crate) availability_zone: ::std::option::Option<::std::string::String>,
    pub(crate) entitlements: ::std::option::Option<::std::vec::Vec<crate::types::GrantEntitlementRequest>>,
    pub(crate) media_streams: ::std::option::Option<::std::vec::Vec<crate::types::AddMediaStreamRequest>>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) outputs: ::std::option::Option<::std::vec::Vec<crate::types::AddOutputRequest>>,
    pub(crate) source: ::std::option::Option<crate::types::SetSourceRequest>,
    pub(crate) source_failover_config: ::std::option::Option<crate::types::FailoverConfig>,
    pub(crate) sources: ::std::option::Option<::std::vec::Vec<crate::types::SetSourceRequest>>,
    pub(crate) vpc_interfaces: ::std::option::Option<::std::vec::Vec<crate::types::VpcInterfaceRequest>>,
    pub(crate) maintenance: ::std::option::Option<crate::types::AddMaintenance>,
    pub(crate) source_monitoring_config: ::std::option::Option<crate::types::MonitoringConfig>,
    pub(crate) flow_size: ::std::option::Option<crate::types::FlowSize>,
    pub(crate) ndi_config: ::std::option::Option<crate::types::NdiConfig>,
    pub(crate) encoding_config: ::std::option::Option<crate::types::EncodingConfig>,
    pub(crate) flow_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateFlowInputBuilder {
    /// <p>The Availability Zone that you want to create the flow in. These options are limited to the Availability Zones within the current Amazon Web Services Region.</p>
    pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.availability_zone = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Availability Zone that you want to create the flow in. These options are limited to the Availability Zones within the current Amazon Web Services Region.</p>
    pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.availability_zone = input;
        self
    }
    /// <p>The Availability Zone that you want to create the flow in. These options are limited to the Availability Zones within the current Amazon Web Services Region.</p>
    pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
        &self.availability_zone
    }
    /// Appends an item to `entitlements`.
    ///
    /// To override the contents of this collection use [`set_entitlements`](Self::set_entitlements).
    ///
    /// <p>The entitlements that you want to grant on a flow.</p>
    pub fn entitlements(mut self, input: crate::types::GrantEntitlementRequest) -> Self {
        let mut v = self.entitlements.unwrap_or_default();
        v.push(input);
        self.entitlements = ::std::option::Option::Some(v);
        self
    }
    /// <p>The entitlements that you want to grant on a flow.</p>
    pub fn set_entitlements(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::GrantEntitlementRequest>>) -> Self {
        self.entitlements = input;
        self
    }
    /// <p>The entitlements that you want to grant on a flow.</p>
    pub fn get_entitlements(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GrantEntitlementRequest>> {
        &self.entitlements
    }
    /// Appends an item to `media_streams`.
    ///
    /// To override the contents of this collection use [`set_media_streams`](Self::set_media_streams).
    ///
    /// <p>The media streams that you want to add to the flow. You can associate these media streams with sources and outputs on the flow.</p>
    pub fn media_streams(mut self, input: crate::types::AddMediaStreamRequest) -> Self {
        let mut v = self.media_streams.unwrap_or_default();
        v.push(input);
        self.media_streams = ::std::option::Option::Some(v);
        self
    }
    /// <p>The media streams that you want to add to the flow. You can associate these media streams with sources and outputs on the flow.</p>
    pub fn set_media_streams(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AddMediaStreamRequest>>) -> Self {
        self.media_streams = input;
        self
    }
    /// <p>The media streams that you want to add to the flow. You can associate these media streams with sources and outputs on the flow.</p>
    pub fn get_media_streams(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AddMediaStreamRequest>> {
        &self.media_streams
    }
    /// <p>The name of the flow.</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 flow.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the flow.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// Appends an item to `outputs`.
    ///
    /// To override the contents of this collection use [`set_outputs`](Self::set_outputs).
    ///
    /// <p>The outputs that you want to add to this flow.</p>
    pub fn outputs(mut self, input: crate::types::AddOutputRequest) -> Self {
        let mut v = self.outputs.unwrap_or_default();
        v.push(input);
        self.outputs = ::std::option::Option::Some(v);
        self
    }
    /// <p>The outputs that you want to add to this flow.</p>
    pub fn set_outputs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AddOutputRequest>>) -> Self {
        self.outputs = input;
        self
    }
    /// <p>The outputs that you want to add to this flow.</p>
    pub fn get_outputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AddOutputRequest>> {
        &self.outputs
    }
    /// <p>The settings for the source that you want to use for the new flow.</p>
    pub fn source(mut self, input: crate::types::SetSourceRequest) -> Self {
        self.source = ::std::option::Option::Some(input);
        self
    }
    /// <p>The settings for the source that you want to use for the new flow.</p>
    pub fn set_source(mut self, input: ::std::option::Option<crate::types::SetSourceRequest>) -> Self {
        self.source = input;
        self
    }
    /// <p>The settings for the source that you want to use for the new flow.</p>
    pub fn get_source(&self) -> &::std::option::Option<crate::types::SetSourceRequest> {
        &self.source
    }
    /// <p>The settings for source failover.</p>
    pub fn source_failover_config(mut self, input: crate::types::FailoverConfig) -> Self {
        self.source_failover_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>The settings for source failover.</p>
    pub fn set_source_failover_config(mut self, input: ::std::option::Option<crate::types::FailoverConfig>) -> Self {
        self.source_failover_config = input;
        self
    }
    /// <p>The settings for source failover.</p>
    pub fn get_source_failover_config(&self) -> &::std::option::Option<crate::types::FailoverConfig> {
        &self.source_failover_config
    }
    /// Appends an item to `sources`.
    ///
    /// To override the contents of this collection use [`set_sources`](Self::set_sources).
    ///
    /// <p>The sources that are assigned to the flow.</p>
    pub fn sources(mut self, input: crate::types::SetSourceRequest) -> Self {
        let mut v = self.sources.unwrap_or_default();
        v.push(input);
        self.sources = ::std::option::Option::Some(v);
        self
    }
    /// <p>The sources that are assigned to the flow.</p>
    pub fn set_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SetSourceRequest>>) -> Self {
        self.sources = input;
        self
    }
    /// <p>The sources that are assigned to the flow.</p>
    pub fn get_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SetSourceRequest>> {
        &self.sources
    }
    /// Appends an item to `vpc_interfaces`.
    ///
    /// To override the contents of this collection use [`set_vpc_interfaces`](Self::set_vpc_interfaces).
    ///
    /// <p>The VPC interfaces you want on the flow.</p>
    pub fn vpc_interfaces(mut self, input: crate::types::VpcInterfaceRequest) -> Self {
        let mut v = self.vpc_interfaces.unwrap_or_default();
        v.push(input);
        self.vpc_interfaces = ::std::option::Option::Some(v);
        self
    }
    /// <p>The VPC interfaces you want on the flow.</p>
    pub fn set_vpc_interfaces(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VpcInterfaceRequest>>) -> Self {
        self.vpc_interfaces = input;
        self
    }
    /// <p>The VPC interfaces you want on the flow.</p>
    pub fn get_vpc_interfaces(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VpcInterfaceRequest>> {
        &self.vpc_interfaces
    }
    /// <p>The maintenance settings you want to use for the flow.</p>
    pub fn maintenance(mut self, input: crate::types::AddMaintenance) -> Self {
        self.maintenance = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maintenance settings you want to use for the flow.</p>
    pub fn set_maintenance(mut self, input: ::std::option::Option<crate::types::AddMaintenance>) -> Self {
        self.maintenance = input;
        self
    }
    /// <p>The maintenance settings you want to use for the flow.</p>
    pub fn get_maintenance(&self) -> &::std::option::Option<crate::types::AddMaintenance> {
        &self.maintenance
    }
    /// <p>The settings for source monitoring.</p>
    pub fn source_monitoring_config(mut self, input: crate::types::MonitoringConfig) -> Self {
        self.source_monitoring_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>The settings for source monitoring.</p>
    pub fn set_source_monitoring_config(mut self, input: ::std::option::Option<crate::types::MonitoringConfig>) -> Self {
        self.source_monitoring_config = input;
        self
    }
    /// <p>The settings for source monitoring.</p>
    pub fn get_source_monitoring_config(&self) -> &::std::option::Option<crate::types::MonitoringConfig> {
        &self.source_monitoring_config
    }
    /// <p>Determines the processing capacity and feature set of the flow. Set this optional parameter to <code>LARGE</code> if you want to enable NDI sources or outputs on the flow.</p>
    pub fn flow_size(mut self, input: crate::types::FlowSize) -> Self {
        self.flow_size = ::std::option::Option::Some(input);
        self
    }
    /// <p>Determines the processing capacity and feature set of the flow. Set this optional parameter to <code>LARGE</code> if you want to enable NDI sources or outputs on the flow.</p>
    pub fn set_flow_size(mut self, input: ::std::option::Option<crate::types::FlowSize>) -> Self {
        self.flow_size = input;
        self
    }
    /// <p>Determines the processing capacity and feature set of the flow. Set this optional parameter to <code>LARGE</code> if you want to enable NDI sources or outputs on the flow.</p>
    pub fn get_flow_size(&self) -> &::std::option::Option<crate::types::FlowSize> {
        &self.flow_size
    }
    /// <p>Specifies the configuration settings for a flow's NDI source or output. Required when the flow includes an NDI source or output.</p>
    pub fn ndi_config(mut self, input: crate::types::NdiConfig) -> Self {
        self.ndi_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the configuration settings for a flow's NDI source or output. Required when the flow includes an NDI source or output.</p>
    pub fn set_ndi_config(mut self, input: ::std::option::Option<crate::types::NdiConfig>) -> Self {
        self.ndi_config = input;
        self
    }
    /// <p>Specifies the configuration settings for a flow's NDI source or output. Required when the flow includes an NDI source or output.</p>
    pub fn get_ndi_config(&self) -> &::std::option::Option<crate::types::NdiConfig> {
        &self.ndi_config
    }
    /// <p>The encoding configuration to apply to the NDI® source when transcoding it to a transport stream for downstream distribution. You can choose between several predefined encoding profiles based on common use cases.</p>
    pub fn encoding_config(mut self, input: crate::types::EncodingConfig) -> Self {
        self.encoding_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>The encoding configuration to apply to the NDI® source when transcoding it to a transport stream for downstream distribution. You can choose between several predefined encoding profiles based on common use cases.</p>
    pub fn set_encoding_config(mut self, input: ::std::option::Option<crate::types::EncodingConfig>) -> Self {
        self.encoding_config = input;
        self
    }
    /// <p>The encoding configuration to apply to the NDI® source when transcoding it to a transport stream for downstream distribution. You can choose between several predefined encoding profiles based on common use cases.</p>
    pub fn get_encoding_config(&self) -> &::std::option::Option<crate::types::EncodingConfig> {
        &self.encoding_config
    }
    /// Adds a key-value pair to `flow_tags`.
    ///
    /// To override the contents of this collection use [`set_flow_tags`](Self::set_flow_tags).
    ///
    /// <p>The key-value pairs that can be used to tag and organize the flow.</p>
    pub fn flow_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.flow_tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.flow_tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The key-value pairs that can be used to tag and organize the flow.</p>
    pub fn set_flow_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.flow_tags = input;
        self
    }
    /// <p>The key-value pairs that can be used to tag and organize the flow.</p>
    pub fn get_flow_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.flow_tags
    }
    /// Consumes the builder and constructs a [`CreateFlowInput`](crate::operation::create_flow::CreateFlowInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::create_flow::CreateFlowInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_flow::CreateFlowInput {
            availability_zone: self.availability_zone,
            entitlements: self.entitlements,
            media_streams: self.media_streams,
            name: self.name,
            outputs: self.outputs,
            source: self.source,
            source_failover_config: self.source_failover_config,
            sources: self.sources,
            vpc_interfaces: self.vpc_interfaces,
            maintenance: self.maintenance,
            source_monitoring_config: self.source_monitoring_config,
            flow_size: self.flow_size,
            ndi_config: self.ndi_config,
            encoding_config: self.encoding_config,
            flow_tags: self.flow_tags,
        })
    }
}