aws-sdk-mediaconnect 1.108.0

AWS SDK for AWS MediaConnect
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AddBridgeOutputsOutput {
    /// <p>The ARN of the bridge that you added outputs to.</p>
    pub bridge_arn: ::std::option::Option<::std::string::String>,
    /// <p>The outputs that you added to this bridge.</p>
    pub outputs: ::std::option::Option<::std::vec::Vec<crate::types::BridgeOutput>>,
    _request_id: Option<String>,
}
impl AddBridgeOutputsOutput {
    /// <p>The ARN of the bridge that you added outputs to.</p>
    pub fn bridge_arn(&self) -> ::std::option::Option<&str> {
        self.bridge_arn.as_deref()
    }
    /// <p>The outputs that you added to this bridge.</p>
    ///
    /// 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::BridgeOutput] {
        self.outputs.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for AddBridgeOutputsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl AddBridgeOutputsOutput {
    /// Creates a new builder-style object to manufacture [`AddBridgeOutputsOutput`](crate::operation::add_bridge_outputs::AddBridgeOutputsOutput).
    pub fn builder() -> crate::operation::add_bridge_outputs::builders::AddBridgeOutputsOutputBuilder {
        crate::operation::add_bridge_outputs::builders::AddBridgeOutputsOutputBuilder::default()
    }
}

/// A builder for [`AddBridgeOutputsOutput`](crate::operation::add_bridge_outputs::AddBridgeOutputsOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AddBridgeOutputsOutputBuilder {
    pub(crate) bridge_arn: ::std::option::Option<::std::string::String>,
    pub(crate) outputs: ::std::option::Option<::std::vec::Vec<crate::types::BridgeOutput>>,
    _request_id: Option<String>,
}
impl AddBridgeOutputsOutputBuilder {
    /// <p>The ARN of the bridge that you added outputs to.</p>
    pub fn bridge_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.bridge_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the bridge that you added outputs to.</p>
    pub fn set_bridge_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.bridge_arn = input;
        self
    }
    /// <p>The ARN of the bridge that you added outputs to.</p>
    pub fn get_bridge_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.bridge_arn
    }
    /// Appends an item to `outputs`.
    ///
    /// To override the contents of this collection use [`set_outputs`](Self::set_outputs).
    ///
    /// <p>The outputs that you added to this bridge.</p>
    pub fn outputs(mut self, input: crate::types::BridgeOutput) -> Self {
        let mut v = self.outputs.unwrap_or_default();
        v.push(input);
        self.outputs = ::std::option::Option::Some(v);
        self
    }
    /// <p>The outputs that you added to this bridge.</p>
    pub fn set_outputs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BridgeOutput>>) -> Self {
        self.outputs = input;
        self
    }
    /// <p>The outputs that you added to this bridge.</p>
    pub fn get_outputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BridgeOutput>> {
        &self.outputs
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`AddBridgeOutputsOutput`](crate::operation::add_bridge_outputs::AddBridgeOutputsOutput).
    pub fn build(self) -> crate::operation::add_bridge_outputs::AddBridgeOutputsOutput {
        crate::operation::add_bridge_outputs::AddBridgeOutputsOutput {
            bridge_arn: self.bridge_arn,
            outputs: self.outputs,
            _request_id: self._request_id,
        }
    }
}