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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes a network ACL.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct NetworkAcl {
    /// <p>Any associations between the network ACL and one or more subnets</p>
    pub associations: ::std::option::Option<::std::vec::Vec<crate::types::NetworkAclAssociation>>,
    /// <p>The entries (rules) in the network ACL.</p>
    pub entries: ::std::option::Option<::std::vec::Vec<crate::types::NetworkAclEntry>>,
    /// <p>Indicates whether this is the default network ACL for the VPC.</p>
    pub is_default: ::std::option::Option<bool>,
    /// <p>The ID of the network ACL.</p>
    pub network_acl_id: ::std::option::Option<::std::string::String>,
    /// <p>Any tags assigned to the network ACL.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    /// <p>The ID of the VPC for the network ACL.</p>
    pub vpc_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the network ACL.</p>
    pub owner_id: ::std::option::Option<::std::string::String>,
}
impl NetworkAcl {
    /// <p>Any associations between the network ACL and one or more subnets</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 `.associations.is_none()`.
    pub fn associations(&self) -> &[crate::types::NetworkAclAssociation] {
        self.associations.as_deref().unwrap_or_default()
    }
    /// <p>The entries (rules) in the network ACL.</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 `.entries.is_none()`.
    pub fn entries(&self) -> &[crate::types::NetworkAclEntry] {
        self.entries.as_deref().unwrap_or_default()
    }
    /// <p>Indicates whether this is the default network ACL for the VPC.</p>
    pub fn is_default(&self) -> ::std::option::Option<bool> {
        self.is_default
    }
    /// <p>The ID of the network ACL.</p>
    pub fn network_acl_id(&self) -> ::std::option::Option<&str> {
        self.network_acl_id.as_deref()
    }
    /// <p>Any tags assigned to the network ACL.</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 `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
    /// <p>The ID of the VPC for the network ACL.</p>
    pub fn vpc_id(&self) -> ::std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the network ACL.</p>
    pub fn owner_id(&self) -> ::std::option::Option<&str> {
        self.owner_id.as_deref()
    }
}
impl NetworkAcl {
    /// Creates a new builder-style object to manufacture [`NetworkAcl`](crate::types::NetworkAcl).
    pub fn builder() -> crate::types::builders::NetworkAclBuilder {
        crate::types::builders::NetworkAclBuilder::default()
    }
}

/// A builder for [`NetworkAcl`](crate::types::NetworkAcl).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct NetworkAclBuilder {
    pub(crate) associations: ::std::option::Option<::std::vec::Vec<crate::types::NetworkAclAssociation>>,
    pub(crate) entries: ::std::option::Option<::std::vec::Vec<crate::types::NetworkAclEntry>>,
    pub(crate) is_default: ::std::option::Option<bool>,
    pub(crate) network_acl_id: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    pub(crate) vpc_id: ::std::option::Option<::std::string::String>,
    pub(crate) owner_id: ::std::option::Option<::std::string::String>,
}
impl NetworkAclBuilder {
    /// Appends an item to `associations`.
    ///
    /// To override the contents of this collection use [`set_associations`](Self::set_associations).
    ///
    /// <p>Any associations between the network ACL and one or more subnets</p>
    pub fn associations(mut self, input: crate::types::NetworkAclAssociation) -> Self {
        let mut v = self.associations.unwrap_or_default();
        v.push(input);
        self.associations = ::std::option::Option::Some(v);
        self
    }
    /// <p>Any associations between the network ACL and one or more subnets</p>
    pub fn set_associations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::NetworkAclAssociation>>) -> Self {
        self.associations = input;
        self
    }
    /// <p>Any associations between the network ACL and one or more subnets</p>
    pub fn get_associations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::NetworkAclAssociation>> {
        &self.associations
    }
    /// Appends an item to `entries`.
    ///
    /// To override the contents of this collection use [`set_entries`](Self::set_entries).
    ///
    /// <p>The entries (rules) in the network ACL.</p>
    pub fn entries(mut self, input: crate::types::NetworkAclEntry) -> Self {
        let mut v = self.entries.unwrap_or_default();
        v.push(input);
        self.entries = ::std::option::Option::Some(v);
        self
    }
    /// <p>The entries (rules) in the network ACL.</p>
    pub fn set_entries(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::NetworkAclEntry>>) -> Self {
        self.entries = input;
        self
    }
    /// <p>The entries (rules) in the network ACL.</p>
    pub fn get_entries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::NetworkAclEntry>> {
        &self.entries
    }
    /// <p>Indicates whether this is the default network ACL for the VPC.</p>
    pub fn is_default(mut self, input: bool) -> Self {
        self.is_default = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether this is the default network ACL for the VPC.</p>
    pub fn set_is_default(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_default = input;
        self
    }
    /// <p>Indicates whether this is the default network ACL for the VPC.</p>
    pub fn get_is_default(&self) -> &::std::option::Option<bool> {
        &self.is_default
    }
    /// <p>The ID of the network ACL.</p>
    pub fn network_acl_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.network_acl_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the network ACL.</p>
    pub fn set_network_acl_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.network_acl_id = input;
        self
    }
    /// <p>The ID of the network ACL.</p>
    pub fn get_network_acl_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.network_acl_id
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Any tags assigned to the network ACL.</p>
    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>Any tags assigned to the network ACL.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>Any tags assigned to the network ACL.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// <p>The ID of the VPC for the network ACL.</p>
    pub fn vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.vpc_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the VPC for the network ACL.</p>
    pub fn set_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.vpc_id = input;
        self
    }
    /// <p>The ID of the VPC for the network ACL.</p>
    pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.vpc_id
    }
    /// <p>The ID of the Amazon Web Services account that owns the network ACL.</p>
    pub fn owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.owner_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Amazon Web Services account that owns the network ACL.</p>
    pub fn set_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner_id = input;
        self
    }
    /// <p>The ID of the Amazon Web Services account that owns the network ACL.</p>
    pub fn get_owner_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner_id
    }
    /// Consumes the builder and constructs a [`NetworkAcl`](crate::types::NetworkAcl).
    pub fn build(self) -> crate::types::NetworkAcl {
        crate::types::NetworkAcl {
            associations: self.associations,
            entries: self.entries,
            is_default: self.is_default,
            network_acl_id: self.network_acl_id,
            tags: self.tags,
            vpc_id: self.vpc_id,
            owner_id: self.owner_id,
        }
    }
}