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

/// <p>The container element for Amazon S3 Storage Lens activity metrics. Activity metrics show details about how your storage is requested, such as requests (for example, All requests, Get requests, Put requests), bytes uploaded or downloaded, and errors.</p>
/// <p>For more information about S3 Storage Lens, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens.html">Assessing your storage activity and usage with S3 Storage Lens</a> in the <i>Amazon S3 User Guide</i>. For a complete list of S3 Storage Lens metrics, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens_metrics_glossary.html">S3 Storage Lens metrics glossary</a> in the <i>Amazon S3 User Guide</i>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ActivityMetrics {
    /// <p>A container that indicates whether activity metrics are enabled.</p>
    pub is_enabled: bool,
}
impl ActivityMetrics {
    /// <p>A container that indicates whether activity metrics are enabled.</p>
    pub fn is_enabled(&self) -> bool {
        self.is_enabled
    }
}
impl ActivityMetrics {
    /// Creates a new builder-style object to manufacture [`ActivityMetrics`](crate::types::ActivityMetrics).
    pub fn builder() -> crate::types::builders::ActivityMetricsBuilder {
        crate::types::builders::ActivityMetricsBuilder::default()
    }
}

/// A builder for [`ActivityMetrics`](crate::types::ActivityMetrics).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ActivityMetricsBuilder {
    pub(crate) is_enabled: ::std::option::Option<bool>,
}
impl ActivityMetricsBuilder {
    /// <p>A container that indicates whether activity metrics are enabled.</p>
    pub fn is_enabled(mut self, input: bool) -> Self {
        self.is_enabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>A container that indicates whether activity metrics are enabled.</p>
    pub fn set_is_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_enabled = input;
        self
    }
    /// <p>A container that indicates whether activity metrics are enabled.</p>
    pub fn get_is_enabled(&self) -> &::std::option::Option<bool> {
        &self.is_enabled
    }
    /// Consumes the builder and constructs a [`ActivityMetrics`](crate::types::ActivityMetrics).
    pub fn build(self) -> crate::types::ActivityMetrics {
        crate::types::ActivityMetrics {
            is_enabled: self.is_enabled.unwrap_or_default(),
        }
    }
}