aws-sdk-mediaconvert 1.128.0

AWS SDK for AWS Elemental MediaConvert
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreatePresetInput {
    /// Optional. A category for the preset you are creating.
    pub category: ::std::option::Option<::std::string::String>,
    /// Optional. A description of the preset you are creating.
    pub description: ::std::option::Option<::std::string::String>,
    /// The name of the preset you are creating.
    pub name: ::std::option::Option<::std::string::String>,
    /// Settings for preset
    pub settings: ::std::option::Option<crate::types::PresetSettings>,
    /// The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a key.
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreatePresetInput {
    /// Optional. A category for the preset you are creating.
    pub fn category(&self) -> ::std::option::Option<&str> {
        self.category.as_deref()
    }
    /// Optional. A description of the preset you are creating.
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// The name of the preset you are creating.
    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()
    }
    /// The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a key.
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl CreatePresetInput {
    /// Creates a new builder-style object to manufacture [`CreatePresetInput`](crate::operation::create_preset::CreatePresetInput).
    pub fn builder() -> crate::operation::create_preset::builders::CreatePresetInputBuilder {
        crate::operation::create_preset::builders::CreatePresetInputBuilder::default()
    }
}

/// A builder for [`CreatePresetInput`](crate::operation::create_preset::CreatePresetInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreatePresetInputBuilder {
    pub(crate) category: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) settings: ::std::option::Option<crate::types::PresetSettings>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreatePresetInputBuilder {
    /// Optional. A category for the preset you are creating.
    pub fn category(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.category = ::std::option::Option::Some(input.into());
        self
    }
    /// Optional. A category for the preset you are creating.
    pub fn set_category(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.category = input;
        self
    }
    /// Optional. A category for the preset you are creating.
    pub fn get_category(&self) -> &::std::option::Option<::std::string::String> {
        &self.category
    }
    /// Optional. A description of the preset you are creating.
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// Optional. A description of the preset you are creating.
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// Optional. A description of the preset you are creating.
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// The name of the preset you are creating.
    /// 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
    }
    /// The name of the preset you are creating.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// The name of the preset you are creating.
    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
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a key.
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a key.
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a key.
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreatePresetInput`](crate::operation::create_preset::CreatePresetInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_preset::CreatePresetInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_preset::CreatePresetInput {
            category: self.category,
            description: self.description,
            name: self.name,
            settings: self.settings,
            tags: self.tags,
        })
    }
}