aws-sdk-medialive 0.26.0

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

/// A request to create a partner input
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreatePartnerInputInput {
    /// Unique ID of the input.
    #[doc(hidden)]
    pub input_id: std::option::Option<std::string::String>,
    /// Unique identifier of the request to ensure the request is handled exactly once in case of retries.
    #[doc(hidden)]
    pub request_id: std::option::Option<std::string::String>,
    /// A collection of key-value pairs.
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreatePartnerInputInput {
    /// Unique ID of the input.
    pub fn input_id(&self) -> std::option::Option<&str> {
        self.input_id.as_deref()
    }
    /// Unique identifier of the request to ensure the request is handled exactly once in case of retries.
    pub fn request_id(&self) -> std::option::Option<&str> {
        self.request_id.as_deref()
    }
    /// A collection of key-value pairs.
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
}
impl CreatePartnerInputInput {
    /// Creates a new builder-style object to manufacture [`CreatePartnerInputInput`](crate::operation::create_partner_input::CreatePartnerInputInput).
    pub fn builder(
    ) -> crate::operation::create_partner_input::builders::CreatePartnerInputInputBuilder {
        crate::operation::create_partner_input::builders::CreatePartnerInputInputBuilder::default()
    }
}

/// A builder for [`CreatePartnerInputInput`](crate::operation::create_partner_input::CreatePartnerInputInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct CreatePartnerInputInputBuilder {
    pub(crate) input_id: std::option::Option<std::string::String>,
    pub(crate) request_id: std::option::Option<std::string::String>,
    pub(crate) tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreatePartnerInputInputBuilder {
    /// Unique ID of the input.
    pub fn input_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.input_id = Some(input.into());
        self
    }
    /// Unique ID of the input.
    pub fn set_input_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.input_id = input;
        self
    }
    /// Unique identifier of the request to ensure the request is handled exactly once in case of retries.
    pub fn request_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.request_id = Some(input.into());
        self
    }
    /// Unique identifier of the request to ensure the request is handled exactly once in case of retries.
    pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.request_id = input;
        self
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// A collection of key-value pairs.
    pub fn tags(
        mut self,
        k: impl Into<std::string::String>,
        v: impl Into<std::string::String>,
    ) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = Some(hash_map);
        self
    }
    /// A collection of key-value pairs.
    pub fn set_tags(
        mut self,
        input: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
    ) -> Self {
        self.tags = input;
        self
    }
    /// Consumes the builder and constructs a [`CreatePartnerInputInput`](crate::operation::create_partner_input::CreatePartnerInputInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::create_partner_input::CreatePartnerInputInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(
            crate::operation::create_partner_input::CreatePartnerInputInput {
                input_id: self.input_id,
                request_id: self.request_id,
                tags: self.tags,
            },
        )
    }
}