aws_sdk_macie2/types/_object_level_statistics.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Provides information about the total storage size (in bytes) or number of objects that Amazon Macie can't analyze in one or more S3 buckets. In a BucketMetadata or MatchingBucket object, this data is for a specific bucket. In a GetBucketStatisticsResponse object, this data is aggregated for all the buckets in the query results. If versioning is enabled for a bucket, storage size values are based on the size of the latest version of each applicable object in the bucket.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ObjectLevelStatistics {
7 /// <p>The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects don't have a file name extension for a supported file or storage format.</p>
8 pub file_type: ::std::option::Option<i64>,
9 /// <p>The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects use an unsupported storage class.</p>
10 pub storage_class: ::std::option::Option<i64>,
11 /// <p>The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects use an unsupported storage class or don't have a file name extension for a supported file or storage format.</p>
12 pub total: ::std::option::Option<i64>,
13}
14impl ObjectLevelStatistics {
15 /// <p>The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects don't have a file name extension for a supported file or storage format.</p>
16 pub fn file_type(&self) -> ::std::option::Option<i64> {
17 self.file_type
18 }
19 /// <p>The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects use an unsupported storage class.</p>
20 pub fn storage_class(&self) -> ::std::option::Option<i64> {
21 self.storage_class
22 }
23 /// <p>The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects use an unsupported storage class or don't have a file name extension for a supported file or storage format.</p>
24 pub fn total(&self) -> ::std::option::Option<i64> {
25 self.total
26 }
27}
28impl ObjectLevelStatistics {
29 /// Creates a new builder-style object to manufacture [`ObjectLevelStatistics`](crate::types::ObjectLevelStatistics).
30 pub fn builder() -> crate::types::builders::ObjectLevelStatisticsBuilder {
31 crate::types::builders::ObjectLevelStatisticsBuilder::default()
32 }
33}
34
35/// A builder for [`ObjectLevelStatistics`](crate::types::ObjectLevelStatistics).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct ObjectLevelStatisticsBuilder {
39 pub(crate) file_type: ::std::option::Option<i64>,
40 pub(crate) storage_class: ::std::option::Option<i64>,
41 pub(crate) total: ::std::option::Option<i64>,
42}
43impl ObjectLevelStatisticsBuilder {
44 /// <p>The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects don't have a file name extension for a supported file or storage format.</p>
45 pub fn file_type(mut self, input: i64) -> Self {
46 self.file_type = ::std::option::Option::Some(input);
47 self
48 }
49 /// <p>The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects don't have a file name extension for a supported file or storage format.</p>
50 pub fn set_file_type(mut self, input: ::std::option::Option<i64>) -> Self {
51 self.file_type = input;
52 self
53 }
54 /// <p>The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects don't have a file name extension for a supported file or storage format.</p>
55 pub fn get_file_type(&self) -> &::std::option::Option<i64> {
56 &self.file_type
57 }
58 /// <p>The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects use an unsupported storage class.</p>
59 pub fn storage_class(mut self, input: i64) -> Self {
60 self.storage_class = ::std::option::Option::Some(input);
61 self
62 }
63 /// <p>The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects use an unsupported storage class.</p>
64 pub fn set_storage_class(mut self, input: ::std::option::Option<i64>) -> Self {
65 self.storage_class = input;
66 self
67 }
68 /// <p>The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects use an unsupported storage class.</p>
69 pub fn get_storage_class(&self) -> &::std::option::Option<i64> {
70 &self.storage_class
71 }
72 /// <p>The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects use an unsupported storage class or don't have a file name extension for a supported file or storage format.</p>
73 pub fn total(mut self, input: i64) -> Self {
74 self.total = ::std::option::Option::Some(input);
75 self
76 }
77 /// <p>The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects use an unsupported storage class or don't have a file name extension for a supported file or storage format.</p>
78 pub fn set_total(mut self, input: ::std::option::Option<i64>) -> Self {
79 self.total = input;
80 self
81 }
82 /// <p>The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects use an unsupported storage class or don't have a file name extension for a supported file or storage format.</p>
83 pub fn get_total(&self) -> &::std::option::Option<i64> {
84 &self.total
85 }
86 /// Consumes the builder and constructs a [`ObjectLevelStatistics`](crate::types::ObjectLevelStatistics).
87 pub fn build(self) -> crate::types::ObjectLevelStatistics {
88 crate::types::ObjectLevelStatistics {
89 file_type: self.file_type,
90 storage_class: self.storage_class,
91 total: self.total,
92 }
93 }
94}