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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Contains the details about the available and supported bandwidths.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Bandwidths {
/// <p>The list of currently available bandwidths.</p>
pub available: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>The list of all bandwidths that this environment plans to support</p>
pub supported: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl Bandwidths {
/// <p>The list of currently available bandwidths.</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 `.available.is_none()`.
pub fn available(&self) -> &[::std::string::String] {
self.available.as_deref().unwrap_or_default()
}
/// <p>The list of all bandwidths that this environment plans to support</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 `.supported.is_none()`.
pub fn supported(&self) -> &[::std::string::String] {
self.supported.as_deref().unwrap_or_default()
}
}
impl Bandwidths {
/// Creates a new builder-style object to manufacture [`Bandwidths`](crate::types::Bandwidths).
pub fn builder() -> crate::types::builders::BandwidthsBuilder {
crate::types::builders::BandwidthsBuilder::default()
}
}
/// A builder for [`Bandwidths`](crate::types::Bandwidths).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BandwidthsBuilder {
pub(crate) available: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) supported: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl BandwidthsBuilder {
/// Appends an item to `available`.
///
/// To override the contents of this collection use [`set_available`](Self::set_available).
///
/// <p>The list of currently available bandwidths.</p>
pub fn available(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.available.unwrap_or_default();
v.push(input.into());
self.available = ::std::option::Option::Some(v);
self
}
/// <p>The list of currently available bandwidths.</p>
pub fn set_available(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.available = input;
self
}
/// <p>The list of currently available bandwidths.</p>
pub fn get_available(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.available
}
/// Appends an item to `supported`.
///
/// To override the contents of this collection use [`set_supported`](Self::set_supported).
///
/// <p>The list of all bandwidths that this environment plans to support</p>
pub fn supported(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.supported.unwrap_or_default();
v.push(input.into());
self.supported = ::std::option::Option::Some(v);
self
}
/// <p>The list of all bandwidths that this environment plans to support</p>
pub fn set_supported(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.supported = input;
self
}
/// <p>The list of all bandwidths that this environment plans to support</p>
pub fn get_supported(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.supported
}
/// Consumes the builder and constructs a [`Bandwidths`](crate::types::Bandwidths).
pub fn build(self) -> crate::types::Bandwidths {
crate::types::Bandwidths {
available: self.available,
supported: self.supported,
}
}
}