aws_sdk_mediapackagev2/operation/update_channel/
_update_channel_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateChannelOutput {
6    /// <p>The Amazon Resource Name (ARN) associated with the resource.</p>
7    pub arn: ::std::string::String,
8    /// <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>
9    pub channel_name: ::std::string::String,
10    /// <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>
11    pub channel_group_name: ::std::string::String,
12    /// <p>The date and time the channel was created.</p>
13    pub created_at: ::aws_smithy_types::DateTime,
14    /// <p>The date and time the channel was modified.</p>
15    pub modified_at: ::aws_smithy_types::DateTime,
16    /// <p>The description for your channel.</p>
17    pub description: ::std::option::Option<::std::string::String>,
18    /// <p>The list of ingest endpoints.</p>
19    pub ingest_endpoints: ::std::option::Option<::std::vec::Vec<crate::types::IngestEndpoint>>,
20    /// <p>The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior.</p>
21    /// <p>The allowed values are:</p>
22    /// <ul>
23    /// <li>
24    /// <p><code>HLS</code> - The HLS streaming specification (which defines M3U8 manifests and TS segments).</p></li>
25    /// <li>
26    /// <p><code>CMAF</code> - The DASH-IF CMAF Ingest specification (which defines CMAF segments with optional DASH manifests).</p></li>
27    /// </ul>
28    pub input_type: ::std::option::Option<crate::types::InputType>,
29    /// <p>The current Entity Tag (ETag) associated with this resource. The entity tag can be used to safely make concurrent updates to the resource.</p>
30    pub e_tag: ::std::option::Option<::std::string::String>,
31    /// <p>The comma-separated list of tag key:value pairs assigned to the channel.</p>
32    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
33    /// <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
34    pub input_switch_configuration: ::std::option::Option<crate::types::InputSwitchConfiguration>,
35    /// <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
36    pub output_header_configuration: ::std::option::Option<crate::types::OutputHeaderConfiguration>,
37    _request_id: Option<String>,
38}
39impl UpdateChannelOutput {
40    /// <p>The Amazon Resource Name (ARN) associated with the resource.</p>
41    pub fn arn(&self) -> &str {
42        use std::ops::Deref;
43        self.arn.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 channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.</p>
51    pub fn channel_group_name(&self) -> &str {
52        use std::ops::Deref;
53        self.channel_group_name.deref()
54    }
55    /// <p>The date and time the channel was created.</p>
56    pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
57        &self.created_at
58    }
59    /// <p>The date and time the channel was modified.</p>
60    pub fn modified_at(&self) -> &::aws_smithy_types::DateTime {
61        &self.modified_at
62    }
63    /// <p>The description for your channel.</p>
64    pub fn description(&self) -> ::std::option::Option<&str> {
65        self.description.as_deref()
66    }
67    /// <p>The list of ingest endpoints.</p>
68    ///
69    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.ingest_endpoints.is_none()`.
70    pub fn ingest_endpoints(&self) -> &[crate::types::IngestEndpoint] {
71        self.ingest_endpoints.as_deref().unwrap_or_default()
72    }
73    /// <p>The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior.</p>
74    /// <p>The allowed values are:</p>
75    /// <ul>
76    /// <li>
77    /// <p><code>HLS</code> - The HLS streaming specification (which defines M3U8 manifests and TS segments).</p></li>
78    /// <li>
79    /// <p><code>CMAF</code> - The DASH-IF CMAF Ingest specification (which defines CMAF segments with optional DASH manifests).</p></li>
80    /// </ul>
81    pub fn input_type(&self) -> ::std::option::Option<&crate::types::InputType> {
82        self.input_type.as_ref()
83    }
84    /// <p>The current Entity Tag (ETag) associated with this resource. The entity tag can be used to safely make concurrent updates to the resource.</p>
85    pub fn e_tag(&self) -> ::std::option::Option<&str> {
86        self.e_tag.as_deref()
87    }
88    /// <p>The comma-separated list of tag key:value pairs assigned to the channel.</p>
89    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
90        self.tags.as_ref()
91    }
92    /// <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
93    pub fn input_switch_configuration(&self) -> ::std::option::Option<&crate::types::InputSwitchConfiguration> {
94        self.input_switch_configuration.as_ref()
95    }
96    /// <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
97    pub fn output_header_configuration(&self) -> ::std::option::Option<&crate::types::OutputHeaderConfiguration> {
98        self.output_header_configuration.as_ref()
99    }
100}
101impl ::aws_types::request_id::RequestId for UpdateChannelOutput {
102    fn request_id(&self) -> Option<&str> {
103        self._request_id.as_deref()
104    }
105}
106impl UpdateChannelOutput {
107    /// Creates a new builder-style object to manufacture [`UpdateChannelOutput`](crate::operation::update_channel::UpdateChannelOutput).
108    pub fn builder() -> crate::operation::update_channel::builders::UpdateChannelOutputBuilder {
109        crate::operation::update_channel::builders::UpdateChannelOutputBuilder::default()
110    }
111}
112
113/// A builder for [`UpdateChannelOutput`](crate::operation::update_channel::UpdateChannelOutput).
114#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
115#[non_exhaustive]
116pub struct UpdateChannelOutputBuilder {
117    pub(crate) arn: ::std::option::Option<::std::string::String>,
118    pub(crate) channel_name: ::std::option::Option<::std::string::String>,
119    pub(crate) channel_group_name: ::std::option::Option<::std::string::String>,
120    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
121    pub(crate) modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
122    pub(crate) description: ::std::option::Option<::std::string::String>,
123    pub(crate) ingest_endpoints: ::std::option::Option<::std::vec::Vec<crate::types::IngestEndpoint>>,
124    pub(crate) input_type: ::std::option::Option<crate::types::InputType>,
125    pub(crate) e_tag: ::std::option::Option<::std::string::String>,
126    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
127    pub(crate) input_switch_configuration: ::std::option::Option<crate::types::InputSwitchConfiguration>,
128    pub(crate) output_header_configuration: ::std::option::Option<crate::types::OutputHeaderConfiguration>,
129    _request_id: Option<String>,
130}
131impl UpdateChannelOutputBuilder {
132    /// <p>The Amazon Resource Name (ARN) associated with the resource.</p>
133    /// This field is required.
134    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135        self.arn = ::std::option::Option::Some(input.into());
136        self
137    }
138    /// <p>The Amazon Resource Name (ARN) associated with the resource.</p>
139    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140        self.arn = input;
141        self
142    }
143    /// <p>The Amazon Resource Name (ARN) associated with the resource.</p>
144    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
145        &self.arn
146    }
147    /// <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>
148    /// This field is required.
149    pub fn channel_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150        self.channel_name = ::std::option::Option::Some(input.into());
151        self
152    }
153    /// <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>
154    pub fn set_channel_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155        self.channel_name = input;
156        self
157    }
158    /// <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>
159    pub fn get_channel_name(&self) -> &::std::option::Option<::std::string::String> {
160        &self.channel_name
161    }
162    /// <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>
163    /// This field is required.
164    pub fn channel_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165        self.channel_group_name = ::std::option::Option::Some(input.into());
166        self
167    }
168    /// <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>
169    pub fn set_channel_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
170        self.channel_group_name = input;
171        self
172    }
173    /// <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>
174    pub fn get_channel_group_name(&self) -> &::std::option::Option<::std::string::String> {
175        &self.channel_group_name
176    }
177    /// <p>The date and time the channel was created.</p>
178    /// This field is required.
179    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
180        self.created_at = ::std::option::Option::Some(input);
181        self
182    }
183    /// <p>The date and time the channel was created.</p>
184    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
185        self.created_at = input;
186        self
187    }
188    /// <p>The date and time the channel was created.</p>
189    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
190        &self.created_at
191    }
192    /// <p>The date and time the channel was modified.</p>
193    /// This field is required.
194    pub fn modified_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
195        self.modified_at = ::std::option::Option::Some(input);
196        self
197    }
198    /// <p>The date and time the channel was modified.</p>
199    pub fn set_modified_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
200        self.modified_at = input;
201        self
202    }
203    /// <p>The date and time the channel was modified.</p>
204    pub fn get_modified_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
205        &self.modified_at
206    }
207    /// <p>The description for your channel.</p>
208    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
209        self.description = ::std::option::Option::Some(input.into());
210        self
211    }
212    /// <p>The description for your channel.</p>
213    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
214        self.description = input;
215        self
216    }
217    /// <p>The description for your channel.</p>
218    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
219        &self.description
220    }
221    /// Appends an item to `ingest_endpoints`.
222    ///
223    /// To override the contents of this collection use [`set_ingest_endpoints`](Self::set_ingest_endpoints).
224    ///
225    /// <p>The list of ingest endpoints.</p>
226    pub fn ingest_endpoints(mut self, input: crate::types::IngestEndpoint) -> Self {
227        let mut v = self.ingest_endpoints.unwrap_or_default();
228        v.push(input);
229        self.ingest_endpoints = ::std::option::Option::Some(v);
230        self
231    }
232    /// <p>The list of ingest endpoints.</p>
233    pub fn set_ingest_endpoints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::IngestEndpoint>>) -> Self {
234        self.ingest_endpoints = input;
235        self
236    }
237    /// <p>The list of ingest endpoints.</p>
238    pub fn get_ingest_endpoints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IngestEndpoint>> {
239        &self.ingest_endpoints
240    }
241    /// <p>The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior.</p>
242    /// <p>The allowed values are:</p>
243    /// <ul>
244    /// <li>
245    /// <p><code>HLS</code> - The HLS streaming specification (which defines M3U8 manifests and TS segments).</p></li>
246    /// <li>
247    /// <p><code>CMAF</code> - The DASH-IF CMAF Ingest specification (which defines CMAF segments with optional DASH manifests).</p></li>
248    /// </ul>
249    pub fn input_type(mut self, input: crate::types::InputType) -> Self {
250        self.input_type = ::std::option::Option::Some(input);
251        self
252    }
253    /// <p>The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior.</p>
254    /// <p>The allowed values are:</p>
255    /// <ul>
256    /// <li>
257    /// <p><code>HLS</code> - The HLS streaming specification (which defines M3U8 manifests and TS segments).</p></li>
258    /// <li>
259    /// <p><code>CMAF</code> - The DASH-IF CMAF Ingest specification (which defines CMAF segments with optional DASH manifests).</p></li>
260    /// </ul>
261    pub fn set_input_type(mut self, input: ::std::option::Option<crate::types::InputType>) -> Self {
262        self.input_type = input;
263        self
264    }
265    /// <p>The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior.</p>
266    /// <p>The allowed values are:</p>
267    /// <ul>
268    /// <li>
269    /// <p><code>HLS</code> - The HLS streaming specification (which defines M3U8 manifests and TS segments).</p></li>
270    /// <li>
271    /// <p><code>CMAF</code> - The DASH-IF CMAF Ingest specification (which defines CMAF segments with optional DASH manifests).</p></li>
272    /// </ul>
273    pub fn get_input_type(&self) -> &::std::option::Option<crate::types::InputType> {
274        &self.input_type
275    }
276    /// <p>The current Entity Tag (ETag) associated with this resource. The entity tag can be used to safely make concurrent updates to the resource.</p>
277    pub fn e_tag(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
278        self.e_tag = ::std::option::Option::Some(input.into());
279        self
280    }
281    /// <p>The current Entity Tag (ETag) associated with this resource. The entity tag can be used to safely make concurrent updates to the resource.</p>
282    pub fn set_e_tag(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
283        self.e_tag = input;
284        self
285    }
286    /// <p>The current Entity Tag (ETag) associated with this resource. The entity tag can be used to safely make concurrent updates to the resource.</p>
287    pub fn get_e_tag(&self) -> &::std::option::Option<::std::string::String> {
288        &self.e_tag
289    }
290    /// Adds a key-value pair to `tags`.
291    ///
292    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
293    ///
294    /// <p>The comma-separated list of tag key:value pairs assigned to the channel.</p>
295    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
296        let mut hash_map = self.tags.unwrap_or_default();
297        hash_map.insert(k.into(), v.into());
298        self.tags = ::std::option::Option::Some(hash_map);
299        self
300    }
301    /// <p>The comma-separated list of tag key:value pairs assigned to the channel.</p>
302    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
303        self.tags = input;
304        self
305    }
306    /// <p>The comma-separated list of tag key:value pairs assigned to the channel.</p>
307    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
308        &self.tags
309    }
310    /// <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
311    pub fn input_switch_configuration(mut self, input: crate::types::InputSwitchConfiguration) -> Self {
312        self.input_switch_configuration = ::std::option::Option::Some(input);
313        self
314    }
315    /// <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
316    pub fn set_input_switch_configuration(mut self, input: ::std::option::Option<crate::types::InputSwitchConfiguration>) -> Self {
317        self.input_switch_configuration = input;
318        self
319    }
320    /// <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
321    pub fn get_input_switch_configuration(&self) -> &::std::option::Option<crate::types::InputSwitchConfiguration> {
322        &self.input_switch_configuration
323    }
324    /// <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
325    pub fn output_header_configuration(mut self, input: crate::types::OutputHeaderConfiguration) -> Self {
326        self.output_header_configuration = ::std::option::Option::Some(input);
327        self
328    }
329    /// <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
330    pub fn set_output_header_configuration(mut self, input: ::std::option::Option<crate::types::OutputHeaderConfiguration>) -> Self {
331        self.output_header_configuration = input;
332        self
333    }
334    /// <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
335    pub fn get_output_header_configuration(&self) -> &::std::option::Option<crate::types::OutputHeaderConfiguration> {
336        &self.output_header_configuration
337    }
338    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
339        self._request_id = Some(request_id.into());
340        self
341    }
342
343    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
344        self._request_id = request_id;
345        self
346    }
347    /// Consumes the builder and constructs a [`UpdateChannelOutput`](crate::operation::update_channel::UpdateChannelOutput).
348    /// This method will fail if any of the following fields are not set:
349    /// - [`arn`](crate::operation::update_channel::builders::UpdateChannelOutputBuilder::arn)
350    /// - [`channel_name`](crate::operation::update_channel::builders::UpdateChannelOutputBuilder::channel_name)
351    /// - [`channel_group_name`](crate::operation::update_channel::builders::UpdateChannelOutputBuilder::channel_group_name)
352    /// - [`created_at`](crate::operation::update_channel::builders::UpdateChannelOutputBuilder::created_at)
353    /// - [`modified_at`](crate::operation::update_channel::builders::UpdateChannelOutputBuilder::modified_at)
354    pub fn build(
355        self,
356    ) -> ::std::result::Result<crate::operation::update_channel::UpdateChannelOutput, ::aws_smithy_types::error::operation::BuildError> {
357        ::std::result::Result::Ok(crate::operation::update_channel::UpdateChannelOutput {
358            arn: self.arn.ok_or_else(|| {
359                ::aws_smithy_types::error::operation::BuildError::missing_field(
360                    "arn",
361                    "arn was not specified but it is required when building UpdateChannelOutput",
362                )
363            })?,
364            channel_name: self.channel_name.ok_or_else(|| {
365                ::aws_smithy_types::error::operation::BuildError::missing_field(
366                    "channel_name",
367                    "channel_name was not specified but it is required when building UpdateChannelOutput",
368                )
369            })?,
370            channel_group_name: self.channel_group_name.ok_or_else(|| {
371                ::aws_smithy_types::error::operation::BuildError::missing_field(
372                    "channel_group_name",
373                    "channel_group_name was not specified but it is required when building UpdateChannelOutput",
374                )
375            })?,
376            created_at: self.created_at.ok_or_else(|| {
377                ::aws_smithy_types::error::operation::BuildError::missing_field(
378                    "created_at",
379                    "created_at was not specified but it is required when building UpdateChannelOutput",
380                )
381            })?,
382            modified_at: self.modified_at.ok_or_else(|| {
383                ::aws_smithy_types::error::operation::BuildError::missing_field(
384                    "modified_at",
385                    "modified_at was not specified but it is required when building UpdateChannelOutput",
386                )
387            })?,
388            description: self.description,
389            ingest_endpoints: self.ingest_endpoints,
390            input_type: self.input_type,
391            e_tag: self.e_tag,
392            tags: self.tags,
393            input_switch_configuration: self.input_switch_configuration,
394            output_header_configuration: self.output_header_configuration,
395            _request_id: self._request_id,
396        })
397    }
398}