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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains the metric and the summary statistic you want to calculate, and the order in which to sort the results, for the intents in the bot.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AnalyticsIntentMetric {
    /// <p>The metric for which you want to get intent summary statistics.</p>
    /// <ul>
    /// <li> <p> <code>Count</code> – The number of times the intent was invoked.</p> </li>
    /// <li> <p> <code>Success</code> – The number of times the intent succeeded.</p> </li>
    /// <li> <p> <code>Failure</code> – The number of times the intent failed.</p> </li>
    /// <li> <p> <code>Switched</code> – The number of times there was a switch to a different intent.</p> </li>
    /// <li> <p> <code>Dropped</code> – The number of times the user dropped the intent.</p> </li>
    /// </ul>
    pub name: ::std::option::Option<crate::types::AnalyticsIntentMetricName>,
    /// <p>The summary statistic to calculate.</p>
    /// <ul>
    /// <li> <p> <code>Sum</code> – The total count for the category you provide in <code>name</code>.</p> </li>
    /// <li> <p> <code>Average</code> – The total count divided by the number of intents in the category you provide in <code>name</code>.</p> </li>
    /// <li> <p> <code>Max</code> – The highest count in the category you provide in <code>name</code>.</p> </li>
    /// </ul>
    pub statistic: ::std::option::Option<crate::types::AnalyticsMetricStatistic>,
    /// <p>Specifies whether to sort the results in ascending or descending order.</p>
    pub order: ::std::option::Option<crate::types::AnalyticsSortOrder>,
}
impl AnalyticsIntentMetric {
    /// <p>The metric for which you want to get intent summary statistics.</p>
    /// <ul>
    /// <li> <p> <code>Count</code> – The number of times the intent was invoked.</p> </li>
    /// <li> <p> <code>Success</code> – The number of times the intent succeeded.</p> </li>
    /// <li> <p> <code>Failure</code> – The number of times the intent failed.</p> </li>
    /// <li> <p> <code>Switched</code> – The number of times there was a switch to a different intent.</p> </li>
    /// <li> <p> <code>Dropped</code> – The number of times the user dropped the intent.</p> </li>
    /// </ul>
    pub fn name(&self) -> ::std::option::Option<&crate::types::AnalyticsIntentMetricName> {
        self.name.as_ref()
    }
    /// <p>The summary statistic to calculate.</p>
    /// <ul>
    /// <li> <p> <code>Sum</code> – The total count for the category you provide in <code>name</code>.</p> </li>
    /// <li> <p> <code>Average</code> – The total count divided by the number of intents in the category you provide in <code>name</code>.</p> </li>
    /// <li> <p> <code>Max</code> – The highest count in the category you provide in <code>name</code>.</p> </li>
    /// </ul>
    pub fn statistic(&self) -> ::std::option::Option<&crate::types::AnalyticsMetricStatistic> {
        self.statistic.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 AnalyticsIntentMetric {
    /// Creates a new builder-style object to manufacture [`AnalyticsIntentMetric`](crate::types::AnalyticsIntentMetric).
    pub fn builder() -> crate::types::builders::AnalyticsIntentMetricBuilder {
        crate::types::builders::AnalyticsIntentMetricBuilder::default()
    }
}

/// A builder for [`AnalyticsIntentMetric`](crate::types::AnalyticsIntentMetric).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AnalyticsIntentMetricBuilder {
    pub(crate) name: ::std::option::Option<crate::types::AnalyticsIntentMetricName>,
    pub(crate) statistic: ::std::option::Option<crate::types::AnalyticsMetricStatistic>,
    pub(crate) order: ::std::option::Option<crate::types::AnalyticsSortOrder>,
}
impl AnalyticsIntentMetricBuilder {
    /// <p>The metric for which you want to get intent summary statistics.</p>
    /// <ul>
    /// <li> <p> <code>Count</code> – The number of times the intent was invoked.</p> </li>
    /// <li> <p> <code>Success</code> – The number of times the intent succeeded.</p> </li>
    /// <li> <p> <code>Failure</code> – The number of times the intent failed.</p> </li>
    /// <li> <p> <code>Switched</code> – The number of times there was a switch to a different intent.</p> </li>
    /// <li> <p> <code>Dropped</code> – The number of times the user dropped the intent.</p> </li>
    /// </ul>
    pub fn name(mut self, input: crate::types::AnalyticsIntentMetricName) -> Self {
        self.name = ::std::option::Option::Some(input);
        self
    }
    /// <p>The metric for which you want to get intent summary statistics.</p>
    /// <ul>
    /// <li> <p> <code>Count</code> – The number of times the intent was invoked.</p> </li>
    /// <li> <p> <code>Success</code> – The number of times the intent succeeded.</p> </li>
    /// <li> <p> <code>Failure</code> – The number of times the intent failed.</p> </li>
    /// <li> <p> <code>Switched</code> – The number of times there was a switch to a different intent.</p> </li>
    /// <li> <p> <code>Dropped</code> – The number of times the user dropped the intent.</p> </li>
    /// </ul>
    pub fn set_name(mut self, input: ::std::option::Option<crate::types::AnalyticsIntentMetricName>) -> Self {
        self.name = input;
        self
    }
    /// <p>The metric for which you want to get intent summary statistics.</p>
    /// <ul>
    /// <li> <p> <code>Count</code> – The number of times the intent was invoked.</p> </li>
    /// <li> <p> <code>Success</code> – The number of times the intent succeeded.</p> </li>
    /// <li> <p> <code>Failure</code> – The number of times the intent failed.</p> </li>
    /// <li> <p> <code>Switched</code> – The number of times there was a switch to a different intent.</p> </li>
    /// <li> <p> <code>Dropped</code> – The number of times the user dropped the intent.</p> </li>
    /// </ul>
    pub fn get_name(&self) -> &::std::option::Option<crate::types::AnalyticsIntentMetricName> {
        &self.name
    }
    /// <p>The summary statistic to calculate.</p>
    /// <ul>
    /// <li> <p> <code>Sum</code> – The total count for the category you provide in <code>name</code>.</p> </li>
    /// <li> <p> <code>Average</code> – The total count divided by the number of intents in the category you provide in <code>name</code>.</p> </li>
    /// <li> <p> <code>Max</code> – The highest count in the category you provide in <code>name</code>.</p> </li>
    /// </ul>
    pub fn statistic(mut self, input: crate::types::AnalyticsMetricStatistic) -> Self {
        self.statistic = ::std::option::Option::Some(input);
        self
    }
    /// <p>The summary statistic to calculate.</p>
    /// <ul>
    /// <li> <p> <code>Sum</code> – The total count for the category you provide in <code>name</code>.</p> </li>
    /// <li> <p> <code>Average</code> – The total count divided by the number of intents in the category you provide in <code>name</code>.</p> </li>
    /// <li> <p> <code>Max</code> – The highest count in the category you provide in <code>name</code>.</p> </li>
    /// </ul>
    pub fn set_statistic(mut self, input: ::std::option::Option<crate::types::AnalyticsMetricStatistic>) -> Self {
        self.statistic = input;
        self
    }
    /// <p>The summary statistic to calculate.</p>
    /// <ul>
    /// <li> <p> <code>Sum</code> – The total count for the category you provide in <code>name</code>.</p> </li>
    /// <li> <p> <code>Average</code> – The total count divided by the number of intents in the category you provide in <code>name</code>.</p> </li>
    /// <li> <p> <code>Max</code> – The highest count in the category you provide in <code>name</code>.</p> </li>
    /// </ul>
    pub fn get_statistic(&self) -> &::std::option::Option<crate::types::AnalyticsMetricStatistic> {
        &self.statistic
    }
    /// <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 [`AnalyticsIntentMetric`](crate::types::AnalyticsIntentMetric).
    pub fn build(self) -> crate::types::AnalyticsIntentMetric {
        crate::types::AnalyticsIntentMetric {
            name: self.name,
            statistic: self.statistic,
            order: self.order,
        }
    }
}