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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>An object specifying the measure and method by which to sort the utterance data.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UtteranceDataSortBy {
    /// <p>The measure by which to sort the utterance analytics data.</p>
    /// <ul>
    /// <li> <p> <code>Count</code> – The number of utterances.</p> </li>
    /// <li> <p> <code>UtteranceTimestamp</code> – The date and time of the utterance.</p> </li>
    /// </ul>
    pub name: ::std::option::Option<crate::types::AnalyticsUtteranceSortByName>,
    /// <p>Specifies whether to sort the results in ascending or descending order.</p>
    pub order: ::std::option::Option<crate::types::AnalyticsSortOrder>,
}
impl UtteranceDataSortBy {
    /// <p>The measure by which to sort the utterance analytics data.</p>
    /// <ul>
    /// <li> <p> <code>Count</code> – The number of utterances.</p> </li>
    /// <li> <p> <code>UtteranceTimestamp</code> – The date and time of the utterance.</p> </li>
    /// </ul>
    pub fn name(&self) -> ::std::option::Option<&crate::types::AnalyticsUtteranceSortByName> {
        self.name.as_ref()
    }
    /// <p>Specifies whether to sort the results in ascending or descending order.</p>
    pub fn order(&self) -> ::std::option::Option<&crate::types::AnalyticsSortOrder> {
        self.order.as_ref()
    }
}
impl UtteranceDataSortBy {
    /// Creates a new builder-style object to manufacture [`UtteranceDataSortBy`](crate::types::UtteranceDataSortBy).
    pub fn builder() -> crate::types::builders::UtteranceDataSortByBuilder {
        crate::types::builders::UtteranceDataSortByBuilder::default()
    }
}

/// A builder for [`UtteranceDataSortBy`](crate::types::UtteranceDataSortBy).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UtteranceDataSortByBuilder {
    pub(crate) name: ::std::option::Option<crate::types::AnalyticsUtteranceSortByName>,
    pub(crate) order: ::std::option::Option<crate::types::AnalyticsSortOrder>,
}
impl UtteranceDataSortByBuilder {
    /// <p>The measure by which to sort the utterance analytics data.</p>
    /// <ul>
    /// <li> <p> <code>Count</code> – The number of utterances.</p> </li>
    /// <li> <p> <code>UtteranceTimestamp</code> – The date and time of the utterance.</p> </li>
    /// </ul>
    pub fn name(mut self, input: crate::types::AnalyticsUtteranceSortByName) -> Self {
        self.name = ::std::option::Option::Some(input);
        self
    }
    /// <p>The measure by which to sort the utterance analytics data.</p>
    /// <ul>
    /// <li> <p> <code>Count</code> – The number of utterances.</p> </li>
    /// <li> <p> <code>UtteranceTimestamp</code> – The date and time of the utterance.</p> </li>
    /// </ul>
    pub fn set_name(mut self, input: ::std::option::Option<crate::types::AnalyticsUtteranceSortByName>) -> Self {
        self.name = input;
        self
    }
    /// <p>The measure by which to sort the utterance analytics data.</p>
    /// <ul>
    /// <li> <p> <code>Count</code> – The number of utterances.</p> </li>
    /// <li> <p> <code>UtteranceTimestamp</code> – The date and time of the utterance.</p> </li>
    /// </ul>
    pub fn get_name(&self) -> &::std::option::Option<crate::types::AnalyticsUtteranceSortByName> {
        &self.name
    }
    /// <p>Specifies whether to sort the results in ascending or descending order.</p>
    pub fn order(mut self, input: crate::types::AnalyticsSortOrder) -> Self {
        self.order = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether to sort the results in ascending or descending order.</p>
    pub fn set_order(mut self, input: ::std::option::Option<crate::types::AnalyticsSortOrder>) -> Self {
        self.order = input;
        self
    }
    /// <p>Specifies whether to sort the results in ascending or descending order.</p>
    pub fn get_order(&self) -> &::std::option::Option<crate::types::AnalyticsSortOrder> {
        &self.order
    }
    /// Consumes the builder and constructs a [`UtteranceDataSortBy`](crate::types::UtteranceDataSortBy).
    pub fn build(self) -> crate::types::UtteranceDataSortBy {
        crate::types::UtteranceDataSortBy {
            name: self.name,
            order: self.order,
        }
    }
}