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

/// <p>Indicates whether the account is compliant with the specified policy. An account is considered noncompliant if it includes resources that are not protected by the policy, for WAF and Shield Advanced policies, or that are noncompliant with the policy, for security group policies.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PolicyComplianceStatus {
    /// <p>The Amazon Web Services account that created the Firewall Manager policy.</p>
    pub policy_owner: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the Firewall Manager policy.</p>
    pub policy_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the Firewall Manager policy.</p>
    pub policy_name: ::std::option::Option<::std::string::String>,
    /// <p>The member account ID.</p>
    pub member_account: ::std::option::Option<::std::string::String>,
    /// <p>An array of <code>EvaluationResult</code> objects.</p>
    pub evaluation_results: ::std::option::Option<::std::vec::Vec<crate::types::EvaluationResult>>,
    /// <p>Timestamp of the last update to the <code>EvaluationResult</code> objects.</p>
    pub last_updated: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Details about problems with dependent services, such as WAF or Config, and the error message received that indicates the problem with the service.</p>
    pub issue_info_map: ::std::option::Option<::std::collections::HashMap<crate::types::DependentServiceName, ::std::string::String>>,
}
impl PolicyComplianceStatus {
    /// <p>The Amazon Web Services account that created the Firewall Manager policy.</p>
    pub fn policy_owner(&self) -> ::std::option::Option<&str> {
        self.policy_owner.as_deref()
    }
    /// <p>The ID of the Firewall Manager policy.</p>
    pub fn policy_id(&self) -> ::std::option::Option<&str> {
        self.policy_id.as_deref()
    }
    /// <p>The name of the Firewall Manager policy.</p>
    pub fn policy_name(&self) -> ::std::option::Option<&str> {
        self.policy_name.as_deref()
    }
    /// <p>The member account ID.</p>
    pub fn member_account(&self) -> ::std::option::Option<&str> {
        self.member_account.as_deref()
    }
    /// <p>An array of <code>EvaluationResult</code> objects.</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 `.evaluation_results.is_none()`.
    pub fn evaluation_results(&self) -> &[crate::types::EvaluationResult] {
        self.evaluation_results.as_deref().unwrap_or_default()
    }
    /// <p>Timestamp of the last update to the <code>EvaluationResult</code> objects.</p>
    pub fn last_updated(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated.as_ref()
    }
    /// <p>Details about problems with dependent services, such as WAF or Config, and the error message received that indicates the problem with the service.</p>
    pub fn issue_info_map(&self) -> ::std::option::Option<&::std::collections::HashMap<crate::types::DependentServiceName, ::std::string::String>> {
        self.issue_info_map.as_ref()
    }
}
impl PolicyComplianceStatus {
    /// Creates a new builder-style object to manufacture [`PolicyComplianceStatus`](crate::types::PolicyComplianceStatus).
    pub fn builder() -> crate::types::builders::PolicyComplianceStatusBuilder {
        crate::types::builders::PolicyComplianceStatusBuilder::default()
    }
}

/// A builder for [`PolicyComplianceStatus`](crate::types::PolicyComplianceStatus).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct PolicyComplianceStatusBuilder {
    pub(crate) policy_owner: ::std::option::Option<::std::string::String>,
    pub(crate) policy_id: ::std::option::Option<::std::string::String>,
    pub(crate) policy_name: ::std::option::Option<::std::string::String>,
    pub(crate) member_account: ::std::option::Option<::std::string::String>,
    pub(crate) evaluation_results: ::std::option::Option<::std::vec::Vec<crate::types::EvaluationResult>>,
    pub(crate) last_updated: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) issue_info_map: ::std::option::Option<::std::collections::HashMap<crate::types::DependentServiceName, ::std::string::String>>,
}
impl PolicyComplianceStatusBuilder {
    /// <p>The Amazon Web Services account that created the Firewall Manager policy.</p>
    pub fn policy_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.policy_owner = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services account that created the Firewall Manager policy.</p>
    pub fn set_policy_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.policy_owner = input;
        self
    }
    /// <p>The Amazon Web Services account that created the Firewall Manager policy.</p>
    pub fn get_policy_owner(&self) -> &::std::option::Option<::std::string::String> {
        &self.policy_owner
    }
    /// <p>The ID of the Firewall Manager policy.</p>
    pub fn policy_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.policy_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Firewall Manager policy.</p>
    pub fn set_policy_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.policy_id = input;
        self
    }
    /// <p>The ID of the Firewall Manager policy.</p>
    pub fn get_policy_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.policy_id
    }
    /// <p>The name of the Firewall Manager policy.</p>
    pub fn policy_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.policy_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the Firewall Manager policy.</p>
    pub fn set_policy_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.policy_name = input;
        self
    }
    /// <p>The name of the Firewall Manager policy.</p>
    pub fn get_policy_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.policy_name
    }
    /// <p>The member account ID.</p>
    pub fn member_account(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.member_account = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The member account ID.</p>
    pub fn set_member_account(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.member_account = input;
        self
    }
    /// <p>The member account ID.</p>
    pub fn get_member_account(&self) -> &::std::option::Option<::std::string::String> {
        &self.member_account
    }
    /// Appends an item to `evaluation_results`.
    ///
    /// To override the contents of this collection use [`set_evaluation_results`](Self::set_evaluation_results).
    ///
    /// <p>An array of <code>EvaluationResult</code> objects.</p>
    pub fn evaluation_results(mut self, input: crate::types::EvaluationResult) -> Self {
        let mut v = self.evaluation_results.unwrap_or_default();
        v.push(input);
        self.evaluation_results = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of <code>EvaluationResult</code> objects.</p>
    pub fn set_evaluation_results(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EvaluationResult>>) -> Self {
        self.evaluation_results = input;
        self
    }
    /// <p>An array of <code>EvaluationResult</code> objects.</p>
    pub fn get_evaluation_results(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EvaluationResult>> {
        &self.evaluation_results
    }
    /// <p>Timestamp of the last update to the <code>EvaluationResult</code> objects.</p>
    pub fn last_updated(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_updated = ::std::option::Option::Some(input);
        self
    }
    /// <p>Timestamp of the last update to the <code>EvaluationResult</code> objects.</p>
    pub fn set_last_updated(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_updated = input;
        self
    }
    /// <p>Timestamp of the last update to the <code>EvaluationResult</code> objects.</p>
    pub fn get_last_updated(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated
    }
    /// Adds a key-value pair to `issue_info_map`.
    ///
    /// To override the contents of this collection use [`set_issue_info_map`](Self::set_issue_info_map).
    ///
    /// <p>Details about problems with dependent services, such as WAF or Config, and the error message received that indicates the problem with the service.</p>
    pub fn issue_info_map(mut self, k: crate::types::DependentServiceName, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.issue_info_map.unwrap_or_default();
        hash_map.insert(k, v.into());
        self.issue_info_map = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>Details about problems with dependent services, such as WAF or Config, and the error message received that indicates the problem with the service.</p>
    pub fn set_issue_info_map(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<crate::types::DependentServiceName, ::std::string::String>>,
    ) -> Self {
        self.issue_info_map = input;
        self
    }
    /// <p>Details about problems with dependent services, such as WAF or Config, and the error message received that indicates the problem with the service.</p>
    pub fn get_issue_info_map(
        &self,
    ) -> &::std::option::Option<::std::collections::HashMap<crate::types::DependentServiceName, ::std::string::String>> {
        &self.issue_info_map
    }
    /// Consumes the builder and constructs a [`PolicyComplianceStatus`](crate::types::PolicyComplianceStatus).
    pub fn build(self) -> crate::types::PolicyComplianceStatus {
        crate::types::PolicyComplianceStatus {
            policy_owner: self.policy_owner,
            policy_id: self.policy_id,
            policy_name: self.policy_name,
            member_account: self.member_account,
            evaluation_results: self.evaluation_results,
            last_updated: self.last_updated,
            issue_info_map: self.issue_info_map,
        }
    }
}