aws_sdk_mediapackage/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/// Updates an existing OriginEndpoint.
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateOriginEndpointFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_origin_endpoint::builders::UpdateOriginEndpointInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_origin_endpoint::UpdateOriginEndpointOutput,
35        crate::operation::update_origin_endpoint::UpdateOriginEndpointError,
36    > for UpdateOriginEndpointFluentBuilder
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_origin_endpoint::UpdateOriginEndpointOutput,
44            crate::operation::update_origin_endpoint::UpdateOriginEndpointError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateOriginEndpointFluentBuilder {
51    /// Creates a new `UpdateOriginEndpointFluentBuilder`.
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 UpdateOriginEndpoint as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_origin_endpoint::builders::UpdateOriginEndpointInputBuilder {
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_origin_endpoint::UpdateOriginEndpointOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_origin_endpoint::UpdateOriginEndpointError,
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_origin_endpoint::UpdateOriginEndpoint::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_origin_endpoint::UpdateOriginEndpoint::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_origin_endpoint::UpdateOriginEndpointOutput,
97        crate::operation::update_origin_endpoint::UpdateOriginEndpointError,
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    /// CDN Authorization credentials
112    pub fn authorization(mut self, input: crate::types::Authorization) -> Self {
113        self.inner = self.inner.authorization(input);
114        self
115    }
116    /// CDN Authorization credentials
117    pub fn set_authorization(mut self, input: ::std::option::Option<crate::types::Authorization>) -> Self {
118        self.inner = self.inner.set_authorization(input);
119        self
120    }
121    /// CDN Authorization credentials
122    pub fn get_authorization(&self) -> &::std::option::Option<crate::types::Authorization> {
123        self.inner.get_authorization()
124    }
125    /// A Common Media Application Format (CMAF) packaging configuration.
126    pub fn cmaf_package(mut self, input: crate::types::CmafPackageCreateOrUpdateParameters) -> Self {
127        self.inner = self.inner.cmaf_package(input);
128        self
129    }
130    /// A Common Media Application Format (CMAF) packaging configuration.
131    pub fn set_cmaf_package(mut self, input: ::std::option::Option<crate::types::CmafPackageCreateOrUpdateParameters>) -> Self {
132        self.inner = self.inner.set_cmaf_package(input);
133        self
134    }
135    /// A Common Media Application Format (CMAF) packaging configuration.
136    pub fn get_cmaf_package(&self) -> &::std::option::Option<crate::types::CmafPackageCreateOrUpdateParameters> {
137        self.inner.get_cmaf_package()
138    }
139    /// A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration.
140    pub fn dash_package(mut self, input: crate::types::DashPackage) -> Self {
141        self.inner = self.inner.dash_package(input);
142        self
143    }
144    /// A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration.
145    pub fn set_dash_package(mut self, input: ::std::option::Option<crate::types::DashPackage>) -> Self {
146        self.inner = self.inner.set_dash_package(input);
147        self
148    }
149    /// A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration.
150    pub fn get_dash_package(&self) -> &::std::option::Option<crate::types::DashPackage> {
151        self.inner.get_dash_package()
152    }
153    /// A short text description of the OriginEndpoint.
154    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155        self.inner = self.inner.description(input.into());
156        self
157    }
158    /// A short text description of the OriginEndpoint.
159    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160        self.inner = self.inner.set_description(input);
161        self
162    }
163    /// A short text description of the OriginEndpoint.
164    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
165        self.inner.get_description()
166    }
167    /// An HTTP Live Streaming (HLS) packaging configuration.
168    pub fn hls_package(mut self, input: crate::types::HlsPackage) -> Self {
169        self.inner = self.inner.hls_package(input);
170        self
171    }
172    /// An HTTP Live Streaming (HLS) packaging configuration.
173    pub fn set_hls_package(mut self, input: ::std::option::Option<crate::types::HlsPackage>) -> Self {
174        self.inner = self.inner.set_hls_package(input);
175        self
176    }
177    /// An HTTP Live Streaming (HLS) packaging configuration.
178    pub fn get_hls_package(&self) -> &::std::option::Option<crate::types::HlsPackage> {
179        self.inner.get_hls_package()
180    }
181    /// The ID of the OriginEndpoint to update.
182    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
183        self.inner = self.inner.id(input.into());
184        self
185    }
186    /// The ID of the OriginEndpoint to update.
187    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
188        self.inner = self.inner.set_id(input);
189        self
190    }
191    /// The ID of the OriginEndpoint to update.
192    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
193        self.inner.get_id()
194    }
195    /// A short string that will be appended to the end of the Endpoint URL.
196    pub fn manifest_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
197        self.inner = self.inner.manifest_name(input.into());
198        self
199    }
200    /// A short string that will be appended to the end of the Endpoint URL.
201    pub fn set_manifest_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
202        self.inner = self.inner.set_manifest_name(input);
203        self
204    }
205    /// A short string that will be appended to the end of the Endpoint URL.
206    pub fn get_manifest_name(&self) -> &::std::option::Option<::std::string::String> {
207        self.inner.get_manifest_name()
208    }
209    /// A Microsoft Smooth Streaming (MSS) packaging configuration.
210    pub fn mss_package(mut self, input: crate::types::MssPackage) -> Self {
211        self.inner = self.inner.mss_package(input);
212        self
213    }
214    /// A Microsoft Smooth Streaming (MSS) packaging configuration.
215    pub fn set_mss_package(mut self, input: ::std::option::Option<crate::types::MssPackage>) -> Self {
216        self.inner = self.inner.set_mss_package(input);
217        self
218    }
219    /// A Microsoft Smooth Streaming (MSS) packaging configuration.
220    pub fn get_mss_package(&self) -> &::std::option::Option<crate::types::MssPackage> {
221        self.inner.get_mss_package()
222    }
223    /// Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination
224    pub fn origination(mut self, input: crate::types::Origination) -> Self {
225        self.inner = self.inner.origination(input);
226        self
227    }
228    /// Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination
229    pub fn set_origination(mut self, input: ::std::option::Option<crate::types::Origination>) -> Self {
230        self.inner = self.inner.set_origination(input);
231        self
232    }
233    /// Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination
234    pub fn get_origination(&self) -> &::std::option::Option<crate::types::Origination> {
235        self.inner.get_origination()
236    }
237    /// Maximum duration (in seconds) of content to retain for startover playback. If not specified, startover playback will be disabled for the OriginEndpoint.
238    pub fn startover_window_seconds(mut self, input: i32) -> Self {
239        self.inner = self.inner.startover_window_seconds(input);
240        self
241    }
242    /// Maximum duration (in seconds) of content to retain for startover playback. If not specified, startover playback will be disabled for the OriginEndpoint.
243    pub fn set_startover_window_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
244        self.inner = self.inner.set_startover_window_seconds(input);
245        self
246    }
247    /// Maximum duration (in seconds) of content to retain for startover playback. If not specified, startover playback will be disabled for the OriginEndpoint.
248    pub fn get_startover_window_seconds(&self) -> &::std::option::Option<i32> {
249        self.inner.get_startover_window_seconds()
250    }
251    /// Amount of delay (in seconds) to enforce on the playback of live content. If not specified, there will be no time delay in effect for the OriginEndpoint.
252    pub fn time_delay_seconds(mut self, input: i32) -> Self {
253        self.inner = self.inner.time_delay_seconds(input);
254        self
255    }
256    /// Amount of delay (in seconds) to enforce on the playback of live content. If not specified, there will be no time delay in effect for the OriginEndpoint.
257    pub fn set_time_delay_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
258        self.inner = self.inner.set_time_delay_seconds(input);
259        self
260    }
261    /// Amount of delay (in seconds) to enforce on the playback of live content. If not specified, there will be no time delay in effect for the OriginEndpoint.
262    pub fn get_time_delay_seconds(&self) -> &::std::option::Option<i32> {
263        self.inner.get_time_delay_seconds()
264    }
265    ///
266    /// Appends an item to `Whitelist`.
267    ///
268    /// To override the contents of this collection use [`set_whitelist`](Self::set_whitelist).
269    ///
270    /// A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
271    pub fn whitelist(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
272        self.inner = self.inner.whitelist(input.into());
273        self
274    }
275    /// A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
276    pub fn set_whitelist(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
277        self.inner = self.inner.set_whitelist(input);
278        self
279    }
280    /// A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
281    pub fn get_whitelist(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
282        self.inner.get_whitelist()
283    }
284}