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