aws-sdk-medialive 1.78.0

AWS SDK for AWS Elemental MediaLive
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Details of a single thumbnail
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Thumbnail {
    /// The binary data for the latest thumbnail.
    pub body: ::std::option::Option<::std::string::String>,
    /// The content type for the latest thumbnail.
    pub content_type: ::std::option::Option<::std::string::String>,
    /// Thumbnail Type
    pub thumbnail_type: ::std::option::Option<crate::types::ThumbnailType>,
    /// Time stamp for the latest thumbnail.
    pub time_stamp: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl Thumbnail {
    /// The binary data for the latest thumbnail.
    pub fn body(&self) -> ::std::option::Option<&str> {
        self.body.as_deref()
    }
    /// The content type for the latest thumbnail.
    pub fn content_type(&self) -> ::std::option::Option<&str> {
        self.content_type.as_deref()
    }
    /// Thumbnail Type
    pub fn thumbnail_type(&self) -> ::std::option::Option<&crate::types::ThumbnailType> {
        self.thumbnail_type.as_ref()
    }
    /// Time stamp for the latest thumbnail.
    pub fn time_stamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.time_stamp.as_ref()
    }
}
impl Thumbnail {
    /// Creates a new builder-style object to manufacture [`Thumbnail`](crate::types::Thumbnail).
    pub fn builder() -> crate::types::builders::ThumbnailBuilder {
        crate::types::builders::ThumbnailBuilder::default()
    }
}

/// A builder for [`Thumbnail`](crate::types::Thumbnail).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ThumbnailBuilder {
    pub(crate) body: ::std::option::Option<::std::string::String>,
    pub(crate) content_type: ::std::option::Option<::std::string::String>,
    pub(crate) thumbnail_type: ::std::option::Option<crate::types::ThumbnailType>,
    pub(crate) time_stamp: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl ThumbnailBuilder {
    /// The binary data for the latest thumbnail.
    pub fn body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.body = ::std::option::Option::Some(input.into());
        self
    }
    /// The binary data for the latest thumbnail.
    pub fn set_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.body = input;
        self
    }
    /// The binary data for the latest thumbnail.
    pub fn get_body(&self) -> &::std::option::Option<::std::string::String> {
        &self.body
    }
    /// The content type for the latest thumbnail.
    pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.content_type = ::std::option::Option::Some(input.into());
        self
    }
    /// The content type for the latest thumbnail.
    pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.content_type = input;
        self
    }
    /// The content type for the latest thumbnail.
    pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.content_type
    }
    /// Thumbnail Type
    pub fn thumbnail_type(mut self, input: crate::types::ThumbnailType) -> Self {
        self.thumbnail_type = ::std::option::Option::Some(input);
        self
    }
    /// Thumbnail Type
    pub fn set_thumbnail_type(mut self, input: ::std::option::Option<crate::types::ThumbnailType>) -> Self {
        self.thumbnail_type = input;
        self
    }
    /// Thumbnail Type
    pub fn get_thumbnail_type(&self) -> &::std::option::Option<crate::types::ThumbnailType> {
        &self.thumbnail_type
    }
    /// Time stamp for the latest thumbnail.
    pub fn time_stamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.time_stamp = ::std::option::Option::Some(input);
        self
    }
    /// Time stamp for the latest thumbnail.
    pub fn set_time_stamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.time_stamp = input;
        self
    }
    /// Time stamp for the latest thumbnail.
    pub fn get_time_stamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.time_stamp
    }
    /// Consumes the builder and constructs a [`Thumbnail`](crate::types::Thumbnail).
    pub fn build(self) -> crate::types::Thumbnail {
        crate::types::Thumbnail {
            body: self.body,
            content_type: self.content_type,
            thumbnail_type: self.thumbnail_type,
            time_stamp: self.time_stamp,
        }
    }
}