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 Bridge is the connection between your datacenter's Instances and the AWS cloud. A bridge can be used to send video from the AWS cloud to your datacenter or from your datacenter to the AWS cloud.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Bridge {
    /// The Amazon Resource Number (ARN) of the bridge.
    #[doc(hidden)]
    pub bridge_arn: std::option::Option<std::string::String>,
    #[allow(missing_docs)] // documentation missing in model
    #[doc(hidden)]
    pub bridge_messages: std::option::Option<std::vec::Vec<crate::types::MessageDetail>>,
    #[allow(missing_docs)] // documentation missing in model
    #[doc(hidden)]
    pub bridge_state: std::option::Option<crate::types::BridgeState>,
    #[allow(missing_docs)] // documentation missing in model
    #[doc(hidden)]
    pub egress_gateway_bridge: std::option::Option<crate::types::EgressGatewayBridge>,
    #[allow(missing_docs)] // documentation missing in model
    #[doc(hidden)]
    pub ingress_gateway_bridge: std::option::Option<crate::types::IngressGatewayBridge>,
    /// The name of the bridge.
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// The outputs on this bridge.
    #[doc(hidden)]
    pub outputs: std::option::Option<std::vec::Vec<crate::types::BridgeOutput>>,
    /// The placement Amazon Resource Number (ARN) of the bridge.
    #[doc(hidden)]
    pub placement_arn: std::option::Option<std::string::String>,
    /// The settings for source failover.
    #[doc(hidden)]
    pub source_failover_config: std::option::Option<crate::types::FailoverConfig>,
    /// The sources on this bridge.
    #[doc(hidden)]
    pub sources: std::option::Option<std::vec::Vec<crate::types::BridgeSource>>,
}
impl Bridge {
    /// The Amazon Resource Number (ARN) of the bridge.
    pub fn bridge_arn(&self) -> std::option::Option<&str> {
        self.bridge_arn.as_deref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn bridge_messages(&self) -> std::option::Option<&[crate::types::MessageDetail]> {
        self.bridge_messages.as_deref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn bridge_state(&self) -> std::option::Option<&crate::types::BridgeState> {
        self.bridge_state.as_ref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn egress_gateway_bridge(&self) -> std::option::Option<&crate::types::EgressGatewayBridge> {
        self.egress_gateway_bridge.as_ref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn ingress_gateway_bridge(
        &self,
    ) -> std::option::Option<&crate::types::IngressGatewayBridge> {
        self.ingress_gateway_bridge.as_ref()
    }
    /// The name of the bridge.
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// The outputs on this bridge.
    pub fn outputs(&self) -> std::option::Option<&[crate::types::BridgeOutput]> {
        self.outputs.as_deref()
    }
    /// The placement Amazon Resource Number (ARN) of the bridge.
    pub fn placement_arn(&self) -> std::option::Option<&str> {
        self.placement_arn.as_deref()
    }
    /// The settings for source failover.
    pub fn source_failover_config(&self) -> std::option::Option<&crate::types::FailoverConfig> {
        self.source_failover_config.as_ref()
    }
    /// The sources on this bridge.
    pub fn sources(&self) -> std::option::Option<&[crate::types::BridgeSource]> {
        self.sources.as_deref()
    }
}
impl Bridge {
    /// Creates a new builder-style object to manufacture [`Bridge`](crate::types::Bridge).
    pub fn builder() -> crate::types::builders::BridgeBuilder {
        crate::types::builders::BridgeBuilder::default()
    }
}

/// A builder for [`Bridge`](crate::types::Bridge).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct BridgeBuilder {
    pub(crate) bridge_arn: std::option::Option<std::string::String>,
    pub(crate) bridge_messages: std::option::Option<std::vec::Vec<crate::types::MessageDetail>>,
    pub(crate) bridge_state: std::option::Option<crate::types::BridgeState>,
    pub(crate) egress_gateway_bridge: std::option::Option<crate::types::EgressGatewayBridge>,
    pub(crate) ingress_gateway_bridge: std::option::Option<crate::types::IngressGatewayBridge>,
    pub(crate) name: std::option::Option<std::string::String>,
    pub(crate) outputs: std::option::Option<std::vec::Vec<crate::types::BridgeOutput>>,
    pub(crate) placement_arn: std::option::Option<std::string::String>,
    pub(crate) source_failover_config: std::option::Option<crate::types::FailoverConfig>,
    pub(crate) sources: std::option::Option<std::vec::Vec<crate::types::BridgeSource>>,
}
impl BridgeBuilder {
    /// The Amazon Resource Number (ARN) of the bridge.
    pub fn bridge_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.bridge_arn = Some(input.into());
        self
    }
    /// The Amazon Resource Number (ARN) of the bridge.
    pub fn set_bridge_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.bridge_arn = input;
        self
    }
    /// Appends an item to `bridge_messages`.
    ///
    /// To override the contents of this collection use [`set_bridge_messages`](Self::set_bridge_messages).
    ///
    pub fn bridge_messages(mut self, input: crate::types::MessageDetail) -> Self {
        let mut v = self.bridge_messages.unwrap_or_default();
        v.push(input);
        self.bridge_messages = Some(v);
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_bridge_messages(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::MessageDetail>>,
    ) -> Self {
        self.bridge_messages = input;
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn bridge_state(mut self, input: crate::types::BridgeState) -> Self {
        self.bridge_state = Some(input);
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_bridge_state(
        mut self,
        input: std::option::Option<crate::types::BridgeState>,
    ) -> Self {
        self.bridge_state = input;
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn egress_gateway_bridge(mut self, input: crate::types::EgressGatewayBridge) -> Self {
        self.egress_gateway_bridge = Some(input);
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_egress_gateway_bridge(
        mut self,
        input: std::option::Option<crate::types::EgressGatewayBridge>,
    ) -> Self {
        self.egress_gateway_bridge = input;
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn ingress_gateway_bridge(mut self, input: crate::types::IngressGatewayBridge) -> Self {
        self.ingress_gateway_bridge = Some(input);
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_ingress_gateway_bridge(
        mut self,
        input: std::option::Option<crate::types::IngressGatewayBridge>,
    ) -> Self {
        self.ingress_gateway_bridge = input;
        self
    }
    /// The name of the bridge.
    pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
        self.name = Some(input.into());
        self
    }
    /// The name of the bridge.
    pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// Appends an item to `outputs`.
    ///
    /// To override the contents of this collection use [`set_outputs`](Self::set_outputs).
    ///
    /// The outputs on this bridge.
    pub fn outputs(mut self, input: crate::types::BridgeOutput) -> Self {
        let mut v = self.outputs.unwrap_or_default();
        v.push(input);
        self.outputs = Some(v);
        self
    }
    /// The outputs on this bridge.
    pub fn set_outputs(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::BridgeOutput>>,
    ) -> Self {
        self.outputs = input;
        self
    }
    /// The placement Amazon Resource Number (ARN) of the bridge.
    pub fn placement_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.placement_arn = Some(input.into());
        self
    }
    /// The placement Amazon Resource Number (ARN) of the bridge.
    pub fn set_placement_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.placement_arn = input;
        self
    }
    /// The settings for source failover.
    pub fn source_failover_config(mut self, input: crate::types::FailoverConfig) -> Self {
        self.source_failover_config = Some(input);
        self
    }
    /// The settings for source failover.
    pub fn set_source_failover_config(
        mut self,
        input: std::option::Option<crate::types::FailoverConfig>,
    ) -> Self {
        self.source_failover_config = input;
        self
    }
    /// Appends an item to `sources`.
    ///
    /// To override the contents of this collection use [`set_sources`](Self::set_sources).
    ///
    /// The sources on this bridge.
    pub fn sources(mut self, input: crate::types::BridgeSource) -> Self {
        let mut v = self.sources.unwrap_or_default();
        v.push(input);
        self.sources = Some(v);
        self
    }
    /// The sources on this bridge.
    pub fn set_sources(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::BridgeSource>>,
    ) -> Self {
        self.sources = input;
        self
    }
    /// Consumes the builder and constructs a [`Bridge`](crate::types::Bridge).
    pub fn build(self) -> crate::types::Bridge {
        crate::types::Bridge {
            bridge_arn: self.bridge_arn,
            bridge_messages: self.bridge_messages,
            bridge_state: self.bridge_state,
            egress_gateway_bridge: self.egress_gateway_bridge,
            ingress_gateway_bridge: self.ingress_gateway_bridge,
            name: self.name,
            outputs: self.outputs,
            placement_arn: self.placement_arn,
            source_failover_config: self.source_failover_config,
            sources: self.sources,
        }
    }
}