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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>This data type is used as a response element for the <code>DescribeDBSubnetGroups</code> operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Subnet {
/// <p>The identifier of the subnet.</p>
pub subnet_identifier: ::std::option::Option<::std::string::String>,
/// <p>Contains Availability Zone information.</p>
/// <p>This data type is used as an element in the <code>OrderableDBInstanceOption</code> data type.</p>
pub subnet_availability_zone: ::std::option::Option<crate::types::AvailabilityZone>,
/// <p>If the subnet is associated with an Outpost, this value specifies the Outpost.</p>
/// <p>For more information about RDS on Outposts, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html">Amazon RDS on Amazon Web Services Outposts</a> in the <i>Amazon RDS User Guide.</i></p>
pub subnet_outpost: ::std::option::Option<crate::types::Outpost>,
/// <p>The status of the subnet.</p>
pub subnet_status: ::std::option::Option<::std::string::String>,
}
impl Subnet {
/// <p>The identifier of the subnet.</p>
pub fn subnet_identifier(&self) -> ::std::option::Option<&str> {
self.subnet_identifier.as_deref()
}
/// <p>Contains Availability Zone information.</p>
/// <p>This data type is used as an element in the <code>OrderableDBInstanceOption</code> data type.</p>
pub fn subnet_availability_zone(&self) -> ::std::option::Option<&crate::types::AvailabilityZone> {
self.subnet_availability_zone.as_ref()
}
/// <p>If the subnet is associated with an Outpost, this value specifies the Outpost.</p>
/// <p>For more information about RDS on Outposts, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html">Amazon RDS on Amazon Web Services Outposts</a> in the <i>Amazon RDS User Guide.</i></p>
pub fn subnet_outpost(&self) -> ::std::option::Option<&crate::types::Outpost> {
self.subnet_outpost.as_ref()
}
/// <p>The status of the subnet.</p>
pub fn subnet_status(&self) -> ::std::option::Option<&str> {
self.subnet_status.as_deref()
}
}
impl Subnet {
/// Creates a new builder-style object to manufacture [`Subnet`](crate::types::Subnet).
pub fn builder() -> crate::types::builders::SubnetBuilder {
crate::types::builders::SubnetBuilder::default()
}
}
/// A builder for [`Subnet`](crate::types::Subnet).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SubnetBuilder {
pub(crate) subnet_identifier: ::std::option::Option<::std::string::String>,
pub(crate) subnet_availability_zone: ::std::option::Option<crate::types::AvailabilityZone>,
pub(crate) subnet_outpost: ::std::option::Option<crate::types::Outpost>,
pub(crate) subnet_status: ::std::option::Option<::std::string::String>,
}
impl SubnetBuilder {
/// <p>The identifier of the subnet.</p>
pub fn subnet_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.subnet_identifier = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the subnet.</p>
pub fn set_subnet_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.subnet_identifier = input;
self
}
/// <p>The identifier of the subnet.</p>
pub fn get_subnet_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.subnet_identifier
}
/// <p>Contains Availability Zone information.</p>
/// <p>This data type is used as an element in the <code>OrderableDBInstanceOption</code> data type.</p>
pub fn subnet_availability_zone(mut self, input: crate::types::AvailabilityZone) -> Self {
self.subnet_availability_zone = ::std::option::Option::Some(input);
self
}
/// <p>Contains Availability Zone information.</p>
/// <p>This data type is used as an element in the <code>OrderableDBInstanceOption</code> data type.</p>
pub fn set_subnet_availability_zone(mut self, input: ::std::option::Option<crate::types::AvailabilityZone>) -> Self {
self.subnet_availability_zone = input;
self
}
/// <p>Contains Availability Zone information.</p>
/// <p>This data type is used as an element in the <code>OrderableDBInstanceOption</code> data type.</p>
pub fn get_subnet_availability_zone(&self) -> &::std::option::Option<crate::types::AvailabilityZone> {
&self.subnet_availability_zone
}
/// <p>If the subnet is associated with an Outpost, this value specifies the Outpost.</p>
/// <p>For more information about RDS on Outposts, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html">Amazon RDS on Amazon Web Services Outposts</a> in the <i>Amazon RDS User Guide.</i></p>
pub fn subnet_outpost(mut self, input: crate::types::Outpost) -> Self {
self.subnet_outpost = ::std::option::Option::Some(input);
self
}
/// <p>If the subnet is associated with an Outpost, this value specifies the Outpost.</p>
/// <p>For more information about RDS on Outposts, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html">Amazon RDS on Amazon Web Services Outposts</a> in the <i>Amazon RDS User Guide.</i></p>
pub fn set_subnet_outpost(mut self, input: ::std::option::Option<crate::types::Outpost>) -> Self {
self.subnet_outpost = input;
self
}
/// <p>If the subnet is associated with an Outpost, this value specifies the Outpost.</p>
/// <p>For more information about RDS on Outposts, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html">Amazon RDS on Amazon Web Services Outposts</a> in the <i>Amazon RDS User Guide.</i></p>
pub fn get_subnet_outpost(&self) -> &::std::option::Option<crate::types::Outpost> {
&self.subnet_outpost
}
/// <p>The status of the subnet.</p>
pub fn subnet_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.subnet_status = ::std::option::Option::Some(input.into());
self
}
/// <p>The status of the subnet.</p>
pub fn set_subnet_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.subnet_status = input;
self
}
/// <p>The status of the subnet.</p>
pub fn get_subnet_status(&self) -> &::std::option::Option<::std::string::String> {
&self.subnet_status
}
/// Consumes the builder and constructs a [`Subnet`](crate::types::Subnet).
pub fn build(self) -> crate::types::Subnet {
crate::types::Subnet {
subnet_identifier: self.subnet_identifier,
subnet_availability_zone: self.subnet_availability_zone,
subnet_outpost: self.subnet_outpost,
subnet_status: self.subnet_status,
}
}
}