Skip to main content

aws_sdk_macie2/types/
_usage_total.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <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>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UsageTotal {
7    /// <p>The type of currency that the value for the metric (estimatedCost) is reported in.</p>
8    pub currency: ::std::option::Option<crate::types::Currency>,
9    /// <p>The estimated value for the metric.</p>
10    pub estimated_cost: ::std::option::Option<::std::string::String>,
11    /// <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>
12    pub r#type: ::std::option::Option<crate::types::UsageType>,
13}
14impl UsageTotal {
15    /// <p>The type of currency that the value for the metric (estimatedCost) is reported in.</p>
16    pub fn currency(&self) -> ::std::option::Option<&crate::types::Currency> {
17        self.currency.as_ref()
18    }
19    /// <p>The estimated value for the metric.</p>
20    pub fn estimated_cost(&self) -> ::std::option::Option<&str> {
21        self.estimated_cost.as_deref()
22    }
23    /// <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>
24    pub fn r#type(&self) -> ::std::option::Option<&crate::types::UsageType> {
25        self.r#type.as_ref()
26    }
27}
28impl UsageTotal {
29    /// Creates a new builder-style object to manufacture [`UsageTotal`](crate::types::UsageTotal).
30    pub fn builder() -> crate::types::builders::UsageTotalBuilder {
31        crate::types::builders::UsageTotalBuilder::default()
32    }
33}
34
35/// A builder for [`UsageTotal`](crate::types::UsageTotal).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct UsageTotalBuilder {
39    pub(crate) currency: ::std::option::Option<crate::types::Currency>,
40    pub(crate) estimated_cost: ::std::option::Option<::std::string::String>,
41    pub(crate) r#type: ::std::option::Option<crate::types::UsageType>,
42}
43impl UsageTotalBuilder {
44    /// <p>The type of currency that the value for the metric (estimatedCost) is reported in.</p>
45    pub fn currency(mut self, input: crate::types::Currency) -> Self {
46        self.currency = ::std::option::Option::Some(input);
47        self
48    }
49    /// <p>The type of currency that the value for the metric (estimatedCost) is reported in.</p>
50    pub fn set_currency(mut self, input: ::std::option::Option<crate::types::Currency>) -> Self {
51        self.currency = input;
52        self
53    }
54    /// <p>The type of currency that the value for the metric (estimatedCost) is reported in.</p>
55    pub fn get_currency(&self) -> &::std::option::Option<crate::types::Currency> {
56        &self.currency
57    }
58    /// <p>The estimated value for the metric.</p>
59    pub fn estimated_cost(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.estimated_cost = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The estimated value for the metric.</p>
64    pub fn set_estimated_cost(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.estimated_cost = input;
66        self
67    }
68    /// <p>The estimated value for the metric.</p>
69    pub fn get_estimated_cost(&self) -> &::std::option::Option<::std::string::String> {
70        &self.estimated_cost
71    }
72    /// <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>
73    pub fn r#type(mut self, input: crate::types::UsageType) -> Self {
74        self.r#type = ::std::option::Option::Some(input);
75        self
76    }
77    /// <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>
78    pub fn set_type(mut self, input: ::std::option::Option<crate::types::UsageType>) -> Self {
79        self.r#type = input;
80        self
81    }
82    /// <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>
83    pub fn get_type(&self) -> &::std::option::Option<crate::types::UsageType> {
84        &self.r#type
85    }
86    /// Consumes the builder and constructs a [`UsageTotal`](crate::types::UsageTotal).
87    pub fn build(self) -> crate::types::UsageTotal {
88        crate::types::UsageTotal {
89            currency: self.currency,
90            estimated_cost: self.estimated_cost,
91            r#type: self.r#type,
92        }
93    }
94}