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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The details for a capacity provider.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CapacityProvider {
    /// <p>The Amazon Resource Name (ARN) that identifies the capacity provider.</p>
    pub capacity_provider_arn: ::std::option::Option<::std::string::String>,
    /// <p>The name of the capacity provider.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The current status of the capacity provider. Only capacity providers in an <code>ACTIVE</code> state can be used in a cluster. When a capacity provider is successfully deleted, it has an <code>INACTIVE</code> status.</p>
    pub status: ::std::option::Option<crate::types::CapacityProviderStatus>,
    /// <p>The Auto Scaling group settings for the capacity provider.</p>
    pub auto_scaling_group_provider: ::std::option::Option<crate::types::AutoScalingGroupProvider>,
    /// <p>The update status of the capacity provider. The following are the possible states that is returned.</p>
    /// <dl>
    /// <dt>
    /// DELETE_IN_PROGRESS
    /// </dt>
    /// <dd>
    /// <p>The capacity provider is in the process of being deleted.</p>
    /// </dd>
    /// <dt>
    /// DELETE_COMPLETE
    /// </dt>
    /// <dd>
    /// <p>The capacity provider was successfully deleted and has an <code>INACTIVE</code> status.</p>
    /// </dd>
    /// <dt>
    /// DELETE_FAILED
    /// </dt>
    /// <dd>
    /// <p>The capacity provider can't be deleted. The update status reason provides further details about why the delete failed.</p>
    /// </dd>
    /// </dl>
    pub update_status: ::std::option::Option<crate::types::CapacityProviderUpdateStatus>,
    /// <p>The update status reason. This provides further details about the update status for the capacity provider.</p>
    pub update_status_reason: ::std::option::Option<::std::string::String>,
    /// <p>The metadata that you apply to the capacity provider to help you categorize and organize it. Each tag consists of a key and an optional value. You define both.</p>
    /// <p>The following basic restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>Maximum number of tags per resource - 50</p></li>
    /// <li>
    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
    /// <li>
    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
    /// <li>
    /// <p>Tag keys and values are case-sensitive.</p></li>
    /// <li>
    /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
    /// </ul>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CapacityProvider {
    /// <p>The Amazon Resource Name (ARN) that identifies the capacity provider.</p>
    pub fn capacity_provider_arn(&self) -> ::std::option::Option<&str> {
        self.capacity_provider_arn.as_deref()
    }
    /// <p>The name of the capacity provider.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The current status of the capacity provider. Only capacity providers in an <code>ACTIVE</code> state can be used in a cluster. When a capacity provider is successfully deleted, it has an <code>INACTIVE</code> status.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::CapacityProviderStatus> {
        self.status.as_ref()
    }
    /// <p>The Auto Scaling group settings for the capacity provider.</p>
    pub fn auto_scaling_group_provider(&self) -> ::std::option::Option<&crate::types::AutoScalingGroupProvider> {
        self.auto_scaling_group_provider.as_ref()
    }
    /// <p>The update status of the capacity provider. The following are the possible states that is returned.</p>
    /// <dl>
    /// <dt>
    /// DELETE_IN_PROGRESS
    /// </dt>
    /// <dd>
    /// <p>The capacity provider is in the process of being deleted.</p>
    /// </dd>
    /// <dt>
    /// DELETE_COMPLETE
    /// </dt>
    /// <dd>
    /// <p>The capacity provider was successfully deleted and has an <code>INACTIVE</code> status.</p>
    /// </dd>
    /// <dt>
    /// DELETE_FAILED
    /// </dt>
    /// <dd>
    /// <p>The capacity provider can't be deleted. The update status reason provides further details about why the delete failed.</p>
    /// </dd>
    /// </dl>
    pub fn update_status(&self) -> ::std::option::Option<&crate::types::CapacityProviderUpdateStatus> {
        self.update_status.as_ref()
    }
    /// <p>The update status reason. This provides further details about the update status for the capacity provider.</p>
    pub fn update_status_reason(&self) -> ::std::option::Option<&str> {
        self.update_status_reason.as_deref()
    }
    /// <p>The metadata that you apply to the capacity provider to help you categorize and organize it. Each tag consists of a key and an optional value. You define both.</p>
    /// <p>The following basic restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>Maximum number of tags per resource - 50</p></li>
    /// <li>
    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
    /// <li>
    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
    /// <li>
    /// <p>Tag keys and values are case-sensitive.</p></li>
    /// <li>
    /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
    /// </ul>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
}
impl CapacityProvider {
    /// Creates a new builder-style object to manufacture [`CapacityProvider`](crate::types::CapacityProvider).
    pub fn builder() -> crate::types::builders::CapacityProviderBuilder {
        crate::types::builders::CapacityProviderBuilder::default()
    }
}

/// A builder for [`CapacityProvider`](crate::types::CapacityProvider).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CapacityProviderBuilder {
    pub(crate) capacity_provider_arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::CapacityProviderStatus>,
    pub(crate) auto_scaling_group_provider: ::std::option::Option<crate::types::AutoScalingGroupProvider>,
    pub(crate) update_status: ::std::option::Option<crate::types::CapacityProviderUpdateStatus>,
    pub(crate) update_status_reason: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CapacityProviderBuilder {
    /// <p>The Amazon Resource Name (ARN) that identifies the capacity provider.</p>
    pub fn capacity_provider_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.capacity_provider_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) that identifies the capacity provider.</p>
    pub fn set_capacity_provider_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.capacity_provider_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) that identifies the capacity provider.</p>
    pub fn get_capacity_provider_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.capacity_provider_arn
    }
    /// <p>The name of the capacity provider.</p>
    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 capacity provider.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the capacity provider.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The current status of the capacity provider. Only capacity providers in an <code>ACTIVE</code> state can be used in a cluster. When a capacity provider is successfully deleted, it has an <code>INACTIVE</code> status.</p>
    pub fn status(mut self, input: crate::types::CapacityProviderStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current status of the capacity provider. Only capacity providers in an <code>ACTIVE</code> state can be used in a cluster. When a capacity provider is successfully deleted, it has an <code>INACTIVE</code> status.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::CapacityProviderStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The current status of the capacity provider. Only capacity providers in an <code>ACTIVE</code> state can be used in a cluster. When a capacity provider is successfully deleted, it has an <code>INACTIVE</code> status.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::CapacityProviderStatus> {
        &self.status
    }
    /// <p>The Auto Scaling group settings for the capacity provider.</p>
    pub fn auto_scaling_group_provider(mut self, input: crate::types::AutoScalingGroupProvider) -> Self {
        self.auto_scaling_group_provider = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Auto Scaling group settings for the capacity provider.</p>
    pub fn set_auto_scaling_group_provider(mut self, input: ::std::option::Option<crate::types::AutoScalingGroupProvider>) -> Self {
        self.auto_scaling_group_provider = input;
        self
    }
    /// <p>The Auto Scaling group settings for the capacity provider.</p>
    pub fn get_auto_scaling_group_provider(&self) -> &::std::option::Option<crate::types::AutoScalingGroupProvider> {
        &self.auto_scaling_group_provider
    }
    /// <p>The update status of the capacity provider. The following are the possible states that is returned.</p>
    /// <dl>
    /// <dt>
    /// DELETE_IN_PROGRESS
    /// </dt>
    /// <dd>
    /// <p>The capacity provider is in the process of being deleted.</p>
    /// </dd>
    /// <dt>
    /// DELETE_COMPLETE
    /// </dt>
    /// <dd>
    /// <p>The capacity provider was successfully deleted and has an <code>INACTIVE</code> status.</p>
    /// </dd>
    /// <dt>
    /// DELETE_FAILED
    /// </dt>
    /// <dd>
    /// <p>The capacity provider can't be deleted. The update status reason provides further details about why the delete failed.</p>
    /// </dd>
    /// </dl>
    pub fn update_status(mut self, input: crate::types::CapacityProviderUpdateStatus) -> Self {
        self.update_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The update status of the capacity provider. The following are the possible states that is returned.</p>
    /// <dl>
    /// <dt>
    /// DELETE_IN_PROGRESS
    /// </dt>
    /// <dd>
    /// <p>The capacity provider is in the process of being deleted.</p>
    /// </dd>
    /// <dt>
    /// DELETE_COMPLETE
    /// </dt>
    /// <dd>
    /// <p>The capacity provider was successfully deleted and has an <code>INACTIVE</code> status.</p>
    /// </dd>
    /// <dt>
    /// DELETE_FAILED
    /// </dt>
    /// <dd>
    /// <p>The capacity provider can't be deleted. The update status reason provides further details about why the delete failed.</p>
    /// </dd>
    /// </dl>
    pub fn set_update_status(mut self, input: ::std::option::Option<crate::types::CapacityProviderUpdateStatus>) -> Self {
        self.update_status = input;
        self
    }
    /// <p>The update status of the capacity provider. The following are the possible states that is returned.</p>
    /// <dl>
    /// <dt>
    /// DELETE_IN_PROGRESS
    /// </dt>
    /// <dd>
    /// <p>The capacity provider is in the process of being deleted.</p>
    /// </dd>
    /// <dt>
    /// DELETE_COMPLETE
    /// </dt>
    /// <dd>
    /// <p>The capacity provider was successfully deleted and has an <code>INACTIVE</code> status.</p>
    /// </dd>
    /// <dt>
    /// DELETE_FAILED
    /// </dt>
    /// <dd>
    /// <p>The capacity provider can't be deleted. The update status reason provides further details about why the delete failed.</p>
    /// </dd>
    /// </dl>
    pub fn get_update_status(&self) -> &::std::option::Option<crate::types::CapacityProviderUpdateStatus> {
        &self.update_status
    }
    /// <p>The update status reason. This provides further details about the update status for the capacity provider.</p>
    pub fn update_status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.update_status_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The update status reason. This provides further details about the update status for the capacity provider.</p>
    pub fn set_update_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.update_status_reason = input;
        self
    }
    /// <p>The update status reason. This provides further details about the update status for the capacity provider.</p>
    pub fn get_update_status_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.update_status_reason
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The metadata that you apply to the capacity provider to help you categorize and organize it. Each tag consists of a key and an optional value. You define both.</p>
    /// <p>The following basic restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>Maximum number of tags per resource - 50</p></li>
    /// <li>
    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
    /// <li>
    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
    /// <li>
    /// <p>Tag keys and values are case-sensitive.</p></li>
    /// <li>
    /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
    /// </ul>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>The metadata that you apply to the capacity provider to help you categorize and organize it. Each tag consists of a key and an optional value. You define both.</p>
    /// <p>The following basic restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>Maximum number of tags per resource - 50</p></li>
    /// <li>
    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
    /// <li>
    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
    /// <li>
    /// <p>Tag keys and values are case-sensitive.</p></li>
    /// <li>
    /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
    /// </ul>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The metadata that you apply to the capacity provider to help you categorize and organize it. Each tag consists of a key and an optional value. You define both.</p>
    /// <p>The following basic restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>Maximum number of tags per resource - 50</p></li>
    /// <li>
    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
    /// <li>
    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
    /// <li>
    /// <p>Tag keys and values are case-sensitive.</p></li>
    /// <li>
    /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
    /// </ul>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CapacityProvider`](crate::types::CapacityProvider).
    pub fn build(self) -> crate::types::CapacityProvider {
        crate::types::CapacityProvider {
            capacity_provider_arn: self.capacity_provider_arn,
            name: self.name,
            status: self.status,
            auto_scaling_group_provider: self.auto_scaling_group_provider,
            update_status: self.update_status,
            update_status_reason: self.update_status_reason,
            tags: self.tags,
        }
    }
}