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 transfer an input device.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransferInputDeviceInput {
    /// The unique ID of this input device. For example, hd-123456789abcdef.
    #[doc(hidden)]
    pub input_device_id: std::option::Option<std::string::String>,
    /// The AWS account ID (12 digits) for the recipient of the device transfer.
    #[doc(hidden)]
    pub target_customer_id: std::option::Option<std::string::String>,
    /// The target AWS region to transfer the device.
    #[doc(hidden)]
    pub target_region: std::option::Option<std::string::String>,
    /// An optional message for the recipient. Maximum 280 characters.
    #[doc(hidden)]
    pub transfer_message: std::option::Option<std::string::String>,
}
impl TransferInputDeviceInput {
    /// The unique ID of this input device. For example, hd-123456789abcdef.
    pub fn input_device_id(&self) -> std::option::Option<&str> {
        self.input_device_id.as_deref()
    }
    /// The AWS account ID (12 digits) for the recipient of the device transfer.
    pub fn target_customer_id(&self) -> std::option::Option<&str> {
        self.target_customer_id.as_deref()
    }
    /// The target AWS region to transfer the device.
    pub fn target_region(&self) -> std::option::Option<&str> {
        self.target_region.as_deref()
    }
    /// An optional message for the recipient. Maximum 280 characters.
    pub fn transfer_message(&self) -> std::option::Option<&str> {
        self.transfer_message.as_deref()
    }
}
impl TransferInputDeviceInput {
    /// Creates a new builder-style object to manufacture [`TransferInputDeviceInput`](crate::operation::transfer_input_device::TransferInputDeviceInput).
    pub fn builder(
    ) -> crate::operation::transfer_input_device::builders::TransferInputDeviceInputBuilder {
        crate::operation::transfer_input_device::builders::TransferInputDeviceInputBuilder::default(
        )
    }
}

/// A builder for [`TransferInputDeviceInput`](crate::operation::transfer_input_device::TransferInputDeviceInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct TransferInputDeviceInputBuilder {
    pub(crate) input_device_id: std::option::Option<std::string::String>,
    pub(crate) target_customer_id: std::option::Option<std::string::String>,
    pub(crate) target_region: std::option::Option<std::string::String>,
    pub(crate) transfer_message: std::option::Option<std::string::String>,
}
impl TransferInputDeviceInputBuilder {
    /// The unique ID of this input device. For example, hd-123456789abcdef.
    pub fn input_device_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.input_device_id = Some(input.into());
        self
    }
    /// The unique ID of this input device. For example, hd-123456789abcdef.
    pub fn set_input_device_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.input_device_id = input;
        self
    }
    /// The AWS account ID (12 digits) for the recipient of the device transfer.
    pub fn target_customer_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.target_customer_id = Some(input.into());
        self
    }
    /// The AWS account ID (12 digits) for the recipient of the device transfer.
    pub fn set_target_customer_id(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.target_customer_id = input;
        self
    }
    /// The target AWS region to transfer the device.
    pub fn target_region(mut self, input: impl Into<std::string::String>) -> Self {
        self.target_region = Some(input.into());
        self
    }
    /// The target AWS region to transfer the device.
    pub fn set_target_region(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.target_region = input;
        self
    }
    /// An optional message for the recipient. Maximum 280 characters.
    pub fn transfer_message(mut self, input: impl Into<std::string::String>) -> Self {
        self.transfer_message = Some(input.into());
        self
    }
    /// An optional message for the recipient. Maximum 280 characters.
    pub fn set_transfer_message(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.transfer_message = input;
        self
    }
    /// Consumes the builder and constructs a [`TransferInputDeviceInput`](crate::operation::transfer_input_device::TransferInputDeviceInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::transfer_input_device::TransferInputDeviceInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(
            crate::operation::transfer_input_device::TransferInputDeviceInput {
                input_device_id: self.input_device_id,
                target_customer_id: self.target_customer_id,
                target_region: self.target_region,
                transfer_message: self.transfer_message,
            },
        )
    }
}