aws-sdk-mediaconvert 0.38.0

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

/// A preset is a collection of preconfigured media conversion settings that you want MediaConvert to apply to the output during the conversion process.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Preset {
    /// An identifier for this resource that is unique within all of AWS.
    pub arn: ::std::option::Option<::std::string::String>,
    /// An optional category you create to organize your presets.
    pub category: ::std::option::Option<::std::string::String>,
    /// The timestamp in epoch seconds for preset creation.
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// An optional description you create for each preset.
    pub description: ::std::option::Option<::std::string::String>,
    /// The timestamp in epoch seconds when the preset was last updated.
    pub last_updated: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// A name you create for each preset. Each name must be unique within your account.
    pub name: ::std::option::Option<::std::string::String>,
    /// Settings for preset
    pub settings: ::std::option::Option<crate::types::PresetSettings>,
    /// A preset can be of two types: system or custom. System or built-in preset can't be modified or deleted by the user.
    pub r#type: ::std::option::Option<crate::types::Type>,
}
impl Preset {
    /// An identifier for this resource that is unique within all of AWS.
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// An optional category you create to organize your presets.
    pub fn category(&self) -> ::std::option::Option<&str> {
        self.category.as_deref()
    }
    /// The timestamp in epoch seconds for preset creation.
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// An optional description you create for each preset.
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// The timestamp in epoch seconds when the preset was last updated.
    pub fn last_updated(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated.as_ref()
    }
    /// A name you create for each preset. Each name must be unique within your account.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// Settings for preset
    pub fn settings(&self) -> ::std::option::Option<&crate::types::PresetSettings> {
        self.settings.as_ref()
    }
    /// A preset can be of two types: system or custom. System or built-in preset can't be modified or deleted by the user.
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::Type> {
        self.r#type.as_ref()
    }
}
impl Preset {
    /// Creates a new builder-style object to manufacture [`Preset`](crate::types::Preset).
    pub fn builder() -> crate::types::builders::PresetBuilder {
        crate::types::builders::PresetBuilder::default()
    }
}

/// A builder for [`Preset`](crate::types::Preset).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct PresetBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) category: ::std::option::Option<::std::string::String>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) last_updated: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) settings: ::std::option::Option<crate::types::PresetSettings>,
    pub(crate) r#type: ::std::option::Option<crate::types::Type>,
}
impl PresetBuilder {
    /// An identifier for this resource that is unique within all of AWS.
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// An identifier for this resource that is unique within all of AWS.
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// An identifier for this resource that is unique within all of AWS.
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// An optional category you create to organize your presets.
    pub fn category(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.category = ::std::option::Option::Some(input.into());
        self
    }
    /// An optional category you create to organize your presets.
    pub fn set_category(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.category = input;
        self
    }
    /// An optional category you create to organize your presets.
    pub fn get_category(&self) -> &::std::option::Option<::std::string::String> {
        &self.category
    }
    /// The timestamp in epoch seconds for preset creation.
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// The timestamp in epoch seconds for preset creation.
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// The timestamp in epoch seconds for preset creation.
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// An optional description you create for each preset.
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// An optional description you create for each preset.
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// An optional description you create for each preset.
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// The timestamp in epoch seconds when the preset was last updated.
    pub fn last_updated(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_updated = ::std::option::Option::Some(input);
        self
    }
    /// The timestamp in epoch seconds when the preset was last updated.
    pub fn set_last_updated(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_updated = input;
        self
    }
    /// The timestamp in epoch seconds when the preset was last updated.
    pub fn get_last_updated(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated
    }
    /// A name you create for each preset. Each name must be unique within your account.
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// A name you create for each preset. Each name must be unique within your account.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// A name you create for each preset. Each name must be unique within your account.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// Settings for preset
    /// This field is required.
    pub fn settings(mut self, input: crate::types::PresetSettings) -> Self {
        self.settings = ::std::option::Option::Some(input);
        self
    }
    /// Settings for preset
    pub fn set_settings(mut self, input: ::std::option::Option<crate::types::PresetSettings>) -> Self {
        self.settings = input;
        self
    }
    /// Settings for preset
    pub fn get_settings(&self) -> &::std::option::Option<crate::types::PresetSettings> {
        &self.settings
    }
    /// A preset can be of two types: system or custom. System or built-in preset can't be modified or deleted by the user.
    pub fn r#type(mut self, input: crate::types::Type) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// A preset can be of two types: system or custom. System or built-in preset can't be modified or deleted by the user.
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::Type>) -> Self {
        self.r#type = input;
        self
    }
    /// A preset can be of two types: system or custom. System or built-in preset can't be modified or deleted by the user.
    pub fn get_type(&self) -> &::std::option::Option<crate::types::Type> {
        &self.r#type
    }
    /// Consumes the builder and constructs a [`Preset`](crate::types::Preset).
    pub fn build(self) -> crate::types::Preset {
        crate::types::Preset {
            arn: self.arn,
            category: self.category,
            created_at: self.created_at,
            description: self.description,
            last_updated: self.last_updated,
            name: self.name,
            settings: self.settings,
            r#type: self.r#type,
        }
    }
}