aws_sdk_mediaconnect/operation/update_flow_source/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_flow_source::_update_flow_source_output::UpdateFlowSourceOutputBuilder;
3
4pub use crate::operation::update_flow_source::_update_flow_source_input::UpdateFlowSourceInputBuilder;
5
6impl crate::operation::update_flow_source::builders::UpdateFlowSourceInputBuilder {
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::update_flow_source::UpdateFlowSourceOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_flow_source::UpdateFlowSourceError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_flow_source();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateFlowSource`.
24///
25/// <p>Updates the source of a flow.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateFlowSourceFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_flow_source::builders::UpdateFlowSourceInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_flow_source::UpdateFlowSourceOutput,
35        crate::operation::update_flow_source::UpdateFlowSourceError,
36    > for UpdateFlowSourceFluentBuilder
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::update_flow_source::UpdateFlowSourceOutput,
44            crate::operation::update_flow_source::UpdateFlowSourceError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateFlowSourceFluentBuilder {
51    /// Creates a new `UpdateFlowSourceFluentBuilder`.
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 UpdateFlowSource as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_flow_source::builders::UpdateFlowSourceInputBuilder {
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::update_flow_source::UpdateFlowSourceOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_flow_source::UpdateFlowSourceError,
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::update_flow_source::UpdateFlowSource::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_flow_source::UpdateFlowSource::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::update_flow_source::UpdateFlowSourceOutput,
97        crate::operation::update_flow_source::UpdateFlowSourceError,
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    /// <p>The type of encryption that is used on the content ingested from the source.</p>
112    pub fn decryption(mut self, input: crate::types::UpdateEncryption) -> Self {
113        self.inner = self.inner.decryption(input);
114        self
115    }
116    /// <p>The type of encryption that is used on the content ingested from the source.</p>
117    pub fn set_decryption(mut self, input: ::std::option::Option<crate::types::UpdateEncryption>) -> Self {
118        self.inner = self.inner.set_decryption(input);
119        self
120    }
121    /// <p>The type of encryption that is used on the content ingested from the source.</p>
122    pub fn get_decryption(&self) -> &::std::option::Option<crate::types::UpdateEncryption> {
123        self.inner.get_decryption()
124    }
125    /// <p>A description of the source. This description is not visible outside of the current Amazon Web Services account.</p>
126    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.description(input.into());
128        self
129    }
130    /// <p>A description of the source. This description is not visible outside of the current Amazon Web Services account.</p>
131    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_description(input);
133        self
134    }
135    /// <p>A description of the source. This description is not visible outside of the current Amazon Web Services account.</p>
136    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_description()
138    }
139    /// <p>The Amazon Resource Name (ARN) of the entitlement that allows you to subscribe to the flow. The entitlement is set by the content originator, and the ARN is generated as part of the originator's flow.</p>
140    pub fn entitlement_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.inner = self.inner.entitlement_arn(input.into());
142        self
143    }
144    /// <p>The Amazon Resource Name (ARN) of the entitlement that allows you to subscribe to the flow. The entitlement is set by the content originator, and the ARN is generated as part of the originator's flow.</p>
145    pub fn set_entitlement_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.inner = self.inner.set_entitlement_arn(input);
147        self
148    }
149    /// <p>The Amazon Resource Name (ARN) of the entitlement that allows you to subscribe to the flow. The entitlement is set by the content originator, and the ARN is generated as part of the originator's flow.</p>
150    pub fn get_entitlement_arn(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_entitlement_arn()
152    }
153    /// <p>The ARN of the flow that you want to update.</p>
154    pub fn flow_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155        self.inner = self.inner.flow_arn(input.into());
156        self
157    }
158    /// <p>The ARN of the flow that you want to update.</p>
159    pub fn set_flow_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160        self.inner = self.inner.set_flow_arn(input);
161        self
162    }
163    /// <p>The ARN of the flow that you want to update.</p>
164    pub fn get_flow_arn(&self) -> &::std::option::Option<::std::string::String> {
165        self.inner.get_flow_arn()
166    }
167    /// <p>The port that the flow listens on for incoming content. If the protocol of the source is Zixi, the port must be set to 2088.</p>
168    pub fn ingest_port(mut self, input: i32) -> Self {
169        self.inner = self.inner.ingest_port(input);
170        self
171    }
172    /// <p>The port that the flow listens on for incoming content. If the protocol of the source is Zixi, the port must be set to 2088.</p>
173    pub fn set_ingest_port(mut self, input: ::std::option::Option<i32>) -> Self {
174        self.inner = self.inner.set_ingest_port(input);
175        self
176    }
177    /// <p>The port that the flow listens on for incoming content. If the protocol of the source is Zixi, the port must be set to 2088.</p>
178    pub fn get_ingest_port(&self) -> &::std::option::Option<i32> {
179        self.inner.get_ingest_port()
180    }
181    /// <p>The maximum bitrate for RIST, RTP, and RTP-FEC streams.</p>
182    pub fn max_bitrate(mut self, input: i32) -> Self {
183        self.inner = self.inner.max_bitrate(input);
184        self
185    }
186    /// <p>The maximum bitrate for RIST, RTP, and RTP-FEC streams.</p>
187    pub fn set_max_bitrate(mut self, input: ::std::option::Option<i32>) -> Self {
188        self.inner = self.inner.set_max_bitrate(input);
189        self
190    }
191    /// <p>The maximum bitrate for RIST, RTP, and RTP-FEC streams.</p>
192    pub fn get_max_bitrate(&self) -> &::std::option::Option<i32> {
193        self.inner.get_max_bitrate()
194    }
195    /// <p>The maximum latency in milliseconds. This parameter applies only to RIST-based and Zixi-based streams.</p>
196    pub fn max_latency(mut self, input: i32) -> Self {
197        self.inner = self.inner.max_latency(input);
198        self
199    }
200    /// <p>The maximum latency in milliseconds. This parameter applies only to RIST-based and Zixi-based streams.</p>
201    pub fn set_max_latency(mut self, input: ::std::option::Option<i32>) -> Self {
202        self.inner = self.inner.set_max_latency(input);
203        self
204    }
205    /// <p>The maximum latency in milliseconds. This parameter applies only to RIST-based and Zixi-based streams.</p>
206    pub fn get_max_latency(&self) -> &::std::option::Option<i32> {
207        self.inner.get_max_latency()
208    }
209    /// <p>The size of the buffer (in milliseconds) to use to sync incoming source data.</p>
210    pub fn max_sync_buffer(mut self, input: i32) -> Self {
211        self.inner = self.inner.max_sync_buffer(input);
212        self
213    }
214    /// <p>The size of the buffer (in milliseconds) to use to sync incoming source data.</p>
215    pub fn set_max_sync_buffer(mut self, input: ::std::option::Option<i32>) -> Self {
216        self.inner = self.inner.set_max_sync_buffer(input);
217        self
218    }
219    /// <p>The size of the buffer (in milliseconds) to use to sync incoming source data.</p>
220    pub fn get_max_sync_buffer(&self) -> &::std::option::Option<i32> {
221        self.inner.get_max_sync_buffer()
222    }
223    ///
224    /// Appends an item to `MediaStreamSourceConfigurations`.
225    ///
226    /// To override the contents of this collection use [`set_media_stream_source_configurations`](Self::set_media_stream_source_configurations).
227    ///
228    /// <p>The media stream that is associated with the source, and the parameters for that association.</p>
229    pub fn media_stream_source_configurations(mut self, input: crate::types::MediaStreamSourceConfigurationRequest) -> Self {
230        self.inner = self.inner.media_stream_source_configurations(input);
231        self
232    }
233    /// <p>The media stream that is associated with the source, and the parameters for that association.</p>
234    pub fn set_media_stream_source_configurations(
235        mut self,
236        input: ::std::option::Option<::std::vec::Vec<crate::types::MediaStreamSourceConfigurationRequest>>,
237    ) -> Self {
238        self.inner = self.inner.set_media_stream_source_configurations(input);
239        self
240    }
241    /// <p>The media stream that is associated with the source, and the parameters for that association.</p>
242    pub fn get_media_stream_source_configurations(
243        &self,
244    ) -> &::std::option::Option<::std::vec::Vec<crate::types::MediaStreamSourceConfigurationRequest>> {
245        self.inner.get_media_stream_source_configurations()
246    }
247    /// <p>The minimum latency in milliseconds for SRT-based streams. In streams that use the SRT protocol, this value that you set on your MediaConnect source or output represents the minimal potential latency of that connection. The latency of the stream is set to the highest number between the sender’s minimum latency and the receiver’s minimum latency.</p>
248    pub fn min_latency(mut self, input: i32) -> Self {
249        self.inner = self.inner.min_latency(input);
250        self
251    }
252    /// <p>The minimum latency in milliseconds for SRT-based streams. In streams that use the SRT protocol, this value that you set on your MediaConnect source or output represents the minimal potential latency of that connection. The latency of the stream is set to the highest number between the sender’s minimum latency and the receiver’s minimum latency.</p>
253    pub fn set_min_latency(mut self, input: ::std::option::Option<i32>) -> Self {
254        self.inner = self.inner.set_min_latency(input);
255        self
256    }
257    /// <p>The minimum latency in milliseconds for SRT-based streams. In streams that use the SRT protocol, this value that you set on your MediaConnect source or output represents the minimal potential latency of that connection. The latency of the stream is set to the highest number between the sender’s minimum latency and the receiver’s minimum latency.</p>
258    pub fn get_min_latency(&self) -> &::std::option::Option<i32> {
259        self.inner.get_min_latency()
260    }
261    /// <p>The protocol that the source uses to deliver the content to MediaConnect.</p><note>
262    /// <p>Elemental MediaConnect no longer supports the Fujitsu QoS protocol. This reference is maintained for legacy purposes only.</p>
263    /// </note>
264    pub fn protocol(mut self, input: crate::types::Protocol) -> Self {
265        self.inner = self.inner.protocol(input);
266        self
267    }
268    /// <p>The protocol that the source uses to deliver the content to MediaConnect.</p><note>
269    /// <p>Elemental MediaConnect no longer supports the Fujitsu QoS protocol. This reference is maintained for legacy purposes only.</p>
270    /// </note>
271    pub fn set_protocol(mut self, input: ::std::option::Option<crate::types::Protocol>) -> Self {
272        self.inner = self.inner.set_protocol(input);
273        self
274    }
275    /// <p>The protocol that the source uses to deliver the content to MediaConnect.</p><note>
276    /// <p>Elemental MediaConnect no longer supports the Fujitsu QoS protocol. This reference is maintained for legacy purposes only.</p>
277    /// </note>
278    pub fn get_protocol(&self) -> &::std::option::Option<crate::types::Protocol> {
279        self.inner.get_protocol()
280    }
281    /// <p>The port that the flow uses to send outbound requests to initiate connection with the sender.</p>
282    pub fn sender_control_port(mut self, input: i32) -> Self {
283        self.inner = self.inner.sender_control_port(input);
284        self
285    }
286    /// <p>The port that the flow uses to send outbound requests to initiate connection with the sender.</p>
287    pub fn set_sender_control_port(mut self, input: ::std::option::Option<i32>) -> Self {
288        self.inner = self.inner.set_sender_control_port(input);
289        self
290    }
291    /// <p>The port that the flow uses to send outbound requests to initiate connection with the sender.</p>
292    pub fn get_sender_control_port(&self) -> &::std::option::Option<i32> {
293        self.inner.get_sender_control_port()
294    }
295    /// <p>The IP address that the flow communicates with to initiate connection with the sender.</p>
296    pub fn sender_ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
297        self.inner = self.inner.sender_ip_address(input.into());
298        self
299    }
300    /// <p>The IP address that the flow communicates with to initiate connection with the sender.</p>
301    pub fn set_sender_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
302        self.inner = self.inner.set_sender_ip_address(input);
303        self
304    }
305    /// <p>The IP address that the flow communicates with to initiate connection with the sender.</p>
306    pub fn get_sender_ip_address(&self) -> &::std::option::Option<::std::string::String> {
307        self.inner.get_sender_ip_address()
308    }
309    /// <p>The ARN of the source that you want to update.</p>
310    pub fn source_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
311        self.inner = self.inner.source_arn(input.into());
312        self
313    }
314    /// <p>The ARN of the source that you want to update.</p>
315    pub fn set_source_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
316        self.inner = self.inner.set_source_arn(input);
317        self
318    }
319    /// <p>The ARN of the source that you want to update.</p>
320    pub fn get_source_arn(&self) -> &::std::option::Option<::std::string::String> {
321        self.inner.get_source_arn()
322    }
323    /// <p>The source IP or domain name for SRT-caller protocol.</p>
324    pub fn source_listener_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
325        self.inner = self.inner.source_listener_address(input.into());
326        self
327    }
328    /// <p>The source IP or domain name for SRT-caller protocol.</p>
329    pub fn set_source_listener_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
330        self.inner = self.inner.set_source_listener_address(input);
331        self
332    }
333    /// <p>The source IP or domain name for SRT-caller protocol.</p>
334    pub fn get_source_listener_address(&self) -> &::std::option::Option<::std::string::String> {
335        self.inner.get_source_listener_address()
336    }
337    /// <p>Source port for SRT-caller protocol.</p>
338    pub fn source_listener_port(mut self, input: i32) -> Self {
339        self.inner = self.inner.source_listener_port(input);
340        self
341    }
342    /// <p>Source port for SRT-caller protocol.</p>
343    pub fn set_source_listener_port(mut self, input: ::std::option::Option<i32>) -> Self {
344        self.inner = self.inner.set_source_listener_port(input);
345        self
346    }
347    /// <p>Source port for SRT-caller protocol.</p>
348    pub fn get_source_listener_port(&self) -> &::std::option::Option<i32> {
349        self.inner.get_source_listener_port()
350    }
351    /// <p>The stream ID that you want to use for this transport. This parameter applies only to Zixi and SRT caller-based streams.</p>
352    pub fn stream_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
353        self.inner = self.inner.stream_id(input.into());
354        self
355    }
356    /// <p>The stream ID that you want to use for this transport. This parameter applies only to Zixi and SRT caller-based streams.</p>
357    pub fn set_stream_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
358        self.inner = self.inner.set_stream_id(input);
359        self
360    }
361    /// <p>The stream ID that you want to use for this transport. This parameter applies only to Zixi and SRT caller-based streams.</p>
362    pub fn get_stream_id(&self) -> &::std::option::Option<::std::string::String> {
363        self.inner.get_stream_id()
364    }
365    /// <p>The name of the VPC interface that you want to send your output to.</p>
366    pub fn vpc_interface_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
367        self.inner = self.inner.vpc_interface_name(input.into());
368        self
369    }
370    /// <p>The name of the VPC interface that you want to send your output to.</p>
371    pub fn set_vpc_interface_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
372        self.inner = self.inner.set_vpc_interface_name(input);
373        self
374    }
375    /// <p>The name of the VPC interface that you want to send your output to.</p>
376    pub fn get_vpc_interface_name(&self) -> &::std::option::Option<::std::string::String> {
377        self.inner.get_vpc_interface_name()
378    }
379    /// <p>The range of IP addresses that are allowed to contribute content to your source. Format the IP addresses as a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.</p>
380    pub fn whitelist_cidr(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
381        self.inner = self.inner.whitelist_cidr(input.into());
382        self
383    }
384    /// <p>The range of IP addresses that are allowed to contribute content to your source. Format the IP addresses as a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.</p>
385    pub fn set_whitelist_cidr(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
386        self.inner = self.inner.set_whitelist_cidr(input);
387        self
388    }
389    /// <p>The range of IP addresses that are allowed to contribute content to your source. Format the IP addresses as a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.</p>
390    pub fn get_whitelist_cidr(&self) -> &::std::option::Option<::std::string::String> {
391        self.inner.get_whitelist_cidr()
392    }
393    /// <p>The source configuration for cloud flows receiving a stream from a bridge.</p>
394    pub fn gateway_bridge_source(mut self, input: crate::types::UpdateGatewayBridgeSourceRequest) -> Self {
395        self.inner = self.inner.gateway_bridge_source(input);
396        self
397    }
398    /// <p>The source configuration for cloud flows receiving a stream from a bridge.</p>
399    pub fn set_gateway_bridge_source(mut self, input: ::std::option::Option<crate::types::UpdateGatewayBridgeSourceRequest>) -> Self {
400        self.inner = self.inner.set_gateway_bridge_source(input);
401        self
402    }
403    /// <p>The source configuration for cloud flows receiving a stream from a bridge.</p>
404    pub fn get_gateway_bridge_source(&self) -> &::std::option::Option<crate::types::UpdateGatewayBridgeSourceRequest> {
405        self.inner.get_gateway_bridge_source()
406    }
407}