1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Object that describes which renditions should be recorded for a stream.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RenditionConfiguration {
/// <p>Indicates which set of renditions are recorded for a stream. For <code>BASIC</code> channels, the <code>CUSTOM</code> value has no effect. If <code>CUSTOM</code> is specified, a set of renditions must be specified in the <code>renditions</code> field. Default: <code>ALL</code>.</p>
pub rendition_selection: ::std::option::Option<crate::types::RenditionConfigurationRenditionSelection>,
/// <p>Indicates which renditions are recorded for a stream, if <code>renditionSelection</code> is <code>CUSTOM</code>; otherwise, this field is irrelevant. The selected renditions are recorded if they are available during the stream. If a selected rendition is unavailable, the best available rendition is recorded. For details on the resolution dimensions of each rendition, see <a href="https://docs.aws.amazon.com/ivs/latest/userguide/record-to-s3.html">Auto-Record to Amazon S3</a>.</p>
pub renditions: ::std::option::Option<::std::vec::Vec<crate::types::RenditionConfigurationRendition>>,
}
impl RenditionConfiguration {
/// <p>Indicates which set of renditions are recorded for a stream. For <code>BASIC</code> channels, the <code>CUSTOM</code> value has no effect. If <code>CUSTOM</code> is specified, a set of renditions must be specified in the <code>renditions</code> field. Default: <code>ALL</code>.</p>
pub fn rendition_selection(&self) -> ::std::option::Option<&crate::types::RenditionConfigurationRenditionSelection> {
self.rendition_selection.as_ref()
}
/// <p>Indicates which renditions are recorded for a stream, if <code>renditionSelection</code> is <code>CUSTOM</code>; otherwise, this field is irrelevant. The selected renditions are recorded if they are available during the stream. If a selected rendition is unavailable, the best available rendition is recorded. For details on the resolution dimensions of each rendition, see <a href="https://docs.aws.amazon.com/ivs/latest/userguide/record-to-s3.html">Auto-Record to Amazon S3</a>.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.renditions.is_none()`.
pub fn renditions(&self) -> &[crate::types::RenditionConfigurationRendition] {
self.renditions.as_deref().unwrap_or_default()
}
}
impl RenditionConfiguration {
/// Creates a new builder-style object to manufacture [`RenditionConfiguration`](crate::types::RenditionConfiguration).
pub fn builder() -> crate::types::builders::RenditionConfigurationBuilder {
crate::types::builders::RenditionConfigurationBuilder::default()
}
}
/// A builder for [`RenditionConfiguration`](crate::types::RenditionConfiguration).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct RenditionConfigurationBuilder {
pub(crate) rendition_selection: ::std::option::Option<crate::types::RenditionConfigurationRenditionSelection>,
pub(crate) renditions: ::std::option::Option<::std::vec::Vec<crate::types::RenditionConfigurationRendition>>,
}
impl RenditionConfigurationBuilder {
/// <p>Indicates which set of renditions are recorded for a stream. For <code>BASIC</code> channels, the <code>CUSTOM</code> value has no effect. If <code>CUSTOM</code> is specified, a set of renditions must be specified in the <code>renditions</code> field. Default: <code>ALL</code>.</p>
pub fn rendition_selection(mut self, input: crate::types::RenditionConfigurationRenditionSelection) -> Self {
self.rendition_selection = ::std::option::Option::Some(input);
self
}
/// <p>Indicates which set of renditions are recorded for a stream. For <code>BASIC</code> channels, the <code>CUSTOM</code> value has no effect. If <code>CUSTOM</code> is specified, a set of renditions must be specified in the <code>renditions</code> field. Default: <code>ALL</code>.</p>
pub fn set_rendition_selection(mut self, input: ::std::option::Option<crate::types::RenditionConfigurationRenditionSelection>) -> Self {
self.rendition_selection = input;
self
}
/// <p>Indicates which set of renditions are recorded for a stream. For <code>BASIC</code> channels, the <code>CUSTOM</code> value has no effect. If <code>CUSTOM</code> is specified, a set of renditions must be specified in the <code>renditions</code> field. Default: <code>ALL</code>.</p>
pub fn get_rendition_selection(&self) -> &::std::option::Option<crate::types::RenditionConfigurationRenditionSelection> {
&self.rendition_selection
}
/// Appends an item to `renditions`.
///
/// To override the contents of this collection use [`set_renditions`](Self::set_renditions).
///
/// <p>Indicates which renditions are recorded for a stream, if <code>renditionSelection</code> is <code>CUSTOM</code>; otherwise, this field is irrelevant. The selected renditions are recorded if they are available during the stream. If a selected rendition is unavailable, the best available rendition is recorded. For details on the resolution dimensions of each rendition, see <a href="https://docs.aws.amazon.com/ivs/latest/userguide/record-to-s3.html">Auto-Record to Amazon S3</a>.</p>
pub fn renditions(mut self, input: crate::types::RenditionConfigurationRendition) -> Self {
let mut v = self.renditions.unwrap_or_default();
v.push(input);
self.renditions = ::std::option::Option::Some(v);
self
}
/// <p>Indicates which renditions are recorded for a stream, if <code>renditionSelection</code> is <code>CUSTOM</code>; otherwise, this field is irrelevant. The selected renditions are recorded if they are available during the stream. If a selected rendition is unavailable, the best available rendition is recorded. For details on the resolution dimensions of each rendition, see <a href="https://docs.aws.amazon.com/ivs/latest/userguide/record-to-s3.html">Auto-Record to Amazon S3</a>.</p>
pub fn set_renditions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RenditionConfigurationRendition>>) -> Self {
self.renditions = input;
self
}
/// <p>Indicates which renditions are recorded for a stream, if <code>renditionSelection</code> is <code>CUSTOM</code>; otherwise, this field is irrelevant. The selected renditions are recorded if they are available during the stream. If a selected rendition is unavailable, the best available rendition is recorded. For details on the resolution dimensions of each rendition, see <a href="https://docs.aws.amazon.com/ivs/latest/userguide/record-to-s3.html">Auto-Record to Amazon S3</a>.</p>
pub fn get_renditions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RenditionConfigurationRendition>> {
&self.renditions
}
/// Consumes the builder and constructs a [`RenditionConfiguration`](crate::types::RenditionConfiguration).
pub fn build(self) -> crate::types::RenditionConfiguration {
crate::types::RenditionConfiguration {
rendition_selection: self.rendition_selection,
renditions: self.renditions,
}
}
}