aws-sdk-mediaconnect 0.27.0

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

/// A request to add outputs to the specified bridge.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AddBridgeOutputsInput {
    /// The ARN of the bridge that you want to update.
    #[doc(hidden)]
    pub bridge_arn: std::option::Option<std::string::String>,
    /// The outputs that you want to add to this bridge.
    #[doc(hidden)]
    pub outputs: std::option::Option<std::vec::Vec<crate::types::AddBridgeOutputRequest>>,
}
impl AddBridgeOutputsInput {
    /// The ARN of the bridge that you want to update.
    pub fn bridge_arn(&self) -> std::option::Option<&str> {
        self.bridge_arn.as_deref()
    }
    /// The outputs that you want to add to this bridge.
    pub fn outputs(&self) -> std::option::Option<&[crate::types::AddBridgeOutputRequest]> {
        self.outputs.as_deref()
    }
}
impl AddBridgeOutputsInput {
    /// Creates a new builder-style object to manufacture [`AddBridgeOutputsInput`](crate::operation::add_bridge_outputs::AddBridgeOutputsInput).
    pub fn builder() -> crate::operation::add_bridge_outputs::builders::AddBridgeOutputsInputBuilder
    {
        crate::operation::add_bridge_outputs::builders::AddBridgeOutputsInputBuilder::default()
    }
}

/// A builder for [`AddBridgeOutputsInput`](crate::operation::add_bridge_outputs::AddBridgeOutputsInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct AddBridgeOutputsInputBuilder {
    pub(crate) bridge_arn: std::option::Option<std::string::String>,
    pub(crate) outputs: std::option::Option<std::vec::Vec<crate::types::AddBridgeOutputRequest>>,
}
impl AddBridgeOutputsInputBuilder {
    /// The ARN of the bridge that you want to update.
    pub fn bridge_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.bridge_arn = Some(input.into());
        self
    }
    /// The ARN of the bridge that you want to update.
    pub fn set_bridge_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.bridge_arn = input;
        self
    }
    /// Appends an item to `outputs`.
    ///
    /// To override the contents of this collection use [`set_outputs`](Self::set_outputs).
    ///
    /// The outputs that you want to add to this bridge.
    pub fn outputs(mut self, input: crate::types::AddBridgeOutputRequest) -> Self {
        let mut v = self.outputs.unwrap_or_default();
        v.push(input);
        self.outputs = Some(v);
        self
    }
    /// The outputs that you want to add to this bridge.
    pub fn set_outputs(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::AddBridgeOutputRequest>>,
    ) -> Self {
        self.outputs = input;
        self
    }
    /// Consumes the builder and constructs a [`AddBridgeOutputsInput`](crate::operation::add_bridge_outputs::AddBridgeOutputsInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::add_bridge_outputs::AddBridgeOutputsInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(
            crate::operation::add_bridge_outputs::AddBridgeOutputsInput {
                bridge_arn: self.bridge_arn,
                outputs: self.outputs,
            },
        )
    }
}