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

/// <p>Specifies a current quota for an Amazon Macie account.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ServiceLimit {
    /// <p>Specifies whether the account has met the quota that corresponds to the metric specified by the UsageByAccount.type field in the response.</p>
    pub is_service_limited: ::std::option::Option<bool>,
    /// <p>The unit of measurement for the value specified by the value field.</p>
    pub unit: ::std::option::Option<crate::types::Unit>,
    /// <p>The value for the metric specified by the UsageByAccount.type field in the response.</p>
    pub value: ::std::option::Option<i64>,
}
impl ServiceLimit {
    /// <p>Specifies whether the account has met the quota that corresponds to the metric specified by the UsageByAccount.type field in the response.</p>
    pub fn is_service_limited(&self) -> ::std::option::Option<bool> {
        self.is_service_limited
    }
    /// <p>The unit of measurement for the value specified by the value field.</p>
    pub fn unit(&self) -> ::std::option::Option<&crate::types::Unit> {
        self.unit.as_ref()
    }
    /// <p>The value for the metric specified by the UsageByAccount.type field in the response.</p>
    pub fn value(&self) -> ::std::option::Option<i64> {
        self.value
    }
}
impl ServiceLimit {
    /// Creates a new builder-style object to manufacture [`ServiceLimit`](crate::types::ServiceLimit).
    pub fn builder() -> crate::types::builders::ServiceLimitBuilder {
        crate::types::builders::ServiceLimitBuilder::default()
    }
}

/// A builder for [`ServiceLimit`](crate::types::ServiceLimit).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ServiceLimitBuilder {
    pub(crate) is_service_limited: ::std::option::Option<bool>,
    pub(crate) unit: ::std::option::Option<crate::types::Unit>,
    pub(crate) value: ::std::option::Option<i64>,
}
impl ServiceLimitBuilder {
    /// <p>Specifies whether the account has met the quota that corresponds to the metric specified by the UsageByAccount.type field in the response.</p>
    pub fn is_service_limited(mut self, input: bool) -> Self {
        self.is_service_limited = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether the account has met the quota that corresponds to the metric specified by the UsageByAccount.type field in the response.</p>
    pub fn set_is_service_limited(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_service_limited = input;
        self
    }
    /// <p>Specifies whether the account has met the quota that corresponds to the metric specified by the UsageByAccount.type field in the response.</p>
    pub fn get_is_service_limited(&self) -> &::std::option::Option<bool> {
        &self.is_service_limited
    }
    /// <p>The unit of measurement for the value specified by the value field.</p>
    pub fn unit(mut self, input: crate::types::Unit) -> Self {
        self.unit = ::std::option::Option::Some(input);
        self
    }
    /// <p>The unit of measurement for the value specified by the value field.</p>
    pub fn set_unit(mut self, input: ::std::option::Option<crate::types::Unit>) -> Self {
        self.unit = input;
        self
    }
    /// <p>The unit of measurement for the value specified by the value field.</p>
    pub fn get_unit(&self) -> &::std::option::Option<crate::types::Unit> {
        &self.unit
    }
    /// <p>The value for the metric specified by the UsageByAccount.type field in the response.</p>
    pub fn value(mut self, input: i64) -> Self {
        self.value = ::std::option::Option::Some(input);
        self
    }
    /// <p>The value for the metric specified by the UsageByAccount.type field in the response.</p>
    pub fn set_value(mut self, input: ::std::option::Option<i64>) -> Self {
        self.value = input;
        self
    }
    /// <p>The value for the metric specified by the UsageByAccount.type field in the response.</p>
    pub fn get_value(&self) -> &::std::option::Option<i64> {
        &self.value
    }
    /// Consumes the builder and constructs a [`ServiceLimit`](crate::types::ServiceLimit).
    pub fn build(self) -> crate::types::ServiceLimit {
        crate::types::ServiceLimit {
            is_service_limited: self.is_service_limited,
            unit: self.unit,
            value: self.value,
        }
    }
}