aws_sdk_medialive/operation/create_input/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_input::_create_input_output::CreateInputOutputBuilder;
3
4pub use crate::operation::create_input::_create_input_input::CreateInputInputBuilder;
5
6impl crate::operation::create_input::builders::CreateInputInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::create_input::CreateInputOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_input::CreateInputError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_input();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateInput`.
24///
25/// Create an input
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateInputFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::create_input::builders::CreateInputInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::create_input::CreateInputOutput,
35        crate::operation::create_input::CreateInputError,
36    > for CreateInputFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::create_input::CreateInputOutput,
44            crate::operation::create_input::CreateInputError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl CreateInputFluentBuilder {
51    /// Creates a new `CreateInputFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the CreateInput as a reference.
60    pub fn as_input(&self) -> &crate::operation::create_input::builders::CreateInputInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::create_input::CreateInputOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::create_input::CreateInputError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::create_input::CreateInput::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::create_input::CreateInput::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::create_input::CreateInputOutput,
97        crate::operation::create_input::CreateInputError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    ///
112    /// Appends an item to `Destinations`.
113    ///
114    /// To override the contents of this collection use [`set_destinations`](Self::set_destinations).
115    ///
116    /// Destination settings for PUSH type inputs.
117    pub fn destinations(mut self, input: crate::types::InputDestinationRequest) -> Self {
118        self.inner = self.inner.destinations(input);
119        self
120    }
121    /// Destination settings for PUSH type inputs.
122    pub fn set_destinations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InputDestinationRequest>>) -> Self {
123        self.inner = self.inner.set_destinations(input);
124        self
125    }
126    /// Destination settings for PUSH type inputs.
127    pub fn get_destinations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InputDestinationRequest>> {
128        self.inner.get_destinations()
129    }
130    ///
131    /// Appends an item to `InputDevices`.
132    ///
133    /// To override the contents of this collection use [`set_input_devices`](Self::set_input_devices).
134    ///
135    /// Settings for the devices.
136    pub fn input_devices(mut self, input: crate::types::InputDeviceSettings) -> Self {
137        self.inner = self.inner.input_devices(input);
138        self
139    }
140    /// Settings for the devices.
141    pub fn set_input_devices(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InputDeviceSettings>>) -> Self {
142        self.inner = self.inner.set_input_devices(input);
143        self
144    }
145    /// Settings for the devices.
146    pub fn get_input_devices(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InputDeviceSettings>> {
147        self.inner.get_input_devices()
148    }
149    ///
150    /// Appends an item to `InputSecurityGroups`.
151    ///
152    /// To override the contents of this collection use [`set_input_security_groups`](Self::set_input_security_groups).
153    ///
154    /// A list of security groups referenced by IDs to attach to the input.
155    pub fn input_security_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156        self.inner = self.inner.input_security_groups(input.into());
157        self
158    }
159    /// A list of security groups referenced by IDs to attach to the input.
160    pub fn set_input_security_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
161        self.inner = self.inner.set_input_security_groups(input);
162        self
163    }
164    /// A list of security groups referenced by IDs to attach to the input.
165    pub fn get_input_security_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
166        self.inner.get_input_security_groups()
167    }
168    ///
169    /// Appends an item to `MediaConnectFlows`.
170    ///
171    /// To override the contents of this collection use [`set_media_connect_flows`](Self::set_media_connect_flows).
172    ///
173    /// A list of the MediaConnect Flows that you want to use in this input. You can specify as few as one Flow and presently, as many as two. The only requirement is when you have more than one is that each Flow is in a separate Availability Zone as this ensures your EML input is redundant to AZ issues.
174    pub fn media_connect_flows(mut self, input: crate::types::MediaConnectFlowRequest) -> Self {
175        self.inner = self.inner.media_connect_flows(input);
176        self
177    }
178    /// A list of the MediaConnect Flows that you want to use in this input. You can specify as few as one Flow and presently, as many as two. The only requirement is when you have more than one is that each Flow is in a separate Availability Zone as this ensures your EML input is redundant to AZ issues.
179    pub fn set_media_connect_flows(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MediaConnectFlowRequest>>) -> Self {
180        self.inner = self.inner.set_media_connect_flows(input);
181        self
182    }
183    /// A list of the MediaConnect Flows that you want to use in this input. You can specify as few as one Flow and presently, as many as two. The only requirement is when you have more than one is that each Flow is in a separate Availability Zone as this ensures your EML input is redundant to AZ issues.
184    pub fn get_media_connect_flows(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MediaConnectFlowRequest>> {
185        self.inner.get_media_connect_flows()
186    }
187    /// Name of the input.
188    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
189        self.inner = self.inner.name(input.into());
190        self
191    }
192    /// Name of the input.
193    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
194        self.inner = self.inner.set_name(input);
195        self
196    }
197    /// Name of the input.
198    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
199        self.inner.get_name()
200    }
201    /// Unique identifier of the request to ensure the request is handled exactly once in case of retries.
202    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
203        self.inner = self.inner.request_id(input.into());
204        self
205    }
206    /// Unique identifier of the request to ensure the request is handled exactly once in case of retries.
207    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
208        self.inner = self.inner.set_request_id(input);
209        self
210    }
211    /// Unique identifier of the request to ensure the request is handled exactly once in case of retries.
212    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
213        self.inner.get_request_id()
214    }
215    /// The Amazon Resource Name (ARN) of the role this input assumes during and after creation.
216    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
217        self.inner = self.inner.role_arn(input.into());
218        self
219    }
220    /// The Amazon Resource Name (ARN) of the role this input assumes during and after creation.
221    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
222        self.inner = self.inner.set_role_arn(input);
223        self
224    }
225    /// The Amazon Resource Name (ARN) of the role this input assumes during and after creation.
226    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
227        self.inner.get_role_arn()
228    }
229    ///
230    /// Appends an item to `Sources`.
231    ///
232    /// To override the contents of this collection use [`set_sources`](Self::set_sources).
233    ///
234    /// The source URLs for a PULL-type input. Every PULL type input needs exactly two source URLs for redundancy. Only specify sources for PULL type Inputs. Leave Destinations empty.
235    pub fn sources(mut self, input: crate::types::InputSourceRequest) -> Self {
236        self.inner = self.inner.sources(input);
237        self
238    }
239    /// The source URLs for a PULL-type input. Every PULL type input needs exactly two source URLs for redundancy. Only specify sources for PULL type Inputs. Leave Destinations empty.
240    pub fn set_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InputSourceRequest>>) -> Self {
241        self.inner = self.inner.set_sources(input);
242        self
243    }
244    /// The source URLs for a PULL-type input. Every PULL type input needs exactly two source URLs for redundancy. Only specify sources for PULL type Inputs. Leave Destinations empty.
245    pub fn get_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InputSourceRequest>> {
246        self.inner.get_sources()
247    }
248    ///
249    /// Adds a key-value pair to `Tags`.
250    ///
251    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
252    ///
253    /// A collection of key-value pairs.
254    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
255        self.inner = self.inner.tags(k.into(), v.into());
256        self
257    }
258    /// A collection of key-value pairs.
259    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
260        self.inner = self.inner.set_tags(input);
261        self
262    }
263    /// A collection of key-value pairs.
264    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
265        self.inner.get_tags()
266    }
267    /// The different types of inputs that AWS Elemental MediaLive supports.
268    pub fn r#type(mut self, input: crate::types::InputType) -> Self {
269        self.inner = self.inner.r#type(input);
270        self
271    }
272    /// The different types of inputs that AWS Elemental MediaLive supports.
273    pub fn set_type(mut self, input: ::std::option::Option<crate::types::InputType>) -> Self {
274        self.inner = self.inner.set_type(input);
275        self
276    }
277    /// The different types of inputs that AWS Elemental MediaLive supports.
278    pub fn get_type(&self) -> &::std::option::Option<crate::types::InputType> {
279        self.inner.get_type()
280    }
281    /// Settings for a private VPC Input. When this property is specified, the input destination addresses will be created in a VPC rather than with public Internet addresses. This property requires setting the roleArn property on Input creation. Not compatible with the inputSecurityGroups property.
282    pub fn vpc(mut self, input: crate::types::InputVpcRequest) -> Self {
283        self.inner = self.inner.vpc(input);
284        self
285    }
286    /// Settings for a private VPC Input. When this property is specified, the input destination addresses will be created in a VPC rather than with public Internet addresses. This property requires setting the roleArn property on Input creation. Not compatible with the inputSecurityGroups property.
287    pub fn set_vpc(mut self, input: ::std::option::Option<crate::types::InputVpcRequest>) -> Self {
288        self.inner = self.inner.set_vpc(input);
289        self
290    }
291    /// Settings for a private VPC Input. When this property is specified, the input destination addresses will be created in a VPC rather than with public Internet addresses. This property requires setting the roleArn property on Input creation. Not compatible with the inputSecurityGroups property.
292    pub fn get_vpc(&self) -> &::std::option::Option<crate::types::InputVpcRequest> {
293        self.inner.get_vpc()
294    }
295    /// The settings associated with an SRT input.
296    pub fn srt_settings(mut self, input: crate::types::SrtSettingsRequest) -> Self {
297        self.inner = self.inner.srt_settings(input);
298        self
299    }
300    /// The settings associated with an SRT input.
301    pub fn set_srt_settings(mut self, input: ::std::option::Option<crate::types::SrtSettingsRequest>) -> Self {
302        self.inner = self.inner.set_srt_settings(input);
303        self
304    }
305    /// The settings associated with an SRT input.
306    pub fn get_srt_settings(&self) -> &::std::option::Option<crate::types::SrtSettingsRequest> {
307        self.inner.get_srt_settings()
308    }
309    /// The location of this input. AWS, for an input existing in the AWS Cloud, On-Prem for an input in a customer network.
310    pub fn input_network_location(mut self, input: crate::types::InputNetworkLocation) -> Self {
311        self.inner = self.inner.input_network_location(input);
312        self
313    }
314    /// The location of this input. AWS, for an input existing in the AWS Cloud, On-Prem for an input in a customer network.
315    pub fn set_input_network_location(mut self, input: ::std::option::Option<crate::types::InputNetworkLocation>) -> Self {
316        self.inner = self.inner.set_input_network_location(input);
317        self
318    }
319    /// The location of this input. AWS, for an input existing in the AWS Cloud, On-Prem for an input in a customer network.
320    pub fn get_input_network_location(&self) -> &::std::option::Option<crate::types::InputNetworkLocation> {
321        self.inner.get_input_network_location()
322    }
323    /// Multicast Input settings.
324    pub fn multicast_settings(mut self, input: crate::types::MulticastSettingsCreateRequest) -> Self {
325        self.inner = self.inner.multicast_settings(input);
326        self
327    }
328    /// Multicast Input settings.
329    pub fn set_multicast_settings(mut self, input: ::std::option::Option<crate::types::MulticastSettingsCreateRequest>) -> Self {
330        self.inner = self.inner.set_multicast_settings(input);
331        self
332    }
333    /// Multicast Input settings.
334    pub fn get_multicast_settings(&self) -> &::std::option::Option<crate::types::MulticastSettingsCreateRequest> {
335        self.inner.get_multicast_settings()
336    }
337    /// Include this parameter if the input is a SMPTE 2110 input, to identify the stream sources for this input.
338    pub fn smpte2110_receiver_group_settings(mut self, input: crate::types::Smpte2110ReceiverGroupSettings) -> Self {
339        self.inner = self.inner.smpte2110_receiver_group_settings(input);
340        self
341    }
342    /// Include this parameter if the input is a SMPTE 2110 input, to identify the stream sources for this input.
343    pub fn set_smpte2110_receiver_group_settings(mut self, input: ::std::option::Option<crate::types::Smpte2110ReceiverGroupSettings>) -> Self {
344        self.inner = self.inner.set_smpte2110_receiver_group_settings(input);
345        self
346    }
347    /// Include this parameter if the input is a SMPTE 2110 input, to identify the stream sources for this input.
348    pub fn get_smpte2110_receiver_group_settings(&self) -> &::std::option::Option<crate::types::Smpte2110ReceiverGroupSettings> {
349        self.inner.get_smpte2110_receiver_group_settings()
350    }
351    ///
352    /// Appends an item to `SdiSources`.
353    ///
354    /// To override the contents of this collection use [`set_sdi_sources`](Self::set_sdi_sources).
355    ///
356    /// SDI Sources for this Input.
357    pub fn sdi_sources(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
358        self.inner = self.inner.sdi_sources(input.into());
359        self
360    }
361    /// SDI Sources for this Input.
362    pub fn set_sdi_sources(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
363        self.inner = self.inner.set_sdi_sources(input);
364        self
365    }
366    /// SDI Sources for this Input.
367    pub fn get_sdi_sources(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
368        self.inner.get_sdi_sources()
369    }
370    /// This is the collection of settings that are used during the creation of a MediaConnect router input.
371    pub fn router_settings(mut self, input: crate::types::RouterSettings) -> Self {
372        self.inner = self.inner.router_settings(input);
373        self
374    }
375    /// This is the collection of settings that are used during the creation of a MediaConnect router input.
376    pub fn set_router_settings(mut self, input: ::std::option::Option<crate::types::RouterSettings>) -> Self {
377        self.inner = self.inner.set_router_settings(input);
378        self
379    }
380    /// This is the collection of settings that are used during the creation of a MediaConnect router input.
381    pub fn get_router_settings(&self) -> &::std::option::Option<crate::types::RouterSettings> {
382        self.inner.get_router_settings()
383    }
384}