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