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

/// <p>Defines the policy types that the specified Firewall Manager administrator can manage.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PolicyTypeScope {
    /// <p>The list of policy types that the specified Firewall Manager administrator can manage.</p>
    pub policy_types: ::std::option::Option<::std::vec::Vec<crate::types::SecurityServiceType>>,
    /// <p>Allows the specified Firewall Manager administrator to manage all Firewall Manager policy types, except for third-party policy types. Third-party policy types can only be managed by the Firewall Manager default administrator.</p>
    pub all_policy_types_enabled: bool,
}
impl PolicyTypeScope {
    /// <p>The list of policy types that the specified Firewall Manager administrator can manage.</p>
    pub fn policy_types(&self) -> ::std::option::Option<&[crate::types::SecurityServiceType]> {
        self.policy_types.as_deref()
    }
    /// <p>Allows the specified Firewall Manager administrator to manage all Firewall Manager policy types, except for third-party policy types. Third-party policy types can only be managed by the Firewall Manager default administrator.</p>
    pub fn all_policy_types_enabled(&self) -> bool {
        self.all_policy_types_enabled
    }
}
impl PolicyTypeScope {
    /// Creates a new builder-style object to manufacture [`PolicyTypeScope`](crate::types::PolicyTypeScope).
    pub fn builder() -> crate::types::builders::PolicyTypeScopeBuilder {
        crate::types::builders::PolicyTypeScopeBuilder::default()
    }
}

/// A builder for [`PolicyTypeScope`](crate::types::PolicyTypeScope).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct PolicyTypeScopeBuilder {
    pub(crate) policy_types: ::std::option::Option<::std::vec::Vec<crate::types::SecurityServiceType>>,
    pub(crate) all_policy_types_enabled: ::std::option::Option<bool>,
}
impl PolicyTypeScopeBuilder {
    /// Appends an item to `policy_types`.
    ///
    /// To override the contents of this collection use [`set_policy_types`](Self::set_policy_types).
    ///
    /// <p>The list of policy types that the specified Firewall Manager administrator can manage.</p>
    pub fn policy_types(mut self, input: crate::types::SecurityServiceType) -> Self {
        let mut v = self.policy_types.unwrap_or_default();
        v.push(input);
        self.policy_types = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of policy types that the specified Firewall Manager administrator can manage.</p>
    pub fn set_policy_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SecurityServiceType>>) -> Self {
        self.policy_types = input;
        self
    }
    /// <p>The list of policy types that the specified Firewall Manager administrator can manage.</p>
    pub fn get_policy_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SecurityServiceType>> {
        &self.policy_types
    }
    /// <p>Allows the specified Firewall Manager administrator to manage all Firewall Manager policy types, except for third-party policy types. Third-party policy types can only be managed by the Firewall Manager default administrator.</p>
    pub fn all_policy_types_enabled(mut self, input: bool) -> Self {
        self.all_policy_types_enabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>Allows the specified Firewall Manager administrator to manage all Firewall Manager policy types, except for third-party policy types. Third-party policy types can only be managed by the Firewall Manager default administrator.</p>
    pub fn set_all_policy_types_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.all_policy_types_enabled = input;
        self
    }
    /// <p>Allows the specified Firewall Manager administrator to manage all Firewall Manager policy types, except for third-party policy types. Third-party policy types can only be managed by the Firewall Manager default administrator.</p>
    pub fn get_all_policy_types_enabled(&self) -> &::std::option::Option<bool> {
        &self.all_policy_types_enabled
    }
    /// Consumes the builder and constructs a [`PolicyTypeScope`](crate::types::PolicyTypeScope).
    pub fn build(self) -> crate::types::PolicyTypeScope {
        crate::types::PolicyTypeScope {
            policy_types: self.policy_types,
            all_policy_types_enabled: self.all_policy_types_enabled.unwrap_or_default(),
        }
    }
}