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
322
323
324
325
326
327
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>A pricing agreement for a discounted rate for a specific outbound bandwidth that your MediaConnect account will use each month over a specific time period. The discounted rate in the reservation applies to outbound bandwidth for all flows from your account until your account reaches the amount of bandwidth in your reservation. If you use more outbound bandwidth than the agreed upon amount in a single month, the overage is charged at the on-demand rate.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Reservation {
/// <p>The type of currency that is used for billing. The currencyCode used for your reservation is US dollars.</p>
pub currency_code: ::std::option::Option<::std::string::String>,
/// <p>The length of time that this reservation is active. MediaConnect defines this value in the offering.</p>
pub duration: ::std::option::Option<i32>,
/// <p>The unit of measurement for the duration of the reservation. MediaConnect defines this value in the offering.</p>
pub duration_units: ::std::option::Option<crate::types::DurationUnits>,
/// <p>The day and time that this reservation expires. This value is calculated based on the start date and time that you set and the offering's duration.</p>
pub end: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the offering.</p>
pub offering_arn: ::std::option::Option<::std::string::String>,
/// <p>A description of the offering. MediaConnect defines this value in the offering.</p>
pub offering_description: ::std::option::Option<::std::string::String>,
/// <p>The cost of a single unit. This value, in combination with priceUnits, makes up the rate. MediaConnect defines this value in the offering.</p>
pub price_per_unit: ::std::option::Option<::std::string::String>,
/// <p>The unit of measurement that is used for billing. This value, in combination with pricePerUnit, makes up the rate. MediaConnect defines this value in the offering.</p>
pub price_units: ::std::option::Option<crate::types::PriceUnits>,
/// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the reservation when you purchase an offering.</p>
pub reservation_arn: ::std::option::Option<::std::string::String>,
/// <p>The name that you assigned to the reservation when you purchased the offering.</p>
pub reservation_name: ::std::option::Option<::std::string::String>,
/// <p>The status of your reservation.</p>
pub reservation_state: ::std::option::Option<crate::types::ReservationState>,
/// <p>A definition of the amount of outbound bandwidth that you would be reserving if you purchase the offering. MediaConnect defines the values that make up the resourceSpecification in the offering.</p>
pub resource_specification: ::std::option::Option<crate::types::ResourceSpecification>,
/// <p>The day and time that the reservation becomes active. You set this value when you purchase the offering.</p>
pub start: ::std::option::Option<::std::string::String>,
}
impl Reservation {
/// <p>The type of currency that is used for billing. The currencyCode used for your reservation is US dollars.</p>
pub fn currency_code(&self) -> ::std::option::Option<&str> {
self.currency_code.as_deref()
}
/// <p>The length of time that this reservation is active. MediaConnect defines this value in the offering.</p>
pub fn duration(&self) -> ::std::option::Option<i32> {
self.duration
}
/// <p>The unit of measurement for the duration of the reservation. MediaConnect defines this value in the offering.</p>
pub fn duration_units(&self) -> ::std::option::Option<&crate::types::DurationUnits> {
self.duration_units.as_ref()
}
/// <p>The day and time that this reservation expires. This value is calculated based on the start date and time that you set and the offering's duration.</p>
pub fn end(&self) -> ::std::option::Option<&str> {
self.end.as_deref()
}
/// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the offering.</p>
pub fn offering_arn(&self) -> ::std::option::Option<&str> {
self.offering_arn.as_deref()
}
/// <p>A description of the offering. MediaConnect defines this value in the offering.</p>
pub fn offering_description(&self) -> ::std::option::Option<&str> {
self.offering_description.as_deref()
}
/// <p>The cost of a single unit. This value, in combination with priceUnits, makes up the rate. MediaConnect defines this value in the offering.</p>
pub fn price_per_unit(&self) -> ::std::option::Option<&str> {
self.price_per_unit.as_deref()
}
/// <p>The unit of measurement that is used for billing. This value, in combination with pricePerUnit, makes up the rate. MediaConnect defines this value in the offering.</p>
pub fn price_units(&self) -> ::std::option::Option<&crate::types::PriceUnits> {
self.price_units.as_ref()
}
/// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the reservation when you purchase an offering.</p>
pub fn reservation_arn(&self) -> ::std::option::Option<&str> {
self.reservation_arn.as_deref()
}
/// <p>The name that you assigned to the reservation when you purchased the offering.</p>
pub fn reservation_name(&self) -> ::std::option::Option<&str> {
self.reservation_name.as_deref()
}
/// <p>The status of your reservation.</p>
pub fn reservation_state(&self) -> ::std::option::Option<&crate::types::ReservationState> {
self.reservation_state.as_ref()
}
/// <p>A definition of the amount of outbound bandwidth that you would be reserving if you purchase the offering. MediaConnect defines the values that make up the resourceSpecification in the offering.</p>
pub fn resource_specification(&self) -> ::std::option::Option<&crate::types::ResourceSpecification> {
self.resource_specification.as_ref()
}
/// <p>The day and time that the reservation becomes active. You set this value when you purchase the offering.</p>
pub fn start(&self) -> ::std::option::Option<&str> {
self.start.as_deref()
}
}
impl Reservation {
/// Creates a new builder-style object to manufacture [`Reservation`](crate::types::Reservation).
pub fn builder() -> crate::types::builders::ReservationBuilder {
crate::types::builders::ReservationBuilder::default()
}
}
/// A builder for [`Reservation`](crate::types::Reservation).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ReservationBuilder {
pub(crate) currency_code: ::std::option::Option<::std::string::String>,
pub(crate) duration: ::std::option::Option<i32>,
pub(crate) duration_units: ::std::option::Option<crate::types::DurationUnits>,
pub(crate) end: ::std::option::Option<::std::string::String>,
pub(crate) offering_arn: ::std::option::Option<::std::string::String>,
pub(crate) offering_description: ::std::option::Option<::std::string::String>,
pub(crate) price_per_unit: ::std::option::Option<::std::string::String>,
pub(crate) price_units: ::std::option::Option<crate::types::PriceUnits>,
pub(crate) reservation_arn: ::std::option::Option<::std::string::String>,
pub(crate) reservation_name: ::std::option::Option<::std::string::String>,
pub(crate) reservation_state: ::std::option::Option<crate::types::ReservationState>,
pub(crate) resource_specification: ::std::option::Option<crate::types::ResourceSpecification>,
pub(crate) start: ::std::option::Option<::std::string::String>,
}
impl ReservationBuilder {
/// <p>The type of currency that is used for billing. The currencyCode used for your reservation is US dollars.</p>
/// This field is required.
pub fn currency_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.currency_code = ::std::option::Option::Some(input.into());
self
}
/// <p>The type of currency that is used for billing. The currencyCode used for your reservation is US dollars.</p>
pub fn set_currency_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.currency_code = input;
self
}
/// <p>The type of currency that is used for billing. The currencyCode used for your reservation is US dollars.</p>
pub fn get_currency_code(&self) -> &::std::option::Option<::std::string::String> {
&self.currency_code
}
/// <p>The length of time that this reservation is active. MediaConnect defines this value in the offering.</p>
/// This field is required.
pub fn duration(mut self, input: i32) -> Self {
self.duration = ::std::option::Option::Some(input);
self
}
/// <p>The length of time that this reservation is active. MediaConnect defines this value in the offering.</p>
pub fn set_duration(mut self, input: ::std::option::Option<i32>) -> Self {
self.duration = input;
self
}
/// <p>The length of time that this reservation is active. MediaConnect defines this value in the offering.</p>
pub fn get_duration(&self) -> &::std::option::Option<i32> {
&self.duration
}
/// <p>The unit of measurement for the duration of the reservation. MediaConnect defines this value in the offering.</p>
/// This field is required.
pub fn duration_units(mut self, input: crate::types::DurationUnits) -> Self {
self.duration_units = ::std::option::Option::Some(input);
self
}
/// <p>The unit of measurement for the duration of the reservation. MediaConnect defines this value in the offering.</p>
pub fn set_duration_units(mut self, input: ::std::option::Option<crate::types::DurationUnits>) -> Self {
self.duration_units = input;
self
}
/// <p>The unit of measurement for the duration of the reservation. MediaConnect defines this value in the offering.</p>
pub fn get_duration_units(&self) -> &::std::option::Option<crate::types::DurationUnits> {
&self.duration_units
}
/// <p>The day and time that this reservation expires. This value is calculated based on the start date and time that you set and the offering's duration.</p>
/// This field is required.
pub fn end(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.end = ::std::option::Option::Some(input.into());
self
}
/// <p>The day and time that this reservation expires. This value is calculated based on the start date and time that you set and the offering's duration.</p>
pub fn set_end(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.end = input;
self
}
/// <p>The day and time that this reservation expires. This value is calculated based on the start date and time that you set and the offering's duration.</p>
pub fn get_end(&self) -> &::std::option::Option<::std::string::String> {
&self.end
}
/// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the offering.</p>
/// This field is required.
pub fn offering_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.offering_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the offering.</p>
pub fn set_offering_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.offering_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the offering.</p>
pub fn get_offering_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.offering_arn
}
/// <p>A description of the offering. MediaConnect defines this value in the offering.</p>
/// This field is required.
pub fn offering_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.offering_description = ::std::option::Option::Some(input.into());
self
}
/// <p>A description of the offering. MediaConnect defines this value in the offering.</p>
pub fn set_offering_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.offering_description = input;
self
}
/// <p>A description of the offering. MediaConnect defines this value in the offering.</p>
pub fn get_offering_description(&self) -> &::std::option::Option<::std::string::String> {
&self.offering_description
}
/// <p>The cost of a single unit. This value, in combination with priceUnits, makes up the rate. MediaConnect defines this value in the offering.</p>
/// This field is required.
pub fn price_per_unit(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.price_per_unit = ::std::option::Option::Some(input.into());
self
}
/// <p>The cost of a single unit. This value, in combination with priceUnits, makes up the rate. MediaConnect defines this value in the offering.</p>
pub fn set_price_per_unit(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.price_per_unit = input;
self
}
/// <p>The cost of a single unit. This value, in combination with priceUnits, makes up the rate. MediaConnect defines this value in the offering.</p>
pub fn get_price_per_unit(&self) -> &::std::option::Option<::std::string::String> {
&self.price_per_unit
}
/// <p>The unit of measurement that is used for billing. This value, in combination with pricePerUnit, makes up the rate. MediaConnect defines this value in the offering.</p>
/// This field is required.
pub fn price_units(mut self, input: crate::types::PriceUnits) -> Self {
self.price_units = ::std::option::Option::Some(input);
self
}
/// <p>The unit of measurement that is used for billing. This value, in combination with pricePerUnit, makes up the rate. MediaConnect defines this value in the offering.</p>
pub fn set_price_units(mut self, input: ::std::option::Option<crate::types::PriceUnits>) -> Self {
self.price_units = input;
self
}
/// <p>The unit of measurement that is used for billing. This value, in combination with pricePerUnit, makes up the rate. MediaConnect defines this value in the offering.</p>
pub fn get_price_units(&self) -> &::std::option::Option<crate::types::PriceUnits> {
&self.price_units
}
/// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the reservation when you purchase an offering.</p>
/// This field is required.
pub fn reservation_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.reservation_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the reservation when you purchase an offering.</p>
pub fn set_reservation_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.reservation_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the reservation when you purchase an offering.</p>
pub fn get_reservation_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.reservation_arn
}
/// <p>The name that you assigned to the reservation when you purchased the offering.</p>
/// This field is required.
pub fn reservation_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.reservation_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name that you assigned to the reservation when you purchased the offering.</p>
pub fn set_reservation_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.reservation_name = input;
self
}
/// <p>The name that you assigned to the reservation when you purchased the offering.</p>
pub fn get_reservation_name(&self) -> &::std::option::Option<::std::string::String> {
&self.reservation_name
}
/// <p>The status of your reservation.</p>
/// This field is required.
pub fn reservation_state(mut self, input: crate::types::ReservationState) -> Self {
self.reservation_state = ::std::option::Option::Some(input);
self
}
/// <p>The status of your reservation.</p>
pub fn set_reservation_state(mut self, input: ::std::option::Option<crate::types::ReservationState>) -> Self {
self.reservation_state = input;
self
}
/// <p>The status of your reservation.</p>
pub fn get_reservation_state(&self) -> &::std::option::Option<crate::types::ReservationState> {
&self.reservation_state
}
/// <p>A definition of the amount of outbound bandwidth that you would be reserving if you purchase the offering. MediaConnect defines the values that make up the resourceSpecification in the offering.</p>
/// This field is required.
pub fn resource_specification(mut self, input: crate::types::ResourceSpecification) -> Self {
self.resource_specification = ::std::option::Option::Some(input);
self
}
/// <p>A definition of the amount of outbound bandwidth that you would be reserving if you purchase the offering. MediaConnect defines the values that make up the resourceSpecification in the offering.</p>
pub fn set_resource_specification(mut self, input: ::std::option::Option<crate::types::ResourceSpecification>) -> Self {
self.resource_specification = input;
self
}
/// <p>A definition of the amount of outbound bandwidth that you would be reserving if you purchase the offering. MediaConnect defines the values that make up the resourceSpecification in the offering.</p>
pub fn get_resource_specification(&self) -> &::std::option::Option<crate::types::ResourceSpecification> {
&self.resource_specification
}
/// <p>The day and time that the reservation becomes active. You set this value when you purchase the offering.</p>
/// This field is required.
pub fn start(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.start = ::std::option::Option::Some(input.into());
self
}
/// <p>The day and time that the reservation becomes active. You set this value when you purchase the offering.</p>
pub fn set_start(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.start = input;
self
}
/// <p>The day and time that the reservation becomes active. You set this value when you purchase the offering.</p>
pub fn get_start(&self) -> &::std::option::Option<::std::string::String> {
&self.start
}
/// Consumes the builder and constructs a [`Reservation`](crate::types::Reservation).
pub fn build(self) -> crate::types::Reservation {
crate::types::Reservation {
currency_code: self.currency_code,
duration: self.duration,
duration_units: self.duration_units,
end: self.end,
offering_arn: self.offering_arn,
offering_description: self.offering_description,
price_per_unit: self.price_per_unit,
price_units: self.price_units,
reservation_arn: self.reservation_arn,
reservation_name: self.reservation_name,
reservation_state: self.reservation_state,
resource_specification: self.resource_specification,
start: self.start,
}
}
}