aws_sdk_mediapackagev2/types/
_origin_endpoint_list_configuration.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The configuration of the origin endpoint.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct OriginEndpointListConfiguration {
7    /// <p>The Amazon Resource Name (ARN) associated with the resource.</p>
8    pub arn: ::std::string::String,
9    /// <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>
10    pub channel_group_name: ::std::string::String,
11    /// <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>
12    pub channel_name: ::std::string::String,
13    /// <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>
14    pub origin_endpoint_name: ::std::string::String,
15    /// <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>
16    pub container_type: crate::types::ContainerType,
17    /// <p>Any descriptive information that you want to add to the origin endpoint for future identification purposes.</p>
18    pub description: ::std::option::Option<::std::string::String>,
19    /// <p>The date and time the origin endpoint was created.</p>
20    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
21    /// <p>The date and time the origin endpoint was modified.</p>
22    pub modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
23    /// <p>An HTTP live streaming (HLS) manifest configuration.</p>
24    pub hls_manifests: ::std::option::Option<::std::vec::Vec<crate::types::ListHlsManifestConfiguration>>,
25    /// <p>A low-latency HLS manifest configuration.</p>
26    pub low_latency_hls_manifests: ::std::option::Option<::std::vec::Vec<crate::types::ListLowLatencyHlsManifestConfiguration>>,
27    /// <p>A DASH manifest configuration.</p>
28    pub dash_manifests: ::std::option::Option<::std::vec::Vec<crate::types::ListDashManifestConfiguration>>,
29    /// <p>A list of Microsoft Smooth Streaming (MSS) manifest configurations associated with the origin endpoint. Each configuration represents a different MSS streaming option available from this endpoint.</p>
30    pub mss_manifests: ::std::option::Option<::std::vec::Vec<crate::types::ListMssManifestConfiguration>>,
31    /// <p>The failover settings for the endpoint.</p>
32    pub force_endpoint_error_configuration: ::std::option::Option<crate::types::ForceEndpointErrorConfiguration>,
33}
34impl OriginEndpointListConfiguration {
35    /// <p>The Amazon Resource Name (ARN) associated with the resource.</p>
36    pub fn arn(&self) -> &str {
37        use std::ops::Deref;
38        self.arn.deref()
39    }
40    /// <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>
41    pub fn channel_group_name(&self) -> &str {
42        use std::ops::Deref;
43        self.channel_group_name.deref()
44    }
45    /// <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>
46    pub fn channel_name(&self) -> &str {
47        use std::ops::Deref;
48        self.channel_name.deref()
49    }
50    /// <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>
51    pub fn origin_endpoint_name(&self) -> &str {
52        use std::ops::Deref;
53        self.origin_endpoint_name.deref()
54    }
55    /// <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>
56    pub fn container_type(&self) -> &crate::types::ContainerType {
57        &self.container_type
58    }
59    /// <p>Any descriptive information that you want to add to the origin endpoint for future identification purposes.</p>
60    pub fn description(&self) -> ::std::option::Option<&str> {
61        self.description.as_deref()
62    }
63    /// <p>The date and time the origin endpoint was created.</p>
64    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
65        self.created_at.as_ref()
66    }
67    /// <p>The date and time the origin endpoint was modified.</p>
68    pub fn modified_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
69        self.modified_at.as_ref()
70    }
71    /// <p>An HTTP live streaming (HLS) manifest configuration.</p>
72    ///
73    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.hls_manifests.is_none()`.
74    pub fn hls_manifests(&self) -> &[crate::types::ListHlsManifestConfiguration] {
75        self.hls_manifests.as_deref().unwrap_or_default()
76    }
77    /// <p>A low-latency HLS manifest configuration.</p>
78    ///
79    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.low_latency_hls_manifests.is_none()`.
80    pub fn low_latency_hls_manifests(&self) -> &[crate::types::ListLowLatencyHlsManifestConfiguration] {
81        self.low_latency_hls_manifests.as_deref().unwrap_or_default()
82    }
83    /// <p>A DASH manifest configuration.</p>
84    ///
85    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.dash_manifests.is_none()`.
86    pub fn dash_manifests(&self) -> &[crate::types::ListDashManifestConfiguration] {
87        self.dash_manifests.as_deref().unwrap_or_default()
88    }
89    /// <p>A list of Microsoft Smooth Streaming (MSS) manifest configurations associated with the origin endpoint. Each configuration represents a different MSS streaming option available from this endpoint.</p>
90    ///
91    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.mss_manifests.is_none()`.
92    pub fn mss_manifests(&self) -> &[crate::types::ListMssManifestConfiguration] {
93        self.mss_manifests.as_deref().unwrap_or_default()
94    }
95    /// <p>The failover settings for the endpoint.</p>
96    pub fn force_endpoint_error_configuration(&self) -> ::std::option::Option<&crate::types::ForceEndpointErrorConfiguration> {
97        self.force_endpoint_error_configuration.as_ref()
98    }
99}
100impl OriginEndpointListConfiguration {
101    /// Creates a new builder-style object to manufacture [`OriginEndpointListConfiguration`](crate::types::OriginEndpointListConfiguration).
102    pub fn builder() -> crate::types::builders::OriginEndpointListConfigurationBuilder {
103        crate::types::builders::OriginEndpointListConfigurationBuilder::default()
104    }
105}
106
107/// A builder for [`OriginEndpointListConfiguration`](crate::types::OriginEndpointListConfiguration).
108#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
109#[non_exhaustive]
110pub struct OriginEndpointListConfigurationBuilder {
111    pub(crate) arn: ::std::option::Option<::std::string::String>,
112    pub(crate) channel_group_name: ::std::option::Option<::std::string::String>,
113    pub(crate) channel_name: ::std::option::Option<::std::string::String>,
114    pub(crate) origin_endpoint_name: ::std::option::Option<::std::string::String>,
115    pub(crate) container_type: ::std::option::Option<crate::types::ContainerType>,
116    pub(crate) description: ::std::option::Option<::std::string::String>,
117    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
118    pub(crate) modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
119    pub(crate) hls_manifests: ::std::option::Option<::std::vec::Vec<crate::types::ListHlsManifestConfiguration>>,
120    pub(crate) low_latency_hls_manifests: ::std::option::Option<::std::vec::Vec<crate::types::ListLowLatencyHlsManifestConfiguration>>,
121    pub(crate) dash_manifests: ::std::option::Option<::std::vec::Vec<crate::types::ListDashManifestConfiguration>>,
122    pub(crate) mss_manifests: ::std::option::Option<::std::vec::Vec<crate::types::ListMssManifestConfiguration>>,
123    pub(crate) force_endpoint_error_configuration: ::std::option::Option<crate::types::ForceEndpointErrorConfiguration>,
124}
125impl OriginEndpointListConfigurationBuilder {
126    /// <p>The Amazon Resource Name (ARN) associated with the resource.</p>
127    /// This field is required.
128    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.arn = ::std::option::Option::Some(input.into());
130        self
131    }
132    /// <p>The Amazon Resource Name (ARN) associated with the resource.</p>
133    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.arn = input;
135        self
136    }
137    /// <p>The Amazon Resource Name (ARN) associated with the resource.</p>
138    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
139        &self.arn
140    }
141    /// <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>
142    /// This field is required.
143    pub fn channel_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144        self.channel_group_name = ::std::option::Option::Some(input.into());
145        self
146    }
147    /// <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>
148    pub fn set_channel_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149        self.channel_group_name = input;
150        self
151    }
152    /// <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>
153    pub fn get_channel_group_name(&self) -> &::std::option::Option<::std::string::String> {
154        &self.channel_group_name
155    }
156    /// <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>
157    /// This field is required.
158    pub fn channel_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159        self.channel_name = ::std::option::Option::Some(input.into());
160        self
161    }
162    /// <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>
163    pub fn set_channel_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164        self.channel_name = input;
165        self
166    }
167    /// <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>
168    pub fn get_channel_name(&self) -> &::std::option::Option<::std::string::String> {
169        &self.channel_name
170    }
171    /// <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>
172    /// This field is required.
173    pub fn origin_endpoint_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
174        self.origin_endpoint_name = ::std::option::Option::Some(input.into());
175        self
176    }
177    /// <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>
178    pub fn set_origin_endpoint_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
179        self.origin_endpoint_name = input;
180        self
181    }
182    /// <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>
183    pub fn get_origin_endpoint_name(&self) -> &::std::option::Option<::std::string::String> {
184        &self.origin_endpoint_name
185    }
186    /// <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>
187    /// This field is required.
188    pub fn container_type(mut self, input: crate::types::ContainerType) -> Self {
189        self.container_type = ::std::option::Option::Some(input);
190        self
191    }
192    /// <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>
193    pub fn set_container_type(mut self, input: ::std::option::Option<crate::types::ContainerType>) -> Self {
194        self.container_type = input;
195        self
196    }
197    /// <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>
198    pub fn get_container_type(&self) -> &::std::option::Option<crate::types::ContainerType> {
199        &self.container_type
200    }
201    /// <p>Any descriptive information that you want to add to the origin endpoint for future identification purposes.</p>
202    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
203        self.description = ::std::option::Option::Some(input.into());
204        self
205    }
206    /// <p>Any descriptive information that you want to add to the origin endpoint for future identification purposes.</p>
207    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
208        self.description = input;
209        self
210    }
211    /// <p>Any descriptive information that you want to add to the origin endpoint for future identification purposes.</p>
212    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
213        &self.description
214    }
215    /// <p>The date and time the origin endpoint was created.</p>
216    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
217        self.created_at = ::std::option::Option::Some(input);
218        self
219    }
220    /// <p>The date and time the origin endpoint was created.</p>
221    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
222        self.created_at = input;
223        self
224    }
225    /// <p>The date and time the origin endpoint was created.</p>
226    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
227        &self.created_at
228    }
229    /// <p>The date and time the origin endpoint was modified.</p>
230    pub fn modified_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
231        self.modified_at = ::std::option::Option::Some(input);
232        self
233    }
234    /// <p>The date and time the origin endpoint was modified.</p>
235    pub fn set_modified_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
236        self.modified_at = input;
237        self
238    }
239    /// <p>The date and time the origin endpoint was modified.</p>
240    pub fn get_modified_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
241        &self.modified_at
242    }
243    /// Appends an item to `hls_manifests`.
244    ///
245    /// To override the contents of this collection use [`set_hls_manifests`](Self::set_hls_manifests).
246    ///
247    /// <p>An HTTP live streaming (HLS) manifest configuration.</p>
248    pub fn hls_manifests(mut self, input: crate::types::ListHlsManifestConfiguration) -> Self {
249        let mut v = self.hls_manifests.unwrap_or_default();
250        v.push(input);
251        self.hls_manifests = ::std::option::Option::Some(v);
252        self
253    }
254    /// <p>An HTTP live streaming (HLS) manifest configuration.</p>
255    pub fn set_hls_manifests(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ListHlsManifestConfiguration>>) -> Self {
256        self.hls_manifests = input;
257        self
258    }
259    /// <p>An HTTP live streaming (HLS) manifest configuration.</p>
260    pub fn get_hls_manifests(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ListHlsManifestConfiguration>> {
261        &self.hls_manifests
262    }
263    /// Appends an item to `low_latency_hls_manifests`.
264    ///
265    /// To override the contents of this collection use [`set_low_latency_hls_manifests`](Self::set_low_latency_hls_manifests).
266    ///
267    /// <p>A low-latency HLS manifest configuration.</p>
268    pub fn low_latency_hls_manifests(mut self, input: crate::types::ListLowLatencyHlsManifestConfiguration) -> Self {
269        let mut v = self.low_latency_hls_manifests.unwrap_or_default();
270        v.push(input);
271        self.low_latency_hls_manifests = ::std::option::Option::Some(v);
272        self
273    }
274    /// <p>A low-latency HLS manifest configuration.</p>
275    pub fn set_low_latency_hls_manifests(
276        mut self,
277        input: ::std::option::Option<::std::vec::Vec<crate::types::ListLowLatencyHlsManifestConfiguration>>,
278    ) -> Self {
279        self.low_latency_hls_manifests = input;
280        self
281    }
282    /// <p>A low-latency HLS manifest configuration.</p>
283    pub fn get_low_latency_hls_manifests(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ListLowLatencyHlsManifestConfiguration>> {
284        &self.low_latency_hls_manifests
285    }
286    /// Appends an item to `dash_manifests`.
287    ///
288    /// To override the contents of this collection use [`set_dash_manifests`](Self::set_dash_manifests).
289    ///
290    /// <p>A DASH manifest configuration.</p>
291    pub fn dash_manifests(mut self, input: crate::types::ListDashManifestConfiguration) -> Self {
292        let mut v = self.dash_manifests.unwrap_or_default();
293        v.push(input);
294        self.dash_manifests = ::std::option::Option::Some(v);
295        self
296    }
297    /// <p>A DASH manifest configuration.</p>
298    pub fn set_dash_manifests(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ListDashManifestConfiguration>>) -> Self {
299        self.dash_manifests = input;
300        self
301    }
302    /// <p>A DASH manifest configuration.</p>
303    pub fn get_dash_manifests(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ListDashManifestConfiguration>> {
304        &self.dash_manifests
305    }
306    /// Appends an item to `mss_manifests`.
307    ///
308    /// To override the contents of this collection use [`set_mss_manifests`](Self::set_mss_manifests).
309    ///
310    /// <p>A list of Microsoft Smooth Streaming (MSS) manifest configurations associated with the origin endpoint. Each configuration represents a different MSS streaming option available from this endpoint.</p>
311    pub fn mss_manifests(mut self, input: crate::types::ListMssManifestConfiguration) -> Self {
312        let mut v = self.mss_manifests.unwrap_or_default();
313        v.push(input);
314        self.mss_manifests = ::std::option::Option::Some(v);
315        self
316    }
317    /// <p>A list of Microsoft Smooth Streaming (MSS) manifest configurations associated with the origin endpoint. Each configuration represents a different MSS streaming option available from this endpoint.</p>
318    pub fn set_mss_manifests(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ListMssManifestConfiguration>>) -> Self {
319        self.mss_manifests = input;
320        self
321    }
322    /// <p>A list of Microsoft Smooth Streaming (MSS) manifest configurations associated with the origin endpoint. Each configuration represents a different MSS streaming option available from this endpoint.</p>
323    pub fn get_mss_manifests(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ListMssManifestConfiguration>> {
324        &self.mss_manifests
325    }
326    /// <p>The failover settings for the endpoint.</p>
327    pub fn force_endpoint_error_configuration(mut self, input: crate::types::ForceEndpointErrorConfiguration) -> Self {
328        self.force_endpoint_error_configuration = ::std::option::Option::Some(input);
329        self
330    }
331    /// <p>The failover settings for the endpoint.</p>
332    pub fn set_force_endpoint_error_configuration(mut self, input: ::std::option::Option<crate::types::ForceEndpointErrorConfiguration>) -> Self {
333        self.force_endpoint_error_configuration = input;
334        self
335    }
336    /// <p>The failover settings for the endpoint.</p>
337    pub fn get_force_endpoint_error_configuration(&self) -> &::std::option::Option<crate::types::ForceEndpointErrorConfiguration> {
338        &self.force_endpoint_error_configuration
339    }
340    /// Consumes the builder and constructs a [`OriginEndpointListConfiguration`](crate::types::OriginEndpointListConfiguration).
341    /// This method will fail if any of the following fields are not set:
342    /// - [`arn`](crate::types::builders::OriginEndpointListConfigurationBuilder::arn)
343    /// - [`channel_group_name`](crate::types::builders::OriginEndpointListConfigurationBuilder::channel_group_name)
344    /// - [`channel_name`](crate::types::builders::OriginEndpointListConfigurationBuilder::channel_name)
345    /// - [`origin_endpoint_name`](crate::types::builders::OriginEndpointListConfigurationBuilder::origin_endpoint_name)
346    /// - [`container_type`](crate::types::builders::OriginEndpointListConfigurationBuilder::container_type)
347    pub fn build(self) -> ::std::result::Result<crate::types::OriginEndpointListConfiguration, ::aws_smithy_types::error::operation::BuildError> {
348        ::std::result::Result::Ok(crate::types::OriginEndpointListConfiguration {
349            arn: self.arn.ok_or_else(|| {
350                ::aws_smithy_types::error::operation::BuildError::missing_field(
351                    "arn",
352                    "arn was not specified but it is required when building OriginEndpointListConfiguration",
353                )
354            })?,
355            channel_group_name: self.channel_group_name.ok_or_else(|| {
356                ::aws_smithy_types::error::operation::BuildError::missing_field(
357                    "channel_group_name",
358                    "channel_group_name was not specified but it is required when building OriginEndpointListConfiguration",
359                )
360            })?,
361            channel_name: self.channel_name.ok_or_else(|| {
362                ::aws_smithy_types::error::operation::BuildError::missing_field(
363                    "channel_name",
364                    "channel_name was not specified but it is required when building OriginEndpointListConfiguration",
365                )
366            })?,
367            origin_endpoint_name: self.origin_endpoint_name.ok_or_else(|| {
368                ::aws_smithy_types::error::operation::BuildError::missing_field(
369                    "origin_endpoint_name",
370                    "origin_endpoint_name was not specified but it is required when building OriginEndpointListConfiguration",
371                )
372            })?,
373            container_type: self.container_type.ok_or_else(|| {
374                ::aws_smithy_types::error::operation::BuildError::missing_field(
375                    "container_type",
376                    "container_type was not specified but it is required when building OriginEndpointListConfiguration",
377                )
378            })?,
379            description: self.description,
380            created_at: self.created_at,
381            modified_at: self.modified_at,
382            hls_manifests: self.hls_manifests,
383            low_latency_hls_manifests: self.low_latency_hls_manifests,
384            dash_manifests: self.dash_manifests,
385            mss_manifests: self.mss_manifests,
386            force_endpoint_error_configuration: self.force_endpoint_error_configuration,
387        })
388    }
389}