aws-sdk-mediaconnect 1.47.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 flow.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AddFlowOutputsInput {
    /// The flow that you want to add outputs to.
    pub flow_arn: ::std::option::Option<::std::string::String>,
    /// A list of outputs that you want to add.
    pub outputs: ::std::option::Option<::std::vec::Vec<crate::types::AddOutputRequest>>,
}
impl AddFlowOutputsInput {
    /// The flow that you want to add outputs to.
    pub fn flow_arn(&self) -> ::std::option::Option<&str> {
        self.flow_arn.as_deref()
    }
    /// A list of outputs that you want to add.
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.outputs.is_none()`.
    pub fn outputs(&self) -> &[crate::types::AddOutputRequest] {
        self.outputs.as_deref().unwrap_or_default()
    }
}
impl AddFlowOutputsInput {
    /// Creates a new builder-style object to manufacture [`AddFlowOutputsInput`](crate::operation::add_flow_outputs::AddFlowOutputsInput).
    pub fn builder() -> crate::operation::add_flow_outputs::builders::AddFlowOutputsInputBuilder {
        crate::operation::add_flow_outputs::builders::AddFlowOutputsInputBuilder::default()
    }
}

/// A builder for [`AddFlowOutputsInput`](crate::operation::add_flow_outputs::AddFlowOutputsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AddFlowOutputsInputBuilder {
    pub(crate) flow_arn: ::std::option::Option<::std::string::String>,
    pub(crate) outputs: ::std::option::Option<::std::vec::Vec<crate::types::AddOutputRequest>>,
}
impl AddFlowOutputsInputBuilder {
    /// The flow that you want to add outputs to.
    /// This field is required.
    pub fn flow_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.flow_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The flow that you want to add outputs to.
    pub fn set_flow_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.flow_arn = input;
        self
    }
    /// The flow that you want to add outputs to.
    pub fn get_flow_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.flow_arn
    }
    /// Appends an item to `outputs`.
    ///
    /// To override the contents of this collection use [`set_outputs`](Self::set_outputs).
    ///
    /// A list of outputs that you want to add.
    pub fn outputs(mut self, input: crate::types::AddOutputRequest) -> Self {
        let mut v = self.outputs.unwrap_or_default();
        v.push(input);
        self.outputs = ::std::option::Option::Some(v);
        self
    }
    /// A list of outputs that you want to add.
    pub fn set_outputs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AddOutputRequest>>) -> Self {
        self.outputs = input;
        self
    }
    /// A list of outputs that you want to add.
    pub fn get_outputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AddOutputRequest>> {
        &self.outputs
    }
    /// Consumes the builder and constructs a [`AddFlowOutputsInput`](crate::operation::add_flow_outputs::AddFlowOutputsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::add_flow_outputs::AddFlowOutputsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::add_flow_outputs::AddFlowOutputsInput {
            flow_arn: self.flow_arn,
            outputs: self.outputs,
        })
    }
}