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

/// <p>Specifies criteria for sorting the results of a query for Amazon Macie account quotas and usage data.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UsageStatisticsSortBy {
    /// <p>The field to sort the results by.</p>
    pub key: ::std::option::Option<crate::types::UsageStatisticsSortKey>,
    /// <p>The sort order to apply to the results, based on the value for the field specified by the key property. Valid values are: ASC, sort the results in ascending order; and, DESC, sort the results in descending order.</p>
    pub order_by: ::std::option::Option<crate::types::OrderBy>,
}
impl UsageStatisticsSortBy {
    /// <p>The field to sort the results by.</p>
    pub fn key(&self) -> ::std::option::Option<&crate::types::UsageStatisticsSortKey> {
        self.key.as_ref()
    }
    /// <p>The sort order to apply to the results, based on the value for the field specified by the key property. Valid values are: ASC, sort the results in ascending order; and, DESC, sort the results in descending order.</p>
    pub fn order_by(&self) -> ::std::option::Option<&crate::types::OrderBy> {
        self.order_by.as_ref()
    }
}
impl UsageStatisticsSortBy {
    /// Creates a new builder-style object to manufacture [`UsageStatisticsSortBy`](crate::types::UsageStatisticsSortBy).
    pub fn builder() -> crate::types::builders::UsageStatisticsSortByBuilder {
        crate::types::builders::UsageStatisticsSortByBuilder::default()
    }
}

/// A builder for [`UsageStatisticsSortBy`](crate::types::UsageStatisticsSortBy).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UsageStatisticsSortByBuilder {
    pub(crate) key: ::std::option::Option<crate::types::UsageStatisticsSortKey>,
    pub(crate) order_by: ::std::option::Option<crate::types::OrderBy>,
}
impl UsageStatisticsSortByBuilder {
    /// <p>The field to sort the results by.</p>
    pub fn key(mut self, input: crate::types::UsageStatisticsSortKey) -> Self {
        self.key = ::std::option::Option::Some(input);
        self
    }
    /// <p>The field to sort the results by.</p>
    pub fn set_key(mut self, input: ::std::option::Option<crate::types::UsageStatisticsSortKey>) -> Self {
        self.key = input;
        self
    }
    /// <p>The field to sort the results by.</p>
    pub fn get_key(&self) -> &::std::option::Option<crate::types::UsageStatisticsSortKey> {
        &self.key
    }
    /// <p>The sort order to apply to the results, based on the value for the field specified by the key property. Valid values are: ASC, sort the results in ascending order; and, DESC, sort the results in descending order.</p>
    pub fn order_by(mut self, input: crate::types::OrderBy) -> Self {
        self.order_by = ::std::option::Option::Some(input);
        self
    }
    /// <p>The sort order to apply to the results, based on the value for the field specified by the key property. Valid values are: ASC, sort the results in ascending order; and, DESC, sort the results in descending order.</p>
    pub fn set_order_by(mut self, input: ::std::option::Option<crate::types::OrderBy>) -> Self {
        self.order_by = input;
        self
    }
    /// <p>The sort order to apply to the results, based on the value for the field specified by the key property. Valid values are: ASC, sort the results in ascending order; and, DESC, sort the results in descending order.</p>
    pub fn get_order_by(&self) -> &::std::option::Option<crate::types::OrderBy> {
        &self.order_by
    }
    /// Consumes the builder and constructs a [`UsageStatisticsSortBy`](crate::types::UsageStatisticsSortBy).
    pub fn build(self) -> crate::types::UsageStatisticsSortBy {
        crate::types::UsageStatisticsSortBy {
            key: self.key,
            order_by: self.order_by,
        }
    }
}