aws-sdk-medialive 1.149.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 SdiSource.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateSdiSourceInput {
    /// Applies only if the type is QUAD. Specify the mode for handling the quad-link signal: QUADRANT or INTERLEAVE.
    pub mode: ::std::option::Option<crate::types::SdiSourceMode>,
    /// Specify a name that is unique in the AWS account. We recommend you assign a name that describes the source, for example curling-cameraA. Names are case-sensitive.
    pub name: ::std::option::Option<::std::string::String>,
    /// An ID that you assign to a create request. This ID ensures idempotency when creating resources.
    pub request_id: ::std::option::Option<::std::string::String>,
    /// A collection of key-value pairs.
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// Specify the type of the SDI source: SINGLE: The source is a single-link source. QUAD: The source is one part of a quad-link source.
    pub r#type: ::std::option::Option<crate::types::SdiSourceType>,
}
impl CreateSdiSourceInput {
    /// Applies only if the type is QUAD. Specify the mode for handling the quad-link signal: QUADRANT or INTERLEAVE.
    pub fn mode(&self) -> ::std::option::Option<&crate::types::SdiSourceMode> {
        self.mode.as_ref()
    }
    /// Specify a name that is unique in the AWS account. We recommend you assign a name that describes the source, for example curling-cameraA. Names are case-sensitive.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// An ID that you assign to a create request. This ID ensures idempotency when creating resources.
    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()
    }
    /// Specify the type of the SDI source: SINGLE: The source is a single-link source. QUAD: The source is one part of a quad-link source.
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::SdiSourceType> {
        self.r#type.as_ref()
    }
}
impl CreateSdiSourceInput {
    /// Creates a new builder-style object to manufacture [`CreateSdiSourceInput`](crate::operation::create_sdi_source::CreateSdiSourceInput).
    pub fn builder() -> crate::operation::create_sdi_source::builders::CreateSdiSourceInputBuilder {
        crate::operation::create_sdi_source::builders::CreateSdiSourceInputBuilder::default()
    }
}

/// A builder for [`CreateSdiSourceInput`](crate::operation::create_sdi_source::CreateSdiSourceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateSdiSourceInputBuilder {
    pub(crate) mode: ::std::option::Option<crate::types::SdiSourceMode>,
    pub(crate) name: ::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>>,
    pub(crate) r#type: ::std::option::Option<crate::types::SdiSourceType>,
}
impl CreateSdiSourceInputBuilder {
    /// Applies only if the type is QUAD. Specify the mode for handling the quad-link signal: QUADRANT or INTERLEAVE.
    pub fn mode(mut self, input: crate::types::SdiSourceMode) -> Self {
        self.mode = ::std::option::Option::Some(input);
        self
    }
    /// Applies only if the type is QUAD. Specify the mode for handling the quad-link signal: QUADRANT or INTERLEAVE.
    pub fn set_mode(mut self, input: ::std::option::Option<crate::types::SdiSourceMode>) -> Self {
        self.mode = input;
        self
    }
    /// Applies only if the type is QUAD. Specify the mode for handling the quad-link signal: QUADRANT or INTERLEAVE.
    pub fn get_mode(&self) -> &::std::option::Option<crate::types::SdiSourceMode> {
        &self.mode
    }
    /// Specify a name that is unique in the AWS account. We recommend you assign a name that describes the source, for example curling-cameraA. Names are case-sensitive.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// Specify a name that is unique in the AWS account. We recommend you assign a name that describes the source, for example curling-cameraA. Names are case-sensitive.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// Specify a name that is unique in the AWS account. We recommend you assign a name that describes the source, for example curling-cameraA. Names are case-sensitive.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// An ID that you assign to a create request. This ID ensures idempotency when creating resources.
    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.request_id = ::std::option::Option::Some(input.into());
        self
    }
    /// An ID that you assign to a create request. This ID ensures idempotency when creating resources.
    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.request_id = input;
        self
    }
    /// An ID that you assign to a create request. This ID ensures idempotency when creating resources.
    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.request_id
    }
    /// 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 ::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
    }
    /// 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
    }
    /// A collection of key-value pairs.
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Specify the type of the SDI source: SINGLE: The source is a single-link source. QUAD: The source is one part of a quad-link source.
    pub fn r#type(mut self, input: crate::types::SdiSourceType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// Specify the type of the SDI source: SINGLE: The source is a single-link source. QUAD: The source is one part of a quad-link source.
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::SdiSourceType>) -> Self {
        self.r#type = input;
        self
    }
    /// Specify the type of the SDI source: SINGLE: The source is a single-link source. QUAD: The source is one part of a quad-link source.
    pub fn get_type(&self) -> &::std::option::Option<crate::types::SdiSourceType> {
        &self.r#type
    }
    /// Consumes the builder and constructs a [`CreateSdiSourceInput`](crate::operation::create_sdi_source::CreateSdiSourceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_sdi_source::CreateSdiSourceInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_sdi_source::CreateSdiSourceInput {
            mode: self.mode,
            name: self.name,
            request_id: self.request_id,
            tags: self.tags,
            r#type: self.r#type,
        })
    }
}