aws_sdk_mediapackagev2/operation/update_origin_endpoint/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_origin_endpoint::_update_origin_endpoint_output::UpdateOriginEndpointOutputBuilder;
3
4pub use crate::operation::update_origin_endpoint::_update_origin_endpoint_input::UpdateOriginEndpointInputBuilder;
5
6impl crate::operation::update_origin_endpoint::builders::UpdateOriginEndpointInputBuilder {
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_origin_endpoint::UpdateOriginEndpointOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_origin_endpoint::UpdateOriginEndpointError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_origin_endpoint();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateOriginEndpoint`.
24///
25/// <p>Update the specified origin endpoint. Edit the packaging preferences on an endpoint to optimize the viewing experience. You can't edit the name of the endpoint.</p>
26/// <p>Any edits you make that impact the video output may not be reflected for a few minutes.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct UpdateOriginEndpointFluentBuilder {
29    handle: ::std::sync::Arc<crate::client::Handle>,
30    inner: crate::operation::update_origin_endpoint::builders::UpdateOriginEndpointInputBuilder,
31    config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34    crate::client::customize::internal::CustomizableSend<
35        crate::operation::update_origin_endpoint::UpdateOriginEndpointOutput,
36        crate::operation::update_origin_endpoint::UpdateOriginEndpointError,
37    > for UpdateOriginEndpointFluentBuilder
38{
39    fn send(
40        self,
41        config_override: crate::config::Builder,
42    ) -> crate::client::customize::internal::BoxFuture<
43        crate::client::customize::internal::SendResult<
44            crate::operation::update_origin_endpoint::UpdateOriginEndpointOutput,
45            crate::operation::update_origin_endpoint::UpdateOriginEndpointError,
46        >,
47    > {
48        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49    }
50}
51impl UpdateOriginEndpointFluentBuilder {
52    /// Creates a new `UpdateOriginEndpointFluentBuilder`.
53    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54        Self {
55            handle,
56            inner: ::std::default::Default::default(),
57            config_override: ::std::option::Option::None,
58        }
59    }
60    /// Access the UpdateOriginEndpoint as a reference.
61    pub fn as_input(&self) -> &crate::operation::update_origin_endpoint::builders::UpdateOriginEndpointInputBuilder {
62        &self.inner
63    }
64    /// Sends the request and returns the response.
65    ///
66    /// If an error occurs, an `SdkError` will be returned with additional details that
67    /// can be matched against.
68    ///
69    /// By default, any retryable failures will be retried twice. Retry behavior
70    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71    /// set when configuring the client.
72    pub async fn send(
73        self,
74    ) -> ::std::result::Result<
75        crate::operation::update_origin_endpoint::UpdateOriginEndpointOutput,
76        ::aws_smithy_runtime_api::client::result::SdkError<
77            crate::operation::update_origin_endpoint::UpdateOriginEndpointError,
78            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79        >,
80    > {
81        let input = self
82            .inner
83            .build()
84            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85        let runtime_plugins = crate::operation::update_origin_endpoint::UpdateOriginEndpoint::operation_runtime_plugins(
86            self.handle.runtime_plugins.clone(),
87            &self.handle.conf,
88            self.config_override,
89        );
90        crate::operation::update_origin_endpoint::UpdateOriginEndpoint::orchestrate(&runtime_plugins, input).await
91    }
92
93    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94    pub fn customize(
95        self,
96    ) -> crate::client::customize::CustomizableOperation<
97        crate::operation::update_origin_endpoint::UpdateOriginEndpointOutput,
98        crate::operation::update_origin_endpoint::UpdateOriginEndpointError,
99        Self,
100    > {
101        crate::client::customize::CustomizableOperation::new(self)
102    }
103    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104        self.set_config_override(::std::option::Option::Some(config_override.into()));
105        self
106    }
107
108    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109        self.config_override = config_override;
110        self
111    }
112    /// <p>The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.</p>
113    pub fn channel_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114        self.inner = self.inner.channel_group_name(input.into());
115        self
116    }
117    /// <p>The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.</p>
118    pub fn set_channel_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.inner = self.inner.set_channel_group_name(input);
120        self
121    }
122    /// <p>The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.</p>
123    pub fn get_channel_group_name(&self) -> &::std::option::Option<::std::string::String> {
124        self.inner.get_channel_group_name()
125    }
126    /// <p>The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.</p>
127    pub fn channel_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128        self.inner = self.inner.channel_name(input.into());
129        self
130    }
131    /// <p>The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.</p>
132    pub fn set_channel_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133        self.inner = self.inner.set_channel_name(input);
134        self
135    }
136    /// <p>The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.</p>
137    pub fn get_channel_name(&self) -> &::std::option::Option<::std::string::String> {
138        self.inner.get_channel_name()
139    }
140    /// <p>The name that describes the origin endpoint. The name is the primary identifier for the origin endpoint, and and must be unique for your account in the AWS Region and channel.</p>
141    pub fn origin_endpoint_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142        self.inner = self.inner.origin_endpoint_name(input.into());
143        self
144    }
145    /// <p>The name that describes the origin endpoint. The name is the primary identifier for the origin endpoint, and and must be unique for your account in the AWS Region and channel.</p>
146    pub fn set_origin_endpoint_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147        self.inner = self.inner.set_origin_endpoint_name(input);
148        self
149    }
150    /// <p>The name that describes the origin endpoint. The name is the primary identifier for the origin endpoint, and and must be unique for your account in the AWS Region and channel.</p>
151    pub fn get_origin_endpoint_name(&self) -> &::std::option::Option<::std::string::String> {
152        self.inner.get_origin_endpoint_name()
153    }
154    /// <p>The type of container attached to this origin endpoint. A container type is a file format that encapsulates one or more media streams, such as audio and video, into a single file.</p>
155    pub fn container_type(mut self, input: crate::types::ContainerType) -> Self {
156        self.inner = self.inner.container_type(input);
157        self
158    }
159    /// <p>The type of container attached to this origin endpoint. A container type is a file format that encapsulates one or more media streams, such as audio and video, into a single file.</p>
160    pub fn set_container_type(mut self, input: ::std::option::Option<crate::types::ContainerType>) -> Self {
161        self.inner = self.inner.set_container_type(input);
162        self
163    }
164    /// <p>The type of container attached to this origin endpoint. A container type is a file format that encapsulates one or more media streams, such as audio and video, into a single file.</p>
165    pub fn get_container_type(&self) -> &::std::option::Option<crate::types::ContainerType> {
166        self.inner.get_container_type()
167    }
168    /// <p>The segment configuration, including the segment name, duration, and other configuration values.</p>
169    pub fn segment(mut self, input: crate::types::Segment) -> Self {
170        self.inner = self.inner.segment(input);
171        self
172    }
173    /// <p>The segment configuration, including the segment name, duration, and other configuration values.</p>
174    pub fn set_segment(mut self, input: ::std::option::Option<crate::types::Segment>) -> Self {
175        self.inner = self.inner.set_segment(input);
176        self
177    }
178    /// <p>The segment configuration, including the segment name, duration, and other configuration values.</p>
179    pub fn get_segment(&self) -> &::std::option::Option<crate::types::Segment> {
180        self.inner.get_segment()
181    }
182    /// <p>Any descriptive information that you want to add to the origin endpoint for future identification purposes.</p>
183    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
184        self.inner = self.inner.description(input.into());
185        self
186    }
187    /// <p>Any descriptive information that you want to add to the origin endpoint for future identification purposes.</p>
188    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
189        self.inner = self.inner.set_description(input);
190        self
191    }
192    /// <p>Any descriptive information that you want to add to the origin endpoint for future identification purposes.</p>
193    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
194        self.inner.get_description()
195    }
196    /// <p>The size of the window (in seconds) to create a window of the live stream that's available for on-demand viewing. Viewers can start-over or catch-up on content that falls within the window. The maximum startover window is 1,209,600 seconds (14 days).</p>
197    pub fn startover_window_seconds(mut self, input: i32) -> Self {
198        self.inner = self.inner.startover_window_seconds(input);
199        self
200    }
201    /// <p>The size of the window (in seconds) to create a window of the live stream that's available for on-demand viewing. Viewers can start-over or catch-up on content that falls within the window. The maximum startover window is 1,209,600 seconds (14 days).</p>
202    pub fn set_startover_window_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
203        self.inner = self.inner.set_startover_window_seconds(input);
204        self
205    }
206    /// <p>The size of the window (in seconds) to create a window of the live stream that's available for on-demand viewing. Viewers can start-over or catch-up on content that falls within the window. The maximum startover window is 1,209,600 seconds (14 days).</p>
207    pub fn get_startover_window_seconds(&self) -> &::std::option::Option<i32> {
208        self.inner.get_startover_window_seconds()
209    }
210    ///
211    /// Appends an item to `HlsManifests`.
212    ///
213    /// To override the contents of this collection use [`set_hls_manifests`](Self::set_hls_manifests).
214    ///
215    /// <p>An HTTP live streaming (HLS) manifest configuration.</p>
216    pub fn hls_manifests(mut self, input: crate::types::CreateHlsManifestConfiguration) -> Self {
217        self.inner = self.inner.hls_manifests(input);
218        self
219    }
220    /// <p>An HTTP live streaming (HLS) manifest configuration.</p>
221    pub fn set_hls_manifests(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CreateHlsManifestConfiguration>>) -> Self {
222        self.inner = self.inner.set_hls_manifests(input);
223        self
224    }
225    /// <p>An HTTP live streaming (HLS) manifest configuration.</p>
226    pub fn get_hls_manifests(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CreateHlsManifestConfiguration>> {
227        self.inner.get_hls_manifests()
228    }
229    ///
230    /// Appends an item to `LowLatencyHlsManifests`.
231    ///
232    /// To override the contents of this collection use [`set_low_latency_hls_manifests`](Self::set_low_latency_hls_manifests).
233    ///
234    /// <p>A low-latency HLS manifest configuration.</p>
235    pub fn low_latency_hls_manifests(mut self, input: crate::types::CreateLowLatencyHlsManifestConfiguration) -> Self {
236        self.inner = self.inner.low_latency_hls_manifests(input);
237        self
238    }
239    /// <p>A low-latency HLS manifest configuration.</p>
240    pub fn set_low_latency_hls_manifests(
241        mut self,
242        input: ::std::option::Option<::std::vec::Vec<crate::types::CreateLowLatencyHlsManifestConfiguration>>,
243    ) -> Self {
244        self.inner = self.inner.set_low_latency_hls_manifests(input);
245        self
246    }
247    /// <p>A low-latency HLS manifest configuration.</p>
248    pub fn get_low_latency_hls_manifests(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CreateLowLatencyHlsManifestConfiguration>> {
249        self.inner.get_low_latency_hls_manifests()
250    }
251    ///
252    /// Appends an item to `DashManifests`.
253    ///
254    /// To override the contents of this collection use [`set_dash_manifests`](Self::set_dash_manifests).
255    ///
256    /// <p>A DASH manifest configuration.</p>
257    pub fn dash_manifests(mut self, input: crate::types::CreateDashManifestConfiguration) -> Self {
258        self.inner = self.inner.dash_manifests(input);
259        self
260    }
261    /// <p>A DASH manifest configuration.</p>
262    pub fn set_dash_manifests(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CreateDashManifestConfiguration>>) -> Self {
263        self.inner = self.inner.set_dash_manifests(input);
264        self
265    }
266    /// <p>A DASH manifest configuration.</p>
267    pub fn get_dash_manifests(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CreateDashManifestConfiguration>> {
268        self.inner.get_dash_manifests()
269    }
270    ///
271    /// Appends an item to `MssManifests`.
272    ///
273    /// To override the contents of this collection use [`set_mss_manifests`](Self::set_mss_manifests).
274    ///
275    /// <p>A list of Microsoft Smooth Streaming (MSS) manifest configurations to update for the origin endpoint. This replaces the existing MSS manifest configurations.</p>
276    pub fn mss_manifests(mut self, input: crate::types::CreateMssManifestConfiguration) -> Self {
277        self.inner = self.inner.mss_manifests(input);
278        self
279    }
280    /// <p>A list of Microsoft Smooth Streaming (MSS) manifest configurations to update for the origin endpoint. This replaces the existing MSS manifest configurations.</p>
281    pub fn set_mss_manifests(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CreateMssManifestConfiguration>>) -> Self {
282        self.inner = self.inner.set_mss_manifests(input);
283        self
284    }
285    /// <p>A list of Microsoft Smooth Streaming (MSS) manifest configurations to update for the origin endpoint. This replaces the existing MSS manifest configurations.</p>
286    pub fn get_mss_manifests(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CreateMssManifestConfiguration>> {
287        self.inner.get_mss_manifests()
288    }
289    /// <p>The failover settings for the endpoint.</p>
290    pub fn force_endpoint_error_configuration(mut self, input: crate::types::ForceEndpointErrorConfiguration) -> Self {
291        self.inner = self.inner.force_endpoint_error_configuration(input);
292        self
293    }
294    /// <p>The failover settings for the endpoint.</p>
295    pub fn set_force_endpoint_error_configuration(mut self, input: ::std::option::Option<crate::types::ForceEndpointErrorConfiguration>) -> Self {
296        self.inner = self.inner.set_force_endpoint_error_configuration(input);
297        self
298    }
299    /// <p>The failover settings for the endpoint.</p>
300    pub fn get_force_endpoint_error_configuration(&self) -> &::std::option::Option<crate::types::ForceEndpointErrorConfiguration> {
301        self.inner.get_force_endpoint_error_configuration()
302    }
303    /// <p>The expected current Entity Tag (ETag) for the resource. If the specified ETag does not match the resource's current entity tag, the update request will be rejected.</p>
304    pub fn e_tag(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
305        self.inner = self.inner.e_tag(input.into());
306        self
307    }
308    /// <p>The expected current Entity Tag (ETag) for the resource. If the specified ETag does not match the resource's current entity tag, the update request will be rejected.</p>
309    pub fn set_e_tag(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
310        self.inner = self.inner.set_e_tag(input);
311        self
312    }
313    /// <p>The expected current Entity Tag (ETag) for the resource. If the specified ETag does not match the resource's current entity tag, the update request will be rejected.</p>
314    pub fn get_e_tag(&self) -> &::std::option::Option<::std::string::String> {
315        self.inner.get_e_tag()
316    }
317}