aws_sdk_mediapackagev2/types/
_origin_endpoint_list_configuration.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct OriginEndpointListConfiguration {
7 pub arn: ::std::string::String,
9 pub channel_group_name: ::std::string::String,
11 pub channel_name: ::std::string::String,
13 pub origin_endpoint_name: ::std::string::String,
15 pub container_type: crate::types::ContainerType,
17 pub description: ::std::option::Option<::std::string::String>,
19 pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
21 pub modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
23 pub hls_manifests: ::std::option::Option<::std::vec::Vec<crate::types::ListHlsManifestConfiguration>>,
25 pub low_latency_hls_manifests: ::std::option::Option<::std::vec::Vec<crate::types::ListLowLatencyHlsManifestConfiguration>>,
27 pub dash_manifests: ::std::option::Option<::std::vec::Vec<crate::types::ListDashManifestConfiguration>>,
29 pub mss_manifests: ::std::option::Option<::std::vec::Vec<crate::types::ListMssManifestConfiguration>>,
31 pub force_endpoint_error_configuration: ::std::option::Option<crate::types::ForceEndpointErrorConfiguration>,
33}
34impl OriginEndpointListConfiguration {
35 pub fn arn(&self) -> &str {
37 use std::ops::Deref;
38 self.arn.deref()
39 }
40 pub fn channel_group_name(&self) -> &str {
42 use std::ops::Deref;
43 self.channel_group_name.deref()
44 }
45 pub fn channel_name(&self) -> &str {
47 use std::ops::Deref;
48 self.channel_name.deref()
49 }
50 pub fn origin_endpoint_name(&self) -> &str {
52 use std::ops::Deref;
53 self.origin_endpoint_name.deref()
54 }
55 pub fn container_type(&self) -> &crate::types::ContainerType {
57 &self.container_type
58 }
59 pub fn description(&self) -> ::std::option::Option<&str> {
61 self.description.as_deref()
62 }
63 pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
65 self.created_at.as_ref()
66 }
67 pub fn modified_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
69 self.modified_at.as_ref()
70 }
71 pub fn hls_manifests(&self) -> &[crate::types::ListHlsManifestConfiguration] {
75 self.hls_manifests.as_deref().unwrap_or_default()
76 }
77 pub fn low_latency_hls_manifests(&self) -> &[crate::types::ListLowLatencyHlsManifestConfiguration] {
81 self.low_latency_hls_manifests.as_deref().unwrap_or_default()
82 }
83 pub fn dash_manifests(&self) -> &[crate::types::ListDashManifestConfiguration] {
87 self.dash_manifests.as_deref().unwrap_or_default()
88 }
89 pub fn mss_manifests(&self) -> &[crate::types::ListMssManifestConfiguration] {
93 self.mss_manifests.as_deref().unwrap_or_default()
94 }
95 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 pub fn builder() -> crate::types::builders::OriginEndpointListConfigurationBuilder {
103 crate::types::builders::OriginEndpointListConfigurationBuilder::default()
104 }
105}
106
107#[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 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 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134 self.arn = input;
135 self
136 }
137 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
139 &self.arn
140 }
141 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 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 pub fn get_channel_group_name(&self) -> &::std::option::Option<::std::string::String> {
154 &self.channel_group_name
155 }
156 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 pub fn set_channel_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164 self.channel_name = input;
165 self
166 }
167 pub fn get_channel_name(&self) -> &::std::option::Option<::std::string::String> {
169 &self.channel_name
170 }
171 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 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 pub fn get_origin_endpoint_name(&self) -> &::std::option::Option<::std::string::String> {
184 &self.origin_endpoint_name
185 }
186 pub fn container_type(mut self, input: crate::types::ContainerType) -> Self {
189 self.container_type = ::std::option::Option::Some(input);
190 self
191 }
192 pub fn set_container_type(mut self, input: ::std::option::Option<crate::types::ContainerType>) -> Self {
194 self.container_type = input;
195 self
196 }
197 pub fn get_container_type(&self) -> &::std::option::Option<crate::types::ContainerType> {
199 &self.container_type
200 }
201 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
208 self.description = input;
209 self
210 }
211 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
213 &self.description
214 }
215 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 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 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
227 &self.created_at
228 }
229 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 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 pub fn get_modified_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
241 &self.modified_at
242 }
243 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 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 pub fn get_hls_manifests(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ListHlsManifestConfiguration>> {
261 &self.hls_manifests
262 }
263 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 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 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 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 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 pub fn get_dash_manifests(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ListDashManifestConfiguration>> {
304 &self.dash_manifests
305 }
306 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 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 pub fn get_mss_manifests(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ListMssManifestConfiguration>> {
324 &self.mss_manifests
325 }
326 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 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 pub fn get_force_endpoint_error_configuration(&self) -> &::std::option::Option<crate::types::ForceEndpointErrorConfiguration> {
338 &self.force_endpoint_error_configuration
339 }
340 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}