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>Provides aggregated data for an Amazon Macie usage metric. The value for the metric reports estimated usage data for an account for the preceding 30 days or the current calendar month to date, depending on the time period (timeRange) specified in the request.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UsageTotal {
    /// <p>The type of currency that the value for the metric (estimatedCost) is reported in.</p>
    pub currency: ::std::option::Option<crate::types::Currency>,
    /// <p>The estimated value for the metric.</p>
    pub estimated_cost: ::std::option::Option<::std::string::String>,
    /// <p>The name of the metric. Possible values are: AUTOMATED_OBJECT_MONITORING, to monitor S3 objects for automated sensitive data discovery; AUTOMATED_SENSITIVE_DATA_DISCOVERY, to analyze S3 objects for automated sensitive data discovery; DATA_INVENTORY_EVALUATION, to monitor S3 buckets; and, SENSITIVE_DATA_DISCOVERY, to run classification jobs.</p>
    pub r#type: ::std::option::Option<crate::types::UsageType>,
}
impl UsageTotal {
    /// <p>The type of currency that the value for the metric (estimatedCost) is reported in.</p>
    pub fn currency(&self) -> ::std::option::Option<&crate::types::Currency> {
        self.currency.as_ref()
    }
    /// <p>The estimated value for the metric.</p>
    pub fn estimated_cost(&self) -> ::std::option::Option<&str> {
        self.estimated_cost.as_deref()
    }
    /// <p>The name of the metric. Possible values are: AUTOMATED_OBJECT_MONITORING, to monitor S3 objects for automated sensitive data discovery; AUTOMATED_SENSITIVE_DATA_DISCOVERY, to analyze S3 objects for automated sensitive data discovery; DATA_INVENTORY_EVALUATION, to monitor S3 buckets; and, SENSITIVE_DATA_DISCOVERY, to run classification jobs.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::UsageType> {
        self.r#type.as_ref()
    }
}
impl UsageTotal {
    /// Creates a new builder-style object to manufacture [`UsageTotal`](crate::types::UsageTotal).
    pub fn builder() -> crate::types::builders::UsageTotalBuilder {
        crate::types::builders::UsageTotalBuilder::default()
    }
}

/// A builder for [`UsageTotal`](crate::types::UsageTotal).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UsageTotalBuilder {
    pub(crate) currency: ::std::option::Option<crate::types::Currency>,
    pub(crate) estimated_cost: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<crate::types::UsageType>,
}
impl UsageTotalBuilder {
    /// <p>The type of currency that the value for the metric (estimatedCost) is reported in.</p>
    pub fn currency(mut self, input: crate::types::Currency) -> Self {
        self.currency = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of currency that the value for the metric (estimatedCost) is reported in.</p>
    pub fn set_currency(mut self, input: ::std::option::Option<crate::types::Currency>) -> Self {
        self.currency = input;
        self
    }
    /// <p>The type of currency that the value for the metric (estimatedCost) is reported in.</p>
    pub fn get_currency(&self) -> &::std::option::Option<crate::types::Currency> {
        &self.currency
    }
    /// <p>The estimated value for the metric.</p>
    pub fn estimated_cost(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.estimated_cost = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The estimated value for the metric.</p>
    pub fn set_estimated_cost(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.estimated_cost = input;
        self
    }
    /// <p>The estimated value for the metric.</p>
    pub fn get_estimated_cost(&self) -> &::std::option::Option<::std::string::String> {
        &self.estimated_cost
    }
    /// <p>The name of the metric. Possible values are: AUTOMATED_OBJECT_MONITORING, to monitor S3 objects for automated sensitive data discovery; AUTOMATED_SENSITIVE_DATA_DISCOVERY, to analyze S3 objects for automated sensitive data discovery; DATA_INVENTORY_EVALUATION, to monitor S3 buckets; and, SENSITIVE_DATA_DISCOVERY, to run classification jobs.</p>
    pub fn r#type(mut self, input: crate::types::UsageType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The name of the metric. Possible values are: AUTOMATED_OBJECT_MONITORING, to monitor S3 objects for automated sensitive data discovery; AUTOMATED_SENSITIVE_DATA_DISCOVERY, to analyze S3 objects for automated sensitive data discovery; DATA_INVENTORY_EVALUATION, to monitor S3 buckets; and, SENSITIVE_DATA_DISCOVERY, to run classification jobs.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::UsageType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The name of the metric. Possible values are: AUTOMATED_OBJECT_MONITORING, to monitor S3 objects for automated sensitive data discovery; AUTOMATED_SENSITIVE_DATA_DISCOVERY, to analyze S3 objects for automated sensitive data discovery; DATA_INVENTORY_EVALUATION, to monitor S3 buckets; and, SENSITIVE_DATA_DISCOVERY, to run classification jobs.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::UsageType> {
        &self.r#type
    }
    /// Consumes the builder and constructs a [`UsageTotal`](crate::types::UsageTotal).
    pub fn build(self) -> crate::types::UsageTotal {
        crate::types::UsageTotal {
            currency: self.currency,
            estimated_cost: self.estimated_cost,
            r#type: self.r#type,
        }
    }
}