1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Creates a new bridge. The request must include one source.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateBridgeInput {
    /// Create a bridge with the egress bridge type. An egress bridge is a cloud-to-ground bridge. The content comes from an existing MediaConnect flow and is delivered to your premises.
    pub egress_gateway_bridge: ::std::option::Option<crate::types::AddEgressGatewayBridgeRequest>,
    /// Create a bridge with the ingress bridge type. An ingress bridge is a ground-to-cloud bridge. The content originates at your premises and is delivered to the cloud.
    pub ingress_gateway_bridge: ::std::option::Option<crate::types::AddIngressGatewayBridgeRequest>,
    /// The name of the bridge. This name can not be modified after the bridge is created.
    pub name: ::std::option::Option<::std::string::String>,
    /// The outputs that you want to add to this bridge.
    pub outputs: ::std::option::Option<::std::vec::Vec<crate::types::AddBridgeOutputRequest>>,
    /// The bridge placement Amazon Resource Number (ARN).
    pub placement_arn: ::std::option::Option<::std::string::String>,
    /// The settings for source failover.
    pub source_failover_config: ::std::option::Option<crate::types::FailoverConfig>,
    /// The sources that you want to add to this bridge.
    pub sources: ::std::option::Option<::std::vec::Vec<crate::types::AddBridgeSourceRequest>>,
}
impl CreateBridgeInput {
    /// Create a bridge with the egress bridge type. An egress bridge is a cloud-to-ground bridge. The content comes from an existing MediaConnect flow and is delivered to your premises.
    pub fn egress_gateway_bridge(&self) -> ::std::option::Option<&crate::types::AddEgressGatewayBridgeRequest> {
        self.egress_gateway_bridge.as_ref()
    }
    /// Create a bridge with the ingress bridge type. An ingress bridge is a ground-to-cloud bridge. The content originates at your premises and is delivered to the cloud.
    pub fn ingress_gateway_bridge(&self) -> ::std::option::Option<&crate::types::AddIngressGatewayBridgeRequest> {
        self.ingress_gateway_bridge.as_ref()
    }
    /// The name of the bridge. This name can not be modified after the bridge is created.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// The outputs that you want to add to this bridge.
    ///
    /// 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()
    }
    /// The bridge placement Amazon Resource Number (ARN).
    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 that you want to add to this bridge.
    ///
    /// 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).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
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 {
    /// Create a bridge with the egress bridge type. An egress bridge is a cloud-to-ground bridge. The content comes from an existing MediaConnect flow and is delivered to your premises.
    pub fn egress_gateway_bridge(mut self, input: crate::types::AddEgressGatewayBridgeRequest) -> Self {
        self.egress_gateway_bridge = ::std::option::Option::Some(input);
        self
    }
    /// Create a bridge with the egress bridge type. An egress bridge is a cloud-to-ground bridge. The content comes from an existing MediaConnect flow and is delivered to your premises.
    pub fn set_egress_gateway_bridge(mut self, input: ::std::option::Option<crate::types::AddEgressGatewayBridgeRequest>) -> Self {
        self.egress_gateway_bridge = input;
        self
    }
    /// Create a bridge with the egress bridge type. An egress bridge is a cloud-to-ground bridge. The content comes from an existing MediaConnect flow and is delivered to your premises.
    pub fn get_egress_gateway_bridge(&self) -> &::std::option::Option<crate::types::AddEgressGatewayBridgeRequest> {
        &self.egress_gateway_bridge
    }
    /// Create a bridge with the ingress bridge type. An ingress bridge is a ground-to-cloud bridge. The content originates at your premises and is delivered to the cloud.
    pub fn ingress_gateway_bridge(mut self, input: crate::types::AddIngressGatewayBridgeRequest) -> Self {
        self.ingress_gateway_bridge = ::std::option::Option::Some(input);
        self
    }
    /// Create a bridge with the ingress bridge type. An ingress bridge is a ground-to-cloud bridge. The content originates at your premises and is delivered to the cloud.
    pub fn set_ingress_gateway_bridge(mut self, input: ::std::option::Option<crate::types::AddIngressGatewayBridgeRequest>) -> Self {
        self.ingress_gateway_bridge = input;
        self
    }
    /// Create a bridge with the ingress bridge type. An ingress bridge is a ground-to-cloud bridge. The content originates at your premises and is delivered to the cloud.
    pub fn get_ingress_gateway_bridge(&self) -> &::std::option::Option<crate::types::AddIngressGatewayBridgeRequest> {
        &self.ingress_gateway_bridge
    }
    /// The name of the bridge. This name can not be modified after the bridge is created.
    /// 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
    }
    /// The name of the bridge. This name can not be modified after the bridge is created.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// The name of the bridge. This name can not be modified after the bridge is created.
    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).
    ///
    /// 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 = ::std::option::Option::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
    }
    /// The outputs that you want to add to this bridge.
    pub fn get_outputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AddBridgeOutputRequest>> {
        &self.outputs
    }
    /// The bridge placement Amazon Resource Number (ARN).
    /// 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
    }
    /// The bridge placement Amazon Resource Number (ARN).
    pub fn set_placement_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.placement_arn = input;
        self
    }
    /// The bridge placement Amazon Resource Number (ARN).
    pub fn get_placement_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.placement_arn
    }
    /// The settings for source failover.
    pub fn source_failover_config(mut self, input: crate::types::FailoverConfig) -> Self {
        self.source_failover_config = ::std::option::Option::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
    }
    /// The settings for source failover.
    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).
    ///
    /// The sources that you want to add to this bridge.
    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
    }
    /// The sources that you want to add to this bridge.
    pub fn set_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AddBridgeSourceRequest>>) -> Self {
        self.sources = input;
        self
    }
    /// The sources that you want to add to this bridge.
    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,
        })
    }
}