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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// The settings for the source of the flow.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Source {
/// Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
#[doc(hidden)]
pub data_transfer_subscriber_fee_percent: i32,
/// The type of encryption that is used on the content ingested from this source.
#[doc(hidden)]
pub decryption: std::option::Option<crate::types::Encryption>,
/// A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account.
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
/// The ARN of the entitlement that allows you to subscribe to content that comes from another AWS account. The entitlement is set by the content originator and the ARN is generated as part of the originator's flow.
#[doc(hidden)]
pub entitlement_arn: std::option::Option<std::string::String>,
/// The IP address that the flow will be listening on for incoming content.
#[doc(hidden)]
pub ingest_ip: std::option::Option<std::string::String>,
/// The port that the flow will be listening on for incoming content.
#[doc(hidden)]
pub ingest_port: i32,
/// The media streams that are associated with the source, and the parameters for those associations.
#[doc(hidden)]
pub media_stream_source_configurations:
std::option::Option<std::vec::Vec<crate::types::MediaStreamSourceConfiguration>>,
/// The name of the source.
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
/// The port that the flow uses to send outbound requests to initiate connection with the sender.
#[doc(hidden)]
pub sender_control_port: i32,
/// The IP address that the flow communicates with to initiate connection with the sender.
#[doc(hidden)]
pub sender_ip_address: std::option::Option<std::string::String>,
/// The ARN of the source.
#[doc(hidden)]
pub source_arn: std::option::Option<std::string::String>,
/// Attributes related to the transport stream that are used in the source.
#[doc(hidden)]
pub transport: std::option::Option<crate::types::Transport>,
/// The name of the VPC interface that is used for this source.
#[doc(hidden)]
pub vpc_interface_name: std::option::Option<std::string::String>,
/// The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
#[doc(hidden)]
pub whitelist_cidr: std::option::Option<std::string::String>,
}
impl Source {
/// Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
pub fn data_transfer_subscriber_fee_percent(&self) -> i32 {
self.data_transfer_subscriber_fee_percent
}
/// The type of encryption that is used on the content ingested from this source.
pub fn decryption(&self) -> std::option::Option<&crate::types::Encryption> {
self.decryption.as_ref()
}
/// A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account.
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
/// The ARN of the entitlement that allows you to subscribe to content that comes from another AWS account. The entitlement is set by the content originator and the ARN is generated as part of the originator's flow.
pub fn entitlement_arn(&self) -> std::option::Option<&str> {
self.entitlement_arn.as_deref()
}
/// The IP address that the flow will be listening on for incoming content.
pub fn ingest_ip(&self) -> std::option::Option<&str> {
self.ingest_ip.as_deref()
}
/// The port that the flow will be listening on for incoming content.
pub fn ingest_port(&self) -> i32 {
self.ingest_port
}
/// The media streams that are associated with the source, and the parameters for those associations.
pub fn media_stream_source_configurations(
&self,
) -> std::option::Option<&[crate::types::MediaStreamSourceConfiguration]> {
self.media_stream_source_configurations.as_deref()
}
/// The name of the source.
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// The port that the flow uses to send outbound requests to initiate connection with the sender.
pub fn sender_control_port(&self) -> i32 {
self.sender_control_port
}
/// The IP address that the flow communicates with to initiate connection with the sender.
pub fn sender_ip_address(&self) -> std::option::Option<&str> {
self.sender_ip_address.as_deref()
}
/// The ARN of the source.
pub fn source_arn(&self) -> std::option::Option<&str> {
self.source_arn.as_deref()
}
/// Attributes related to the transport stream that are used in the source.
pub fn transport(&self) -> std::option::Option<&crate::types::Transport> {
self.transport.as_ref()
}
/// The name of the VPC interface that is used for this source.
pub fn vpc_interface_name(&self) -> std::option::Option<&str> {
self.vpc_interface_name.as_deref()
}
/// The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
pub fn whitelist_cidr(&self) -> std::option::Option<&str> {
self.whitelist_cidr.as_deref()
}
}
impl Source {
/// Creates a new builder-style object to manufacture [`Source`](crate::types::Source).
pub fn builder() -> crate::types::builders::SourceBuilder {
crate::types::builders::SourceBuilder::default()
}
}
/// A builder for [`Source`](crate::types::Source).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct SourceBuilder {
pub(crate) data_transfer_subscriber_fee_percent: std::option::Option<i32>,
pub(crate) decryption: std::option::Option<crate::types::Encryption>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) entitlement_arn: std::option::Option<std::string::String>,
pub(crate) ingest_ip: std::option::Option<std::string::String>,
pub(crate) ingest_port: std::option::Option<i32>,
pub(crate) media_stream_source_configurations:
std::option::Option<std::vec::Vec<crate::types::MediaStreamSourceConfiguration>>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) sender_control_port: std::option::Option<i32>,
pub(crate) sender_ip_address: std::option::Option<std::string::String>,
pub(crate) source_arn: std::option::Option<std::string::String>,
pub(crate) transport: std::option::Option<crate::types::Transport>,
pub(crate) vpc_interface_name: std::option::Option<std::string::String>,
pub(crate) whitelist_cidr: std::option::Option<std::string::String>,
}
impl SourceBuilder {
/// Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
pub fn data_transfer_subscriber_fee_percent(mut self, input: i32) -> Self {
self.data_transfer_subscriber_fee_percent = Some(input);
self
}
/// Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
pub fn set_data_transfer_subscriber_fee_percent(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.data_transfer_subscriber_fee_percent = input;
self
}
/// The type of encryption that is used on the content ingested from this source.
pub fn decryption(mut self, input: crate::types::Encryption) -> Self {
self.decryption = Some(input);
self
}
/// The type of encryption that is used on the content ingested from this source.
pub fn set_decryption(mut self, input: std::option::Option<crate::types::Encryption>) -> Self {
self.decryption = input;
self
}
/// A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account.
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
/// A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account.
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
/// The ARN of the entitlement that allows you to subscribe to content that comes from another AWS account. The entitlement is set by the content originator and the ARN is generated as part of the originator's flow.
pub fn entitlement_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.entitlement_arn = Some(input.into());
self
}
/// The ARN of the entitlement that allows you to subscribe to content that comes from another AWS account. The entitlement is set by the content originator and the ARN is generated as part of the originator's flow.
pub fn set_entitlement_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.entitlement_arn = input;
self
}
/// The IP address that the flow will be listening on for incoming content.
pub fn ingest_ip(mut self, input: impl Into<std::string::String>) -> Self {
self.ingest_ip = Some(input.into());
self
}
/// The IP address that the flow will be listening on for incoming content.
pub fn set_ingest_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ingest_ip = input;
self
}
/// The port that the flow will be listening on for incoming content.
pub fn ingest_port(mut self, input: i32) -> Self {
self.ingest_port = Some(input);
self
}
/// The port that the flow will be listening on for incoming content.
pub fn set_ingest_port(mut self, input: std::option::Option<i32>) -> Self {
self.ingest_port = input;
self
}
/// Appends an item to `media_stream_source_configurations`.
///
/// To override the contents of this collection use [`set_media_stream_source_configurations`](Self::set_media_stream_source_configurations).
///
/// The media streams that are associated with the source, and the parameters for those associations.
pub fn media_stream_source_configurations(
mut self,
input: crate::types::MediaStreamSourceConfiguration,
) -> Self {
let mut v = self.media_stream_source_configurations.unwrap_or_default();
v.push(input);
self.media_stream_source_configurations = Some(v);
self
}
/// The media streams that are associated with the source, and the parameters for those associations.
pub fn set_media_stream_source_configurations(
mut self,
input: std::option::Option<std::vec::Vec<crate::types::MediaStreamSourceConfiguration>>,
) -> Self {
self.media_stream_source_configurations = input;
self
}
/// The name of the source.
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// The name of the source.
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// The port that the flow uses to send outbound requests to initiate connection with the sender.
pub fn sender_control_port(mut self, input: i32) -> Self {
self.sender_control_port = Some(input);
self
}
/// The port that the flow uses to send outbound requests to initiate connection with the sender.
pub fn set_sender_control_port(mut self, input: std::option::Option<i32>) -> Self {
self.sender_control_port = input;
self
}
/// The IP address that the flow communicates with to initiate connection with the sender.
pub fn sender_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
self.sender_ip_address = Some(input.into());
self
}
/// The IP address that the flow communicates with to initiate connection with the sender.
pub fn set_sender_ip_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.sender_ip_address = input;
self
}
/// The ARN of the source.
pub fn source_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.source_arn = Some(input.into());
self
}
/// The ARN of the source.
pub fn set_source_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.source_arn = input;
self
}
/// Attributes related to the transport stream that are used in the source.
pub fn transport(mut self, input: crate::types::Transport) -> Self {
self.transport = Some(input);
self
}
/// Attributes related to the transport stream that are used in the source.
pub fn set_transport(mut self, input: std::option::Option<crate::types::Transport>) -> Self {
self.transport = input;
self
}
/// The name of the VPC interface that is used for this source.
pub fn vpc_interface_name(mut self, input: impl Into<std::string::String>) -> Self {
self.vpc_interface_name = Some(input.into());
self
}
/// The name of the VPC interface that is used for this source.
pub fn set_vpc_interface_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.vpc_interface_name = input;
self
}
/// The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
pub fn whitelist_cidr(mut self, input: impl Into<std::string::String>) -> Self {
self.whitelist_cidr = Some(input.into());
self
}
/// The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
pub fn set_whitelist_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
self.whitelist_cidr = input;
self
}
/// Consumes the builder and constructs a [`Source`](crate::types::Source).
pub fn build(self) -> crate::types::Source {
crate::types::Source {
data_transfer_subscriber_fee_percent: self
.data_transfer_subscriber_fee_percent
.unwrap_or_default(),
decryption: self.decryption,
description: self.description,
entitlement_arn: self.entitlement_arn,
ingest_ip: self.ingest_ip,
ingest_port: self.ingest_port.unwrap_or_default(),
media_stream_source_configurations: self.media_stream_source_configurations,
name: self.name,
sender_control_port: self.sender_control_port.unwrap_or_default(),
sender_ip_address: self.sender_ip_address,
source_arn: self.source_arn,
transport: self.transport,
vpc_interface_name: self.vpc_interface_name,
whitelist_cidr: self.whitelist_cidr,
}
}
}