aws-sdk-mediaconnect 1.109.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 CreateBridgeInput {
    /// <p>An egress bridge is a cloud-to-ground bridge. The content comes from an existing MediaConnect flow and is delivered to your premises.</p>
    pub egress_gateway_bridge: ::std::option::Option<crate::types::AddEgressGatewayBridgeRequest>,
    /// <p>An ingress bridge is a ground-to-cloud bridge. The content originates at your premises and is delivered to the cloud.</p>
    pub ingress_gateway_bridge: ::std::option::Option<crate::types::AddIngressGatewayBridgeRequest>,
    /// <p>The name of the bridge. This name can not be modified after the bridge is created.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The outputs that you want to add to this bridge.</p>
    pub outputs: ::std::option::Option<::std::vec::Vec<crate::types::AddBridgeOutputRequest>>,
    /// <p>The bridge placement Amazon Resource Number (ARN).</p>
    pub placement_arn: ::std::option::Option<::std::string::String>,
    /// <p>The settings for source failover.</p>
    pub source_failover_config: ::std::option::Option<crate::types::FailoverConfig>,
    /// <p>The sources that you want to add to this bridge.</p>
    pub sources: ::std::option::Option<::std::vec::Vec<crate::types::AddBridgeSourceRequest>>,
}
impl CreateBridgeInput {
    /// <p>An egress bridge is a cloud-to-ground bridge. The content comes from an existing MediaConnect flow and is delivered to your premises.</p>
    pub fn egress_gateway_bridge(&self) -> ::std::option::Option<&crate::types::AddEgressGatewayBridgeRequest> {
        self.egress_gateway_bridge.as_ref()
    }
    /// <p>An ingress bridge is a ground-to-cloud bridge. The content originates at your premises and is delivered to the cloud.</p>
    pub fn ingress_gateway_bridge(&self) -> ::std::option::Option<&crate::types::AddIngressGatewayBridgeRequest> {
        self.ingress_gateway_bridge.as_ref()
    }
    /// <p>The name of the bridge. This name can not be modified after the bridge is created.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The outputs that you want to add 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::AddBridgeOutputRequest] {
        self.outputs.as_deref().unwrap_or_default()
    }
    /// <p>The bridge placement Amazon Resource Number (ARN).</p>
    pub fn placement_arn(&self) -> ::std::option::Option<&str> {
        self.placement_arn.as_deref()
    }
    /// <p>The settings for source failover.</p>
    pub fn source_failover_config(&self) -> ::std::option::Option<&crate::types::FailoverConfig> {
        self.source_failover_config.as_ref()
    }
    /// <p>The sources that you want to add 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 `.sources.is_none()`.
    pub fn sources(&self) -> &[crate::types::AddBridgeSourceRequest] {
        self.sources.as_deref().unwrap_or_default()
    }
}
impl CreateBridgeInput {
    /// Creates a new builder-style object to manufacture [`CreateBridgeInput`](crate::operation::create_bridge::CreateBridgeInput).
    pub fn builder() -> crate::operation::create_bridge::builders::CreateBridgeInputBuilder {
        crate::operation::create_bridge::builders::CreateBridgeInputBuilder::default()
    }
}

/// A builder for [`CreateBridgeInput`](crate::operation::create_bridge::CreateBridgeInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateBridgeInputBuilder {
    pub(crate) egress_gateway_bridge: ::std::option::Option<crate::types::AddEgressGatewayBridgeRequest>,
    pub(crate) ingress_gateway_bridge: ::std::option::Option<crate::types::AddIngressGatewayBridgeRequest>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) outputs: ::std::option::Option<::std::vec::Vec<crate::types::AddBridgeOutputRequest>>,
    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::AddBridgeSourceRequest>>,
}
impl CreateBridgeInputBuilder {
    /// <p>An egress bridge is a cloud-to-ground bridge. The content comes from an existing MediaConnect flow and is delivered to your premises.</p>
    pub fn egress_gateway_bridge(mut self, input: crate::types::AddEgressGatewayBridgeRequest) -> Self {
        self.egress_gateway_bridge = ::std::option::Option::Some(input);
        self
    }
    /// <p>An egress bridge is a cloud-to-ground bridge. The content comes from an existing MediaConnect flow and is delivered to your premises.</p>
    pub fn set_egress_gateway_bridge(mut self, input: ::std::option::Option<crate::types::AddEgressGatewayBridgeRequest>) -> Self {
        self.egress_gateway_bridge = input;
        self
    }
    /// <p>An egress bridge is a cloud-to-ground bridge. The content comes from an existing MediaConnect flow and is delivered to your premises.</p>
    pub fn get_egress_gateway_bridge(&self) -> &::std::option::Option<crate::types::AddEgressGatewayBridgeRequest> {
        &self.egress_gateway_bridge
    }
    /// <p>An ingress bridge is a ground-to-cloud bridge. The content originates at your premises and is delivered to the cloud.</p>
    pub fn ingress_gateway_bridge(mut self, input: crate::types::AddIngressGatewayBridgeRequest) -> Self {
        self.ingress_gateway_bridge = ::std::option::Option::Some(input);
        self
    }
    /// <p>An ingress bridge is a ground-to-cloud bridge. The content originates at your premises and is delivered to the cloud.</p>
    pub fn set_ingress_gateway_bridge(mut self, input: ::std::option::Option<crate::types::AddIngressGatewayBridgeRequest>) -> Self {
        self.ingress_gateway_bridge = input;
        self
    }
    /// <p>An ingress bridge is a ground-to-cloud bridge. The content originates at your premises and is delivered to the cloud.</p>
    pub fn get_ingress_gateway_bridge(&self) -> &::std::option::Option<crate::types::AddIngressGatewayBridgeRequest> {
        &self.ingress_gateway_bridge
    }
    /// <p>The name of the bridge. This name can not be modified after the bridge is created.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the bridge. This name can not be modified after the bridge is created.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the bridge. This name can not be modified after the bridge is created.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// Appends an item to `outputs`.
    ///
    /// To override the contents of this collection use [`set_outputs`](Self::set_outputs).
    ///
    /// <p>The outputs that you want to add to this bridge.</p>
    pub fn outputs(mut self, input: crate::types::AddBridgeOutputRequest) -> 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 want to add to this bridge.</p>
    pub fn set_outputs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AddBridgeOutputRequest>>) -> Self {
        self.outputs = input;
        self
    }
    /// <p>The outputs that you want to add to this bridge.</p>
    pub fn get_outputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AddBridgeOutputRequest>> {
        &self.outputs
    }
    /// <p>The bridge placement Amazon Resource Number (ARN).</p>
    /// This field is required.
    pub fn placement_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.placement_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The bridge placement Amazon Resource Number (ARN).</p>
    pub fn set_placement_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.placement_arn = input;
        self
    }
    /// <p>The bridge placement Amazon Resource Number (ARN).</p>
    pub fn get_placement_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.placement_arn
    }
    /// <p>The settings for source failover.</p>
    pub fn source_failover_config(mut self, input: crate::types::FailoverConfig) -> Self {
        self.source_failover_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>The settings for source failover.</p>
    pub fn set_source_failover_config(mut self, input: ::std::option::Option<crate::types::FailoverConfig>) -> Self {
        self.source_failover_config = input;
        self
    }
    /// <p>The settings for source failover.</p>
    pub fn get_source_failover_config(&self) -> &::std::option::Option<crate::types::FailoverConfig> {
        &self.source_failover_config
    }
    /// Appends an item to `sources`.
    ///
    /// To override the contents of this collection use [`set_sources`](Self::set_sources).
    ///
    /// <p>The sources that you want to add to this bridge.</p>
    pub fn sources(mut self, input: crate::types::AddBridgeSourceRequest) -> Self {
        let mut v = self.sources.unwrap_or_default();
        v.push(input);
        self.sources = ::std::option::Option::Some(v);
        self
    }
    /// <p>The sources that you want to add to this bridge.</p>
    pub fn set_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AddBridgeSourceRequest>>) -> Self {
        self.sources = input;
        self
    }
    /// <p>The sources that you want to add to this bridge.</p>
    pub fn get_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AddBridgeSourceRequest>> {
        &self.sources
    }
    /// Consumes the builder and constructs a [`CreateBridgeInput`](crate::operation::create_bridge::CreateBridgeInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_bridge::CreateBridgeInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_bridge::CreateBridgeInput {
            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,
        })
    }
}