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

/// <p> Describes a dataset label. For more information, see <code>ListDatasetLabels</code>. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DatasetLabelDescription {
    /// <p> The name of the label. </p>
    #[doc(hidden)]
    pub label_name: std::option::Option<std::string::String>,
    /// <p> Statistics about the label. </p>
    #[doc(hidden)]
    pub label_stats: std::option::Option<crate::types::DatasetLabelStats>,
}
impl DatasetLabelDescription {
    /// <p> The name of the label. </p>
    pub fn label_name(&self) -> std::option::Option<&str> {
        self.label_name.as_deref()
    }
    /// <p> Statistics about the label. </p>
    pub fn label_stats(&self) -> std::option::Option<&crate::types::DatasetLabelStats> {
        self.label_stats.as_ref()
    }
}
impl DatasetLabelDescription {
    /// Creates a new builder-style object to manufacture [`DatasetLabelDescription`](crate::types::DatasetLabelDescription).
    pub fn builder() -> crate::types::builders::DatasetLabelDescriptionBuilder {
        crate::types::builders::DatasetLabelDescriptionBuilder::default()
    }
}

/// A builder for [`DatasetLabelDescription`](crate::types::DatasetLabelDescription).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct DatasetLabelDescriptionBuilder {
    pub(crate) label_name: std::option::Option<std::string::String>,
    pub(crate) label_stats: std::option::Option<crate::types::DatasetLabelStats>,
}
impl DatasetLabelDescriptionBuilder {
    /// <p> The name of the label. </p>
    pub fn label_name(mut self, input: impl Into<std::string::String>) -> Self {
        self.label_name = Some(input.into());
        self
    }
    /// <p> The name of the label. </p>
    pub fn set_label_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.label_name = input;
        self
    }
    /// <p> Statistics about the label. </p>
    pub fn label_stats(mut self, input: crate::types::DatasetLabelStats) -> Self {
        self.label_stats = Some(input);
        self
    }
    /// <p> Statistics about the label. </p>
    pub fn set_label_stats(
        mut self,
        input: std::option::Option<crate::types::DatasetLabelStats>,
    ) -> Self {
        self.label_stats = input;
        self
    }
    /// Consumes the builder and constructs a [`DatasetLabelDescription`](crate::types::DatasetLabelDescription).
    pub fn build(self) -> crate::types::DatasetLabelDescription {
        crate::types::DatasetLabelDescription {
            label_name: self.label_name,
            label_stats: self.label_stats,
        }
    }
}