aws-sdk-mediaconvert 1.94.0

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

/// Metadata and other file information.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Metadata {
    /// The entity tag (ETag) of the file.
    pub e_tag: ::std::option::Option<::std::string::String>,
    /// The size of the media file, in bytes.
    pub file_size: ::std::option::Option<i64>,
    /// The last modification timestamp of the media file, in Unix time.
    pub last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// The MIME type of the media file.
    pub mime_type: ::std::option::Option<::std::string::String>,
}
impl Metadata {
    /// The entity tag (ETag) of the file.
    pub fn e_tag(&self) -> ::std::option::Option<&str> {
        self.e_tag.as_deref()
    }
    /// The size of the media file, in bytes.
    pub fn file_size(&self) -> ::std::option::Option<i64> {
        self.file_size
    }
    /// The last modification timestamp of the media file, in Unix time.
    pub fn last_modified(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_modified.as_ref()
    }
    /// The MIME type of the media file.
    pub fn mime_type(&self) -> ::std::option::Option<&str> {
        self.mime_type.as_deref()
    }
}
impl Metadata {
    /// Creates a new builder-style object to manufacture [`Metadata`](crate::types::Metadata).
    pub fn builder() -> crate::types::builders::MetadataBuilder {
        crate::types::builders::MetadataBuilder::default()
    }
}

/// A builder for [`Metadata`](crate::types::Metadata).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct MetadataBuilder {
    pub(crate) e_tag: ::std::option::Option<::std::string::String>,
    pub(crate) file_size: ::std::option::Option<i64>,
    pub(crate) last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) mime_type: ::std::option::Option<::std::string::String>,
}
impl MetadataBuilder {
    /// The entity tag (ETag) of the file.
    pub fn e_tag(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.e_tag = ::std::option::Option::Some(input.into());
        self
    }
    /// The entity tag (ETag) of the file.
    pub fn set_e_tag(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.e_tag = input;
        self
    }
    /// The entity tag (ETag) of the file.
    pub fn get_e_tag(&self) -> &::std::option::Option<::std::string::String> {
        &self.e_tag
    }
    /// The size of the media file, in bytes.
    pub fn file_size(mut self, input: i64) -> Self {
        self.file_size = ::std::option::Option::Some(input);
        self
    }
    /// The size of the media file, in bytes.
    pub fn set_file_size(mut self, input: ::std::option::Option<i64>) -> Self {
        self.file_size = input;
        self
    }
    /// The size of the media file, in bytes.
    pub fn get_file_size(&self) -> &::std::option::Option<i64> {
        &self.file_size
    }
    /// The last modification timestamp of the media file, in Unix time.
    pub fn last_modified(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_modified = ::std::option::Option::Some(input);
        self
    }
    /// The last modification timestamp of the media file, in Unix time.
    pub fn set_last_modified(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_modified = input;
        self
    }
    /// The last modification timestamp of the media file, in Unix time.
    pub fn get_last_modified(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_modified
    }
    /// The MIME type of the media file.
    pub fn mime_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.mime_type = ::std::option::Option::Some(input.into());
        self
    }
    /// The MIME type of the media file.
    pub fn set_mime_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.mime_type = input;
        self
    }
    /// The MIME type of the media file.
    pub fn get_mime_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.mime_type
    }
    /// Consumes the builder and constructs a [`Metadata`](crate::types::Metadata).
    pub fn build(self) -> crate::types::Metadata {
        crate::types::Metadata {
            e_tag: self.e_tag,
            file_size: self.file_size,
            last_modified: self.last_modified,
            mime_type: self.mime_type,
        }
    }
}