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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Provides information about your Amazon Web Services Outposts subscriptions.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Subscription {
/// <p>The ID of the subscription that appears on the Amazon Web Services Billing Center console.</p>
pub subscription_id: ::std::option::Option<::std::string::String>,
/// <p>The type of subscription which can be one of the following:</p>
/// <ul>
/// <li>
/// <p><b>ORIGINAL</b> - The first order on the Amazon Web Services Outposts.</p></li>
/// <li>
/// <p><b>RENEWAL</b> - Renewal requests, both month to month and longer term.</p></li>
/// <li>
/// <p><b>CAPACITY_INCREASE</b> - Capacity scaling orders.</p></li>
/// </ul>
pub subscription_type: ::std::option::Option<crate::types::SubscriptionType>,
/// <p>The status of subscription which can be one of the following:</p>
/// <ul>
/// <li>
/// <p><b>INACTIVE</b> - Subscription requests that are inactive.</p></li>
/// <li>
/// <p><b>ACTIVE</b> - Subscription requests that are in progress and have an end date in the future.</p></li>
/// <li>
/// <p><b>PENDING</b> - Subscription has been created but billing has not yet commenced because the subscription begin date has not been reached.</p></li>
/// <li>
/// <p><b>CANCELLED</b> - Subscription requests that are cancelled.</p></li>
/// </ul>
pub subscription_status: ::std::option::Option<crate::types::SubscriptionStatus>,
/// <p>The order ID for your subscription.</p>
pub order_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>The date your subscription starts.</p>
pub begin_date: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The date your subscription ends.</p>
pub end_date: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The amount you are billed each month in the subscription period.</p>
pub monthly_recurring_price: ::std::option::Option<f64>,
/// <p>The amount billed when the subscription is created. This is a one-time charge.</p>
pub upfront_price: ::std::option::Option<f64>,
}
impl Subscription {
/// <p>The ID of the subscription that appears on the Amazon Web Services Billing Center console.</p>
pub fn subscription_id(&self) -> ::std::option::Option<&str> {
self.subscription_id.as_deref()
}
/// <p>The type of subscription which can be one of the following:</p>
/// <ul>
/// <li>
/// <p><b>ORIGINAL</b> - The first order on the Amazon Web Services Outposts.</p></li>
/// <li>
/// <p><b>RENEWAL</b> - Renewal requests, both month to month and longer term.</p></li>
/// <li>
/// <p><b>CAPACITY_INCREASE</b> - Capacity scaling orders.</p></li>
/// </ul>
pub fn subscription_type(&self) -> ::std::option::Option<&crate::types::SubscriptionType> {
self.subscription_type.as_ref()
}
/// <p>The status of subscription which can be one of the following:</p>
/// <ul>
/// <li>
/// <p><b>INACTIVE</b> - Subscription requests that are inactive.</p></li>
/// <li>
/// <p><b>ACTIVE</b> - Subscription requests that are in progress and have an end date in the future.</p></li>
/// <li>
/// <p><b>PENDING</b> - Subscription has been created but billing has not yet commenced because the subscription begin date has not been reached.</p></li>
/// <li>
/// <p><b>CANCELLED</b> - Subscription requests that are cancelled.</p></li>
/// </ul>
pub fn subscription_status(&self) -> ::std::option::Option<&crate::types::SubscriptionStatus> {
self.subscription_status.as_ref()
}
/// <p>The order ID for your subscription.</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 `.order_ids.is_none()`.
pub fn order_ids(&self) -> &[::std::string::String] {
self.order_ids.as_deref().unwrap_or_default()
}
/// <p>The date your subscription starts.</p>
pub fn begin_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.begin_date.as_ref()
}
/// <p>The date your subscription ends.</p>
pub fn end_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.end_date.as_ref()
}
/// <p>The amount you are billed each month in the subscription period.</p>
pub fn monthly_recurring_price(&self) -> ::std::option::Option<f64> {
self.monthly_recurring_price
}
/// <p>The amount billed when the subscription is created. This is a one-time charge.</p>
pub fn upfront_price(&self) -> ::std::option::Option<f64> {
self.upfront_price
}
}
impl Subscription {
/// Creates a new builder-style object to manufacture [`Subscription`](crate::types::Subscription).
pub fn builder() -> crate::types::builders::SubscriptionBuilder {
crate::types::builders::SubscriptionBuilder::default()
}
}
/// A builder for [`Subscription`](crate::types::Subscription).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SubscriptionBuilder {
pub(crate) subscription_id: ::std::option::Option<::std::string::String>,
pub(crate) subscription_type: ::std::option::Option<crate::types::SubscriptionType>,
pub(crate) subscription_status: ::std::option::Option<crate::types::SubscriptionStatus>,
pub(crate) order_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) begin_date: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) end_date: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) monthly_recurring_price: ::std::option::Option<f64>,
pub(crate) upfront_price: ::std::option::Option<f64>,
}
impl SubscriptionBuilder {
/// <p>The ID of the subscription that appears on the Amazon Web Services Billing Center console.</p>
pub fn subscription_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.subscription_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the subscription that appears on the Amazon Web Services Billing Center console.</p>
pub fn set_subscription_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.subscription_id = input;
self
}
/// <p>The ID of the subscription that appears on the Amazon Web Services Billing Center console.</p>
pub fn get_subscription_id(&self) -> &::std::option::Option<::std::string::String> {
&self.subscription_id
}
/// <p>The type of subscription which can be one of the following:</p>
/// <ul>
/// <li>
/// <p><b>ORIGINAL</b> - The first order on the Amazon Web Services Outposts.</p></li>
/// <li>
/// <p><b>RENEWAL</b> - Renewal requests, both month to month and longer term.</p></li>
/// <li>
/// <p><b>CAPACITY_INCREASE</b> - Capacity scaling orders.</p></li>
/// </ul>
pub fn subscription_type(mut self, input: crate::types::SubscriptionType) -> Self {
self.subscription_type = ::std::option::Option::Some(input);
self
}
/// <p>The type of subscription which can be one of the following:</p>
/// <ul>
/// <li>
/// <p><b>ORIGINAL</b> - The first order on the Amazon Web Services Outposts.</p></li>
/// <li>
/// <p><b>RENEWAL</b> - Renewal requests, both month to month and longer term.</p></li>
/// <li>
/// <p><b>CAPACITY_INCREASE</b> - Capacity scaling orders.</p></li>
/// </ul>
pub fn set_subscription_type(mut self, input: ::std::option::Option<crate::types::SubscriptionType>) -> Self {
self.subscription_type = input;
self
}
/// <p>The type of subscription which can be one of the following:</p>
/// <ul>
/// <li>
/// <p><b>ORIGINAL</b> - The first order on the Amazon Web Services Outposts.</p></li>
/// <li>
/// <p><b>RENEWAL</b> - Renewal requests, both month to month and longer term.</p></li>
/// <li>
/// <p><b>CAPACITY_INCREASE</b> - Capacity scaling orders.</p></li>
/// </ul>
pub fn get_subscription_type(&self) -> &::std::option::Option<crate::types::SubscriptionType> {
&self.subscription_type
}
/// <p>The status of subscription which can be one of the following:</p>
/// <ul>
/// <li>
/// <p><b>INACTIVE</b> - Subscription requests that are inactive.</p></li>
/// <li>
/// <p><b>ACTIVE</b> - Subscription requests that are in progress and have an end date in the future.</p></li>
/// <li>
/// <p><b>PENDING</b> - Subscription has been created but billing has not yet commenced because the subscription begin date has not been reached.</p></li>
/// <li>
/// <p><b>CANCELLED</b> - Subscription requests that are cancelled.</p></li>
/// </ul>
pub fn subscription_status(mut self, input: crate::types::SubscriptionStatus) -> Self {
self.subscription_status = ::std::option::Option::Some(input);
self
}
/// <p>The status of subscription which can be one of the following:</p>
/// <ul>
/// <li>
/// <p><b>INACTIVE</b> - Subscription requests that are inactive.</p></li>
/// <li>
/// <p><b>ACTIVE</b> - Subscription requests that are in progress and have an end date in the future.</p></li>
/// <li>
/// <p><b>PENDING</b> - Subscription has been created but billing has not yet commenced because the subscription begin date has not been reached.</p></li>
/// <li>
/// <p><b>CANCELLED</b> - Subscription requests that are cancelled.</p></li>
/// </ul>
pub fn set_subscription_status(mut self, input: ::std::option::Option<crate::types::SubscriptionStatus>) -> Self {
self.subscription_status = input;
self
}
/// <p>The status of subscription which can be one of the following:</p>
/// <ul>
/// <li>
/// <p><b>INACTIVE</b> - Subscription requests that are inactive.</p></li>
/// <li>
/// <p><b>ACTIVE</b> - Subscription requests that are in progress and have an end date in the future.</p></li>
/// <li>
/// <p><b>PENDING</b> - Subscription has been created but billing has not yet commenced because the subscription begin date has not been reached.</p></li>
/// <li>
/// <p><b>CANCELLED</b> - Subscription requests that are cancelled.</p></li>
/// </ul>
pub fn get_subscription_status(&self) -> &::std::option::Option<crate::types::SubscriptionStatus> {
&self.subscription_status
}
/// Appends an item to `order_ids`.
///
/// To override the contents of this collection use [`set_order_ids`](Self::set_order_ids).
///
/// <p>The order ID for your subscription.</p>
pub fn order_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.order_ids.unwrap_or_default();
v.push(input.into());
self.order_ids = ::std::option::Option::Some(v);
self
}
/// <p>The order ID for your subscription.</p>
pub fn set_order_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.order_ids = input;
self
}
/// <p>The order ID for your subscription.</p>
pub fn get_order_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.order_ids
}
/// <p>The date your subscription starts.</p>
pub fn begin_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.begin_date = ::std::option::Option::Some(input);
self
}
/// <p>The date your subscription starts.</p>
pub fn set_begin_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.begin_date = input;
self
}
/// <p>The date your subscription starts.</p>
pub fn get_begin_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.begin_date
}
/// <p>The date your subscription ends.</p>
pub fn end_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.end_date = ::std::option::Option::Some(input);
self
}
/// <p>The date your subscription ends.</p>
pub fn set_end_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.end_date = input;
self
}
/// <p>The date your subscription ends.</p>
pub fn get_end_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.end_date
}
/// <p>The amount you are billed each month in the subscription period.</p>
pub fn monthly_recurring_price(mut self, input: f64) -> Self {
self.monthly_recurring_price = ::std::option::Option::Some(input);
self
}
/// <p>The amount you are billed each month in the subscription period.</p>
pub fn set_monthly_recurring_price(mut self, input: ::std::option::Option<f64>) -> Self {
self.monthly_recurring_price = input;
self
}
/// <p>The amount you are billed each month in the subscription period.</p>
pub fn get_monthly_recurring_price(&self) -> &::std::option::Option<f64> {
&self.monthly_recurring_price
}
/// <p>The amount billed when the subscription is created. This is a one-time charge.</p>
pub fn upfront_price(mut self, input: f64) -> Self {
self.upfront_price = ::std::option::Option::Some(input);
self
}
/// <p>The amount billed when the subscription is created. This is a one-time charge.</p>
pub fn set_upfront_price(mut self, input: ::std::option::Option<f64>) -> Self {
self.upfront_price = input;
self
}
/// <p>The amount billed when the subscription is created. This is a one-time charge.</p>
pub fn get_upfront_price(&self) -> &::std::option::Option<f64> {
&self.upfront_price
}
/// Consumes the builder and constructs a [`Subscription`](crate::types::Subscription).
pub fn build(self) -> crate::types::Subscription {
crate::types::Subscription {
subscription_id: self.subscription_id,
subscription_type: self.subscription_type,
subscription_status: self.subscription_status,
order_ids: self.order_ids,
begin_date: self.begin_date,
end_date: self.end_date,
monthly_recurring_price: self.monthly_recurring_price,
upfront_price: self.upfront_price,
}
}
}