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

/// An Input Security Group
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct InputSecurityGroup {
    /// Unique ARN of Input Security Group
    #[doc(hidden)]
    pub arn: ::std::option::Option<::std::string::String>,
    /// The Id of the Input Security Group
    #[doc(hidden)]
    pub id: ::std::option::Option<::std::string::String>,
    /// The list of inputs currently using this Input Security Group.
    #[doc(hidden)]
    pub inputs: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// The current state of the Input Security Group.
    #[doc(hidden)]
    pub state: ::std::option::Option<crate::types::InputSecurityGroupState>,
    /// A collection of key-value pairs.
    #[doc(hidden)]
    pub tags: ::std::option::Option<
        ::std::collections::HashMap<::std::string::String, ::std::string::String>,
    >,
    /// Whitelist rules and their sync status
    #[doc(hidden)]
    pub whitelist_rules: ::std::option::Option<::std::vec::Vec<crate::types::InputWhitelistRule>>,
}
impl InputSecurityGroup {
    /// Unique ARN of Input Security Group
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// The Id of the Input Security Group
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// The list of inputs currently using this Input Security Group.
    pub fn inputs(&self) -> ::std::option::Option<&[::std::string::String]> {
        self.inputs.as_deref()
    }
    /// The current state of the Input Security Group.
    pub fn state(&self) -> ::std::option::Option<&crate::types::InputSecurityGroupState> {
        self.state.as_ref()
    }
    /// A collection of key-value pairs.
    pub fn tags(
        &self,
    ) -> ::std::option::Option<
        &::std::collections::HashMap<::std::string::String, ::std::string::String>,
    > {
        self.tags.as_ref()
    }
    /// Whitelist rules and their sync status
    pub fn whitelist_rules(&self) -> ::std::option::Option<&[crate::types::InputWhitelistRule]> {
        self.whitelist_rules.as_deref()
    }
}
impl InputSecurityGroup {
    /// Creates a new builder-style object to manufacture [`InputSecurityGroup`](crate::types::InputSecurityGroup).
    pub fn builder() -> crate::types::builders::InputSecurityGroupBuilder {
        crate::types::builders::InputSecurityGroupBuilder::default()
    }
}

/// A builder for [`InputSecurityGroup`](crate::types::InputSecurityGroup).
#[non_exhaustive]
#[derive(
    ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug,
)]
pub struct InputSecurityGroupBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) inputs: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) state: ::std::option::Option<crate::types::InputSecurityGroupState>,
    pub(crate) tags: ::std::option::Option<
        ::std::collections::HashMap<::std::string::String, ::std::string::String>,
    >,
    pub(crate) whitelist_rules:
        ::std::option::Option<::std::vec::Vec<crate::types::InputWhitelistRule>>,
}
impl InputSecurityGroupBuilder {
    /// Unique ARN of Input Security Group
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// Unique ARN of Input Security Group
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// The Id of the Input Security Group
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// The Id of the Input Security Group
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// Appends an item to `inputs`.
    ///
    /// To override the contents of this collection use [`set_inputs`](Self::set_inputs).
    ///
    /// The list of inputs currently using this Input Security Group.
    pub fn inputs(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.inputs.unwrap_or_default();
        v.push(input.into());
        self.inputs = ::std::option::Option::Some(v);
        self
    }
    /// The list of inputs currently using this Input Security Group.
    pub fn set_inputs(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    ) -> Self {
        self.inputs = input;
        self
    }
    /// The current state of the Input Security Group.
    pub fn state(mut self, input: crate::types::InputSecurityGroupState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// The current state of the Input Security Group.
    pub fn set_state(
        mut self,
        input: ::std::option::Option<crate::types::InputSecurityGroupState>,
    ) -> Self {
        self.state = input;
        self
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// A collection of key-value pairs.
    pub fn tags(
        mut self,
        k: impl ::std::convert::Into<::std::string::String>,
        v: impl ::std::convert::Into<::std::string::String>,
    ) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// A collection of key-value pairs.
    pub fn set_tags(
        mut self,
        input: ::std::option::Option<
            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
        >,
    ) -> Self {
        self.tags = input;
        self
    }
    /// Appends an item to `whitelist_rules`.
    ///
    /// To override the contents of this collection use [`set_whitelist_rules`](Self::set_whitelist_rules).
    ///
    /// Whitelist rules and their sync status
    pub fn whitelist_rules(mut self, input: crate::types::InputWhitelistRule) -> Self {
        let mut v = self.whitelist_rules.unwrap_or_default();
        v.push(input);
        self.whitelist_rules = ::std::option::Option::Some(v);
        self
    }
    /// Whitelist rules and their sync status
    pub fn set_whitelist_rules(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::InputWhitelistRule>>,
    ) -> Self {
        self.whitelist_rules = input;
        self
    }
    /// Consumes the builder and constructs a [`InputSecurityGroup`](crate::types::InputSecurityGroup).
    pub fn build(self) -> crate::types::InputSecurityGroup {
        crate::types::InputSecurityGroup {
            arn: self.arn,
            id: self.id,
            inputs: self.inputs,
            state: self.state,
            tags: self.tags,
            whitelist_rules: self.whitelist_rules,
        }
    }
}