aws_sdk_mediaconnect/operation/create_flow/
_create_flow_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateFlowInput {
6    /// <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>
7    pub availability_zone: ::std::option::Option<::std::string::String>,
8    /// <p>The entitlements that you want to grant on a flow.</p>
9    pub entitlements: ::std::option::Option<::std::vec::Vec<crate::types::GrantEntitlementRequest>>,
10    /// <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>
11    pub media_streams: ::std::option::Option<::std::vec::Vec<crate::types::AddMediaStreamRequest>>,
12    /// <p>The name of the flow.</p>
13    pub name: ::std::option::Option<::std::string::String>,
14    /// <p>The outputs that you want to add to this flow.</p>
15    pub outputs: ::std::option::Option<::std::vec::Vec<crate::types::AddOutputRequest>>,
16    /// <p>The settings for the source that you want to use for the new flow.</p>
17    pub source: ::std::option::Option<crate::types::SetSourceRequest>,
18    /// <p>The settings for source failover.</p>
19    pub source_failover_config: ::std::option::Option<crate::types::FailoverConfig>,
20    /// <p>The sources that are assigned to the flow.</p>
21    pub sources: ::std::option::Option<::std::vec::Vec<crate::types::SetSourceRequest>>,
22    /// <p>The VPC interfaces you want on the flow.</p>
23    pub vpc_interfaces: ::std::option::Option<::std::vec::Vec<crate::types::VpcInterfaceRequest>>,
24    /// <p>The maintenance settings you want to use for the flow.</p>
25    pub maintenance: ::std::option::Option<crate::types::AddMaintenance>,
26    /// <p>The settings for source monitoring.</p>
27    pub source_monitoring_config: ::std::option::Option<crate::types::MonitoringConfig>,
28    /// <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 outputs on the flow.</p>
29    pub flow_size: ::std::option::Option<crate::types::FlowSize>,
30    /// <p>Specifies the configuration settings for NDI outputs. Required when the flow includes NDI outputs.</p>
31    pub ndi_config: ::std::option::Option<crate::types::NdiConfig>,
32    /// <p>The key-value pairs that can be used to tag and organize the flow.</p>
33    pub flow_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
34}
35impl CreateFlowInput {
36    /// <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>
37    pub fn availability_zone(&self) -> ::std::option::Option<&str> {
38        self.availability_zone.as_deref()
39    }
40    /// <p>The entitlements that you want to grant on a flow.</p>
41    ///
42    /// 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()`.
43    pub fn entitlements(&self) -> &[crate::types::GrantEntitlementRequest] {
44        self.entitlements.as_deref().unwrap_or_default()
45    }
46    /// <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>
47    ///
48    /// 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()`.
49    pub fn media_streams(&self) -> &[crate::types::AddMediaStreamRequest] {
50        self.media_streams.as_deref().unwrap_or_default()
51    }
52    /// <p>The name of the flow.</p>
53    pub fn name(&self) -> ::std::option::Option<&str> {
54        self.name.as_deref()
55    }
56    /// <p>The outputs that you want to add to this flow.</p>
57    ///
58    /// 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()`.
59    pub fn outputs(&self) -> &[crate::types::AddOutputRequest] {
60        self.outputs.as_deref().unwrap_or_default()
61    }
62    /// <p>The settings for the source that you want to use for the new flow.</p>
63    pub fn source(&self) -> ::std::option::Option<&crate::types::SetSourceRequest> {
64        self.source.as_ref()
65    }
66    /// <p>The settings for source failover.</p>
67    pub fn source_failover_config(&self) -> ::std::option::Option<&crate::types::FailoverConfig> {
68        self.source_failover_config.as_ref()
69    }
70    /// <p>The sources that are assigned to the flow.</p>
71    ///
72    /// 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()`.
73    pub fn sources(&self) -> &[crate::types::SetSourceRequest] {
74        self.sources.as_deref().unwrap_or_default()
75    }
76    /// <p>The VPC interfaces you want on the flow.</p>
77    ///
78    /// 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()`.
79    pub fn vpc_interfaces(&self) -> &[crate::types::VpcInterfaceRequest] {
80        self.vpc_interfaces.as_deref().unwrap_or_default()
81    }
82    /// <p>The maintenance settings you want to use for the flow.</p>
83    pub fn maintenance(&self) -> ::std::option::Option<&crate::types::AddMaintenance> {
84        self.maintenance.as_ref()
85    }
86    /// <p>The settings for source monitoring.</p>
87    pub fn source_monitoring_config(&self) -> ::std::option::Option<&crate::types::MonitoringConfig> {
88        self.source_monitoring_config.as_ref()
89    }
90    /// <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 outputs on the flow.</p>
91    pub fn flow_size(&self) -> ::std::option::Option<&crate::types::FlowSize> {
92        self.flow_size.as_ref()
93    }
94    /// <p>Specifies the configuration settings for NDI outputs. Required when the flow includes NDI outputs.</p>
95    pub fn ndi_config(&self) -> ::std::option::Option<&crate::types::NdiConfig> {
96        self.ndi_config.as_ref()
97    }
98    /// <p>The key-value pairs that can be used to tag and organize the flow.</p>
99    pub fn flow_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
100        self.flow_tags.as_ref()
101    }
102}
103impl CreateFlowInput {
104    /// Creates a new builder-style object to manufacture [`CreateFlowInput`](crate::operation::create_flow::CreateFlowInput).
105    pub fn builder() -> crate::operation::create_flow::builders::CreateFlowInputBuilder {
106        crate::operation::create_flow::builders::CreateFlowInputBuilder::default()
107    }
108}
109
110/// A builder for [`CreateFlowInput`](crate::operation::create_flow::CreateFlowInput).
111#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
112#[non_exhaustive]
113pub struct CreateFlowInputBuilder {
114    pub(crate) availability_zone: ::std::option::Option<::std::string::String>,
115    pub(crate) entitlements: ::std::option::Option<::std::vec::Vec<crate::types::GrantEntitlementRequest>>,
116    pub(crate) media_streams: ::std::option::Option<::std::vec::Vec<crate::types::AddMediaStreamRequest>>,
117    pub(crate) name: ::std::option::Option<::std::string::String>,
118    pub(crate) outputs: ::std::option::Option<::std::vec::Vec<crate::types::AddOutputRequest>>,
119    pub(crate) source: ::std::option::Option<crate::types::SetSourceRequest>,
120    pub(crate) source_failover_config: ::std::option::Option<crate::types::FailoverConfig>,
121    pub(crate) sources: ::std::option::Option<::std::vec::Vec<crate::types::SetSourceRequest>>,
122    pub(crate) vpc_interfaces: ::std::option::Option<::std::vec::Vec<crate::types::VpcInterfaceRequest>>,
123    pub(crate) maintenance: ::std::option::Option<crate::types::AddMaintenance>,
124    pub(crate) source_monitoring_config: ::std::option::Option<crate::types::MonitoringConfig>,
125    pub(crate) flow_size: ::std::option::Option<crate::types::FlowSize>,
126    pub(crate) ndi_config: ::std::option::Option<crate::types::NdiConfig>,
127    pub(crate) flow_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
128}
129impl CreateFlowInputBuilder {
130    /// <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>
131    pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132        self.availability_zone = ::std::option::Option::Some(input.into());
133        self
134    }
135    /// <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>
136    pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.availability_zone = input;
138        self
139    }
140    /// <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>
141    pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
142        &self.availability_zone
143    }
144    /// Appends an item to `entitlements`.
145    ///
146    /// To override the contents of this collection use [`set_entitlements`](Self::set_entitlements).
147    ///
148    /// <p>The entitlements that you want to grant on a flow.</p>
149    pub fn entitlements(mut self, input: crate::types::GrantEntitlementRequest) -> Self {
150        let mut v = self.entitlements.unwrap_or_default();
151        v.push(input);
152        self.entitlements = ::std::option::Option::Some(v);
153        self
154    }
155    /// <p>The entitlements that you want to grant on a flow.</p>
156    pub fn set_entitlements(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::GrantEntitlementRequest>>) -> Self {
157        self.entitlements = input;
158        self
159    }
160    /// <p>The entitlements that you want to grant on a flow.</p>
161    pub fn get_entitlements(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GrantEntitlementRequest>> {
162        &self.entitlements
163    }
164    /// Appends an item to `media_streams`.
165    ///
166    /// To override the contents of this collection use [`set_media_streams`](Self::set_media_streams).
167    ///
168    /// <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>
169    pub fn media_streams(mut self, input: crate::types::AddMediaStreamRequest) -> Self {
170        let mut v = self.media_streams.unwrap_or_default();
171        v.push(input);
172        self.media_streams = ::std::option::Option::Some(v);
173        self
174    }
175    /// <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>
176    pub fn set_media_streams(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AddMediaStreamRequest>>) -> Self {
177        self.media_streams = input;
178        self
179    }
180    /// <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>
181    pub fn get_media_streams(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AddMediaStreamRequest>> {
182        &self.media_streams
183    }
184    /// <p>The name of the flow.</p>
185    /// This field is required.
186    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
187        self.name = ::std::option::Option::Some(input.into());
188        self
189    }
190    /// <p>The name of the flow.</p>
191    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
192        self.name = input;
193        self
194    }
195    /// <p>The name of the flow.</p>
196    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
197        &self.name
198    }
199    /// Appends an item to `outputs`.
200    ///
201    /// To override the contents of this collection use [`set_outputs`](Self::set_outputs).
202    ///
203    /// <p>The outputs that you want to add to this flow.</p>
204    pub fn outputs(mut self, input: crate::types::AddOutputRequest) -> Self {
205        let mut v = self.outputs.unwrap_or_default();
206        v.push(input);
207        self.outputs = ::std::option::Option::Some(v);
208        self
209    }
210    /// <p>The outputs that you want to add to this flow.</p>
211    pub fn set_outputs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AddOutputRequest>>) -> Self {
212        self.outputs = input;
213        self
214    }
215    /// <p>The outputs that you want to add to this flow.</p>
216    pub fn get_outputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AddOutputRequest>> {
217        &self.outputs
218    }
219    /// <p>The settings for the source that you want to use for the new flow.</p>
220    pub fn source(mut self, input: crate::types::SetSourceRequest) -> Self {
221        self.source = ::std::option::Option::Some(input);
222        self
223    }
224    /// <p>The settings for the source that you want to use for the new flow.</p>
225    pub fn set_source(mut self, input: ::std::option::Option<crate::types::SetSourceRequest>) -> Self {
226        self.source = input;
227        self
228    }
229    /// <p>The settings for the source that you want to use for the new flow.</p>
230    pub fn get_source(&self) -> &::std::option::Option<crate::types::SetSourceRequest> {
231        &self.source
232    }
233    /// <p>The settings for source failover.</p>
234    pub fn source_failover_config(mut self, input: crate::types::FailoverConfig) -> Self {
235        self.source_failover_config = ::std::option::Option::Some(input);
236        self
237    }
238    /// <p>The settings for source failover.</p>
239    pub fn set_source_failover_config(mut self, input: ::std::option::Option<crate::types::FailoverConfig>) -> Self {
240        self.source_failover_config = input;
241        self
242    }
243    /// <p>The settings for source failover.</p>
244    pub fn get_source_failover_config(&self) -> &::std::option::Option<crate::types::FailoverConfig> {
245        &self.source_failover_config
246    }
247    /// Appends an item to `sources`.
248    ///
249    /// To override the contents of this collection use [`set_sources`](Self::set_sources).
250    ///
251    /// <p>The sources that are assigned to the flow.</p>
252    pub fn sources(mut self, input: crate::types::SetSourceRequest) -> Self {
253        let mut v = self.sources.unwrap_or_default();
254        v.push(input);
255        self.sources = ::std::option::Option::Some(v);
256        self
257    }
258    /// <p>The sources that are assigned to the flow.</p>
259    pub fn set_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SetSourceRequest>>) -> Self {
260        self.sources = input;
261        self
262    }
263    /// <p>The sources that are assigned to the flow.</p>
264    pub fn get_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SetSourceRequest>> {
265        &self.sources
266    }
267    /// Appends an item to `vpc_interfaces`.
268    ///
269    /// To override the contents of this collection use [`set_vpc_interfaces`](Self::set_vpc_interfaces).
270    ///
271    /// <p>The VPC interfaces you want on the flow.</p>
272    pub fn vpc_interfaces(mut self, input: crate::types::VpcInterfaceRequest) -> Self {
273        let mut v = self.vpc_interfaces.unwrap_or_default();
274        v.push(input);
275        self.vpc_interfaces = ::std::option::Option::Some(v);
276        self
277    }
278    /// <p>The VPC interfaces you want on the flow.</p>
279    pub fn set_vpc_interfaces(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VpcInterfaceRequest>>) -> Self {
280        self.vpc_interfaces = input;
281        self
282    }
283    /// <p>The VPC interfaces you want on the flow.</p>
284    pub fn get_vpc_interfaces(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VpcInterfaceRequest>> {
285        &self.vpc_interfaces
286    }
287    /// <p>The maintenance settings you want to use for the flow.</p>
288    pub fn maintenance(mut self, input: crate::types::AddMaintenance) -> Self {
289        self.maintenance = ::std::option::Option::Some(input);
290        self
291    }
292    /// <p>The maintenance settings you want to use for the flow.</p>
293    pub fn set_maintenance(mut self, input: ::std::option::Option<crate::types::AddMaintenance>) -> Self {
294        self.maintenance = input;
295        self
296    }
297    /// <p>The maintenance settings you want to use for the flow.</p>
298    pub fn get_maintenance(&self) -> &::std::option::Option<crate::types::AddMaintenance> {
299        &self.maintenance
300    }
301    /// <p>The settings for source monitoring.</p>
302    pub fn source_monitoring_config(mut self, input: crate::types::MonitoringConfig) -> Self {
303        self.source_monitoring_config = ::std::option::Option::Some(input);
304        self
305    }
306    /// <p>The settings for source monitoring.</p>
307    pub fn set_source_monitoring_config(mut self, input: ::std::option::Option<crate::types::MonitoringConfig>) -> Self {
308        self.source_monitoring_config = input;
309        self
310    }
311    /// <p>The settings for source monitoring.</p>
312    pub fn get_source_monitoring_config(&self) -> &::std::option::Option<crate::types::MonitoringConfig> {
313        &self.source_monitoring_config
314    }
315    /// <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 outputs on the flow.</p>
316    pub fn flow_size(mut self, input: crate::types::FlowSize) -> Self {
317        self.flow_size = ::std::option::Option::Some(input);
318        self
319    }
320    /// <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 outputs on the flow.</p>
321    pub fn set_flow_size(mut self, input: ::std::option::Option<crate::types::FlowSize>) -> Self {
322        self.flow_size = input;
323        self
324    }
325    /// <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 outputs on the flow.</p>
326    pub fn get_flow_size(&self) -> &::std::option::Option<crate::types::FlowSize> {
327        &self.flow_size
328    }
329    /// <p>Specifies the configuration settings for NDI outputs. Required when the flow includes NDI outputs.</p>
330    pub fn ndi_config(mut self, input: crate::types::NdiConfig) -> Self {
331        self.ndi_config = ::std::option::Option::Some(input);
332        self
333    }
334    /// <p>Specifies the configuration settings for NDI outputs. Required when the flow includes NDI outputs.</p>
335    pub fn set_ndi_config(mut self, input: ::std::option::Option<crate::types::NdiConfig>) -> Self {
336        self.ndi_config = input;
337        self
338    }
339    /// <p>Specifies the configuration settings for NDI outputs. Required when the flow includes NDI outputs.</p>
340    pub fn get_ndi_config(&self) -> &::std::option::Option<crate::types::NdiConfig> {
341        &self.ndi_config
342    }
343    /// Adds a key-value pair to `flow_tags`.
344    ///
345    /// To override the contents of this collection use [`set_flow_tags`](Self::set_flow_tags).
346    ///
347    /// <p>The key-value pairs that can be used to tag and organize the flow.</p>
348    pub fn flow_tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
349        let mut hash_map = self.flow_tags.unwrap_or_default();
350        hash_map.insert(k.into(), v.into());
351        self.flow_tags = ::std::option::Option::Some(hash_map);
352        self
353    }
354    /// <p>The key-value pairs that can be used to tag and organize the flow.</p>
355    pub fn set_flow_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
356        self.flow_tags = input;
357        self
358    }
359    /// <p>The key-value pairs that can be used to tag and organize the flow.</p>
360    pub fn get_flow_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
361        &self.flow_tags
362    }
363    /// Consumes the builder and constructs a [`CreateFlowInput`](crate::operation::create_flow::CreateFlowInput).
364    pub fn build(self) -> ::std::result::Result<crate::operation::create_flow::CreateFlowInput, ::aws_smithy_types::error::operation::BuildError> {
365        ::std::result::Result::Ok(crate::operation::create_flow::CreateFlowInput {
366            availability_zone: self.availability_zone,
367            entitlements: self.entitlements,
368            media_streams: self.media_streams,
369            name: self.name,
370            outputs: self.outputs,
371            source: self.source,
372            source_failover_config: self.source_failover_config,
373            sources: self.sources,
374            vpc_interfaces: self.vpc_interfaces,
375            maintenance: self.maintenance,
376            source_monitoring_config: self.source_monitoring_config,
377            flow_size: self.flow_size,
378            ndi_config: self.ndi_config,
379            flow_tags: self.flow_tags,
380        })
381    }
382}