aws_sdk_connect/operation/get_metric_data/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_metric_data::_get_metric_data_output::GetMetricDataOutputBuilder;
3
4pub use crate::operation::get_metric_data::_get_metric_data_input::GetMetricDataInputBuilder;
5
6impl crate::operation::get_metric_data::builders::GetMetricDataInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::get_metric_data::GetMetricDataOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::get_metric_data::GetMetricDataError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.get_metric_data();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `GetMetricData`.
24///
25/// <p>Gets historical metric data from the specified Amazon Connect instance.</p>
26/// <p>For a description of each historical metric, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html">Metrics definitions</a> in the <i>Amazon Connect Administrator Guide</i>.</p><note>
27/// <p>We recommend using the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html">GetMetricDataV2</a> API. It provides more flexibility, features, and the ability to query longer time ranges than <code>GetMetricData</code>. Use it to retrieve historical agent and contact metrics for the last 3 months, at varying intervals. You can also use it to build custom dashboards to measure historical queue and agent performance. For example, you can track the number of incoming contacts for the last 7 days, with data split by day, to see how contact volume changed per day of the week.</p>
28/// </note>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct GetMetricDataFluentBuilder {
31 handle: ::std::sync::Arc<crate::client::Handle>,
32 inner: crate::operation::get_metric_data::builders::GetMetricDataInputBuilder,
33 config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36 crate::client::customize::internal::CustomizableSend<
37 crate::operation::get_metric_data::GetMetricDataOutput,
38 crate::operation::get_metric_data::GetMetricDataError,
39 > for GetMetricDataFluentBuilder
40{
41 fn send(
42 self,
43 config_override: crate::config::Builder,
44 ) -> crate::client::customize::internal::BoxFuture<
45 crate::client::customize::internal::SendResult<
46 crate::operation::get_metric_data::GetMetricDataOutput,
47 crate::operation::get_metric_data::GetMetricDataError,
48 >,
49 > {
50 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51 }
52}
53impl GetMetricDataFluentBuilder {
54 /// Creates a new `GetMetricDataFluentBuilder`.
55 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56 Self {
57 handle,
58 inner: ::std::default::Default::default(),
59 config_override: ::std::option::Option::None,
60 }
61 }
62 /// Access the GetMetricData as a reference.
63 pub fn as_input(&self) -> &crate::operation::get_metric_data::builders::GetMetricDataInputBuilder {
64 &self.inner
65 }
66 /// Sends the request and returns the response.
67 ///
68 /// If an error occurs, an `SdkError` will be returned with additional details that
69 /// can be matched against.
70 ///
71 /// By default, any retryable failures will be retried twice. Retry behavior
72 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73 /// set when configuring the client.
74 pub async fn send(
75 self,
76 ) -> ::std::result::Result<
77 crate::operation::get_metric_data::GetMetricDataOutput,
78 ::aws_smithy_runtime_api::client::result::SdkError<
79 crate::operation::get_metric_data::GetMetricDataError,
80 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81 >,
82 > {
83 let input = self
84 .inner
85 .build()
86 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87 let runtime_plugins = crate::operation::get_metric_data::GetMetricData::operation_runtime_plugins(
88 self.handle.runtime_plugins.clone(),
89 &self.handle.conf,
90 self.config_override,
91 );
92 crate::operation::get_metric_data::GetMetricData::orchestrate(&runtime_plugins, input).await
93 }
94
95 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
96 pub fn customize(
97 self,
98 ) -> crate::client::customize::CustomizableOperation<
99 crate::operation::get_metric_data::GetMetricDataOutput,
100 crate::operation::get_metric_data::GetMetricDataError,
101 Self,
102 > {
103 crate::client::customize::CustomizableOperation::new(self)
104 }
105 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
106 self.set_config_override(::std::option::Option::Some(config_override.into()));
107 self
108 }
109
110 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
111 self.config_override = config_override;
112 self
113 }
114 /// Create a paginator for this request
115 ///
116 /// Paginators are used by calling [`send().await`](crate::operation::get_metric_data::paginator::GetMetricDataPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
117 pub fn into_paginator(self) -> crate::operation::get_metric_data::paginator::GetMetricDataPaginator {
118 crate::operation::get_metric_data::paginator::GetMetricDataPaginator::new(self.handle, self.inner)
119 }
120 /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
121 pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122 self.inner = self.inner.instance_id(input.into());
123 self
124 }
125 /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
126 pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127 self.inner = self.inner.set_instance_id(input);
128 self
129 }
130 /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
131 pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
132 self.inner.get_instance_id()
133 }
134 /// <p>The timestamp, in UNIX Epoch time format, at which to start the reporting interval for the retrieval of historical metrics data. The time must be specified using a multiple of 5 minutes, such as 10:05, 10:10, 10:15.</p>
135 /// <p>The start time cannot be earlier than 24 hours before the time of the request. Historical metrics are available only for 24 hours.</p>
136 pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
137 self.inner = self.inner.start_time(input);
138 self
139 }
140 /// <p>The timestamp, in UNIX Epoch time format, at which to start the reporting interval for the retrieval of historical metrics data. The time must be specified using a multiple of 5 minutes, such as 10:05, 10:10, 10:15.</p>
141 /// <p>The start time cannot be earlier than 24 hours before the time of the request. Historical metrics are available only for 24 hours.</p>
142 pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
143 self.inner = self.inner.set_start_time(input);
144 self
145 }
146 /// <p>The timestamp, in UNIX Epoch time format, at which to start the reporting interval for the retrieval of historical metrics data. The time must be specified using a multiple of 5 minutes, such as 10:05, 10:10, 10:15.</p>
147 /// <p>The start time cannot be earlier than 24 hours before the time of the request. Historical metrics are available only for 24 hours.</p>
148 pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
149 self.inner.get_start_time()
150 }
151 /// <p>The timestamp, in UNIX Epoch time format, at which to end the reporting interval for the retrieval of historical metrics data. The time must be specified using an interval of 5 minutes, such as 11:00, 11:05, 11:10, and must be later than the start time timestamp.</p>
152 /// <p>The time range between the start and end time must be less than 24 hours.</p>
153 pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
154 self.inner = self.inner.end_time(input);
155 self
156 }
157 /// <p>The timestamp, in UNIX Epoch time format, at which to end the reporting interval for the retrieval of historical metrics data. The time must be specified using an interval of 5 minutes, such as 11:00, 11:05, 11:10, and must be later than the start time timestamp.</p>
158 /// <p>The time range between the start and end time must be less than 24 hours.</p>
159 pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
160 self.inner = self.inner.set_end_time(input);
161 self
162 }
163 /// <p>The timestamp, in UNIX Epoch time format, at which to end the reporting interval for the retrieval of historical metrics data. The time must be specified using an interval of 5 minutes, such as 11:00, 11:05, 11:10, and must be later than the start time timestamp.</p>
164 /// <p>The time range between the start and end time must be less than 24 hours.</p>
165 pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
166 self.inner.get_end_time()
167 }
168 /// <p>The queues, up to 100, or channels, to use to filter the metrics returned. Metric data is retrieved only for the resources associated with the queues or channels included in the filter. You can include both queue IDs and queue ARNs in the same request. VOICE, CHAT, and TASK channels are supported.</p>
169 /// <p>RoutingStepExpression is not a valid filter for GetMetricData and we recommend switching to GetMetricDataV2 for more up-to-date features.</p><note>
170 /// <p>To filter by <code>Queues</code>, enter the queue ID/ARN, not the name of the queue.</p>
171 /// </note>
172 pub fn filters(mut self, input: crate::types::Filters) -> Self {
173 self.inner = self.inner.filters(input);
174 self
175 }
176 /// <p>The queues, up to 100, or channels, to use to filter the metrics returned. Metric data is retrieved only for the resources associated with the queues or channels included in the filter. You can include both queue IDs and queue ARNs in the same request. VOICE, CHAT, and TASK channels are supported.</p>
177 /// <p>RoutingStepExpression is not a valid filter for GetMetricData and we recommend switching to GetMetricDataV2 for more up-to-date features.</p><note>
178 /// <p>To filter by <code>Queues</code>, enter the queue ID/ARN, not the name of the queue.</p>
179 /// </note>
180 pub fn set_filters(mut self, input: ::std::option::Option<crate::types::Filters>) -> Self {
181 self.inner = self.inner.set_filters(input);
182 self
183 }
184 /// <p>The queues, up to 100, or channels, to use to filter the metrics returned. Metric data is retrieved only for the resources associated with the queues or channels included in the filter. You can include both queue IDs and queue ARNs in the same request. VOICE, CHAT, and TASK channels are supported.</p>
185 /// <p>RoutingStepExpression is not a valid filter for GetMetricData and we recommend switching to GetMetricDataV2 for more up-to-date features.</p><note>
186 /// <p>To filter by <code>Queues</code>, enter the queue ID/ARN, not the name of the queue.</p>
187 /// </note>
188 pub fn get_filters(&self) -> &::std::option::Option<crate::types::Filters> {
189 self.inner.get_filters()
190 }
191 ///
192 /// Appends an item to `Groupings`.
193 ///
194 /// To override the contents of this collection use [`set_groupings`](Self::set_groupings).
195 ///
196 /// <p>The grouping applied to the metrics returned. For example, when results are grouped by queue, the metrics returned are grouped by queue. The values returned apply to the metrics for each queue rather than aggregated for all queues.</p>
197 /// <p>If no grouping is specified, a summary of metrics for all queues is returned.</p>
198 /// <p>RoutingStepExpression is not a valid filter for GetMetricData and we recommend switching to GetMetricDataV2 for more up-to-date features.</p>
199 pub fn groupings(mut self, input: crate::types::Grouping) -> Self {
200 self.inner = self.inner.groupings(input);
201 self
202 }
203 /// <p>The grouping applied to the metrics returned. For example, when results are grouped by queue, the metrics returned are grouped by queue. The values returned apply to the metrics for each queue rather than aggregated for all queues.</p>
204 /// <p>If no grouping is specified, a summary of metrics for all queues is returned.</p>
205 /// <p>RoutingStepExpression is not a valid filter for GetMetricData and we recommend switching to GetMetricDataV2 for more up-to-date features.</p>
206 pub fn set_groupings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Grouping>>) -> Self {
207 self.inner = self.inner.set_groupings(input);
208 self
209 }
210 /// <p>The grouping applied to the metrics returned. For example, when results are grouped by queue, the metrics returned are grouped by queue. The values returned apply to the metrics for each queue rather than aggregated for all queues.</p>
211 /// <p>If no grouping is specified, a summary of metrics for all queues is returned.</p>
212 /// <p>RoutingStepExpression is not a valid filter for GetMetricData and we recommend switching to GetMetricDataV2 for more up-to-date features.</p>
213 pub fn get_groupings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Grouping>> {
214 self.inner.get_groupings()
215 }
216 ///
217 /// Appends an item to `HistoricalMetrics`.
218 ///
219 /// To override the contents of this collection use [`set_historical_metrics`](Self::set_historical_metrics).
220 ///
221 /// <p>The metrics to retrieve. Specify the name, unit, and statistic for each metric. The following historical metrics are available. For a description of each metric, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html">Metrics definition</a> in the <i>Amazon Connect Administrator Guide</i>.</p><note>
222 /// <p>This API does not support a contacts incoming metric (there's no CONTACTS_INCOMING metric missing from the documented list).</p>
223 /// </note>
224 /// <dl>
225 /// <dt>
226 /// ABANDON_TIME
227 /// </dt>
228 /// <dd>
229 /// <p>Unit: SECONDS</p>
230 /// <p>Statistic: AVG</p>
231 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#average-queue-abandon-time">Average queue abandon time</a></p>
232 /// </dd>
233 /// <dt>
234 /// AFTER_CONTACT_WORK_TIME
235 /// </dt>
236 /// <dd>
237 /// <p>Unit: SECONDS</p>
238 /// <p>Statistic: AVG</p>
239 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#after-contact-work-time">After contact work time</a></p>
240 /// </dd>
241 /// <dt>
242 /// API_CONTACTS_HANDLED
243 /// </dt>
244 /// <dd>
245 /// <p>Unit: COUNT</p>
246 /// <p>Statistic: SUM</p>
247 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#api-contacts-handled">API contacts handled</a></p>
248 /// </dd>
249 /// <dt>
250 /// AVG_HOLD_TIME
251 /// </dt>
252 /// <dd>
253 /// <p>Unit: SECONDS</p>
254 /// <p>Statistic: AVG</p>
255 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#average-customer-hold-time">Average customer hold time</a></p>
256 /// </dd>
257 /// <dt>
258 /// CALLBACK_CONTACTS_HANDLED
259 /// </dt>
260 /// <dd>
261 /// <p>Unit: COUNT</p>
262 /// <p>Statistic: SUM</p>
263 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#callback-contacts-handled">Callback contacts handled</a></p>
264 /// </dd>
265 /// <dt>
266 /// CONTACTS_ABANDONED
267 /// </dt>
268 /// <dd>
269 /// <p>Unit: COUNT</p>
270 /// <p>Statistic: SUM</p>
271 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-abandoned">Contacts abandoned</a></p>
272 /// </dd>
273 /// <dt>
274 /// CONTACTS_AGENT_HUNG_UP_FIRST
275 /// </dt>
276 /// <dd>
277 /// <p>Unit: COUNT</p>
278 /// <p>Statistic: SUM</p>
279 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-agent-hung-up-first">Contacts agent hung up first</a></p>
280 /// </dd>
281 /// <dt>
282 /// CONTACTS_CONSULTED
283 /// </dt>
284 /// <dd>
285 /// <p>Unit: COUNT</p>
286 /// <p>Statistic: SUM</p>
287 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-consulted">Contacts consulted</a></p>
288 /// </dd>
289 /// <dt>
290 /// CONTACTS_HANDLED
291 /// </dt>
292 /// <dd>
293 /// <p>Unit: COUNT</p>
294 /// <p>Statistic: SUM</p>
295 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-handled">Contacts handled</a></p>
296 /// </dd>
297 /// <dt>
298 /// CONTACTS_HANDLED_INCOMING
299 /// </dt>
300 /// <dd>
301 /// <p>Unit: COUNT</p>
302 /// <p>Statistic: SUM</p>
303 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-handled-incoming">Contacts handled incoming</a></p>
304 /// </dd>
305 /// <dt>
306 /// CONTACTS_HANDLED_OUTBOUND
307 /// </dt>
308 /// <dd>
309 /// <p>Unit: COUNT</p>
310 /// <p>Statistic: SUM</p>
311 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-handled-outbound">Contacts handled outbound</a></p>
312 /// </dd>
313 /// <dt>
314 /// CONTACTS_HOLD_ABANDONS
315 /// </dt>
316 /// <dd>
317 /// <p>Unit: COUNT</p>
318 /// <p>Statistic: SUM</p>
319 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-hold-disconnect">Contacts hold disconnect</a></p>
320 /// </dd>
321 /// <dt>
322 /// CONTACTS_MISSED
323 /// </dt>
324 /// <dd>
325 /// <p>Unit: COUNT</p>
326 /// <p>Statistic: SUM</p>
327 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#agent-non-response">AGENT_NON_RESPONSE</a></p>
328 /// </dd>
329 /// <dt>
330 /// CONTACTS_QUEUED
331 /// </dt>
332 /// <dd>
333 /// <p>Unit: COUNT</p>
334 /// <p>Statistic: SUM</p>
335 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-queued">Contacts queued</a></p>
336 /// </dd>
337 /// <dt>
338 /// CONTACTS_TRANSFERRED_IN
339 /// </dt>
340 /// <dd>
341 /// <p>Unit: COUNT</p>
342 /// <p>Statistic: SUM</p>
343 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-transferred-in">Contacts transferred in</a></p>
344 /// </dd>
345 /// <dt>
346 /// CONTACTS_TRANSFERRED_IN_FROM_QUEUE
347 /// </dt>
348 /// <dd>
349 /// <p>Unit: COUNT</p>
350 /// <p>Statistic: SUM</p>
351 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-transferred-out-queue">Contacts transferred out queue</a></p>
352 /// </dd>
353 /// <dt>
354 /// CONTACTS_TRANSFERRED_OUT
355 /// </dt>
356 /// <dd>
357 /// <p>Unit: COUNT</p>
358 /// <p>Statistic: SUM</p>
359 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-transferred-out">Contacts transferred out</a></p>
360 /// </dd>
361 /// <dt>
362 /// CONTACTS_TRANSFERRED_OUT_FROM_QUEUE
363 /// </dt>
364 /// <dd>
365 /// <p>Unit: COUNT</p>
366 /// <p>Statistic: SUM</p>
367 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-transferred-out-queue">Contacts transferred out queue</a></p>
368 /// </dd>
369 /// <dt>
370 /// HANDLE_TIME
371 /// </dt>
372 /// <dd>
373 /// <p>Unit: SECONDS</p>
374 /// <p>Statistic: AVG</p>
375 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#average-handle-time">Average handle time</a></p>
376 /// </dd>
377 /// <dt>
378 /// INTERACTION_AND_HOLD_TIME
379 /// </dt>
380 /// <dd>
381 /// <p>Unit: SECONDS</p>
382 /// <p>Statistic: AVG</p>
383 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#average-agent-interaction-and-customer-hold-time">Average agent interaction and customer hold time</a></p>
384 /// </dd>
385 /// <dt>
386 /// INTERACTION_TIME
387 /// </dt>
388 /// <dd>
389 /// <p>Unit: SECONDS</p>
390 /// <p>Statistic: AVG</p>
391 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#aaverage-agent-interaction-time">Average agent interaction time</a></p>
392 /// </dd>
393 /// <dt>
394 /// OCCUPANCY
395 /// </dt>
396 /// <dd>
397 /// <p>Unit: PERCENT</p>
398 /// <p>Statistic: AVG</p>
399 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#occupancy">Occupancy</a></p>
400 /// </dd>
401 /// <dt>
402 /// QUEUE_ANSWER_TIME
403 /// </dt>
404 /// <dd>
405 /// <p>Unit: SECONDS</p>
406 /// <p>Statistic: AVG</p>
407 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html##average-queue-answer-time">Average queue answer time</a></p>
408 /// </dd>
409 /// <dt>
410 /// QUEUED_TIME
411 /// </dt>
412 /// <dd>
413 /// <p>Unit: SECONDS</p>
414 /// <p>Statistic: MAX</p>
415 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#minimum-flow-time">Minimum flow time</a></p>
416 /// </dd>
417 /// <dt>
418 /// SERVICE_LEVEL
419 /// </dt>
420 /// <dd>
421 /// <p>You can include up to 20 SERVICE_LEVEL metrics in a request.</p>
422 /// <p>Unit: PERCENT</p>
423 /// <p>Statistic: AVG</p>
424 /// <p>Threshold: For <code>ThresholdValue</code>, enter any whole number from 1 to 604800 (inclusive), in seconds. For <code>Comparison</code>, you must enter <code>LT</code> (for "Less than").</p>
425 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#average-queue-abandon-time">Average queue abandon time</a></p>
426 /// </dd>
427 /// </dl>
428 pub fn historical_metrics(mut self, input: crate::types::HistoricalMetric) -> Self {
429 self.inner = self.inner.historical_metrics(input);
430 self
431 }
432 /// <p>The metrics to retrieve. Specify the name, unit, and statistic for each metric. The following historical metrics are available. For a description of each metric, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html">Metrics definition</a> in the <i>Amazon Connect Administrator Guide</i>.</p><note>
433 /// <p>This API does not support a contacts incoming metric (there's no CONTACTS_INCOMING metric missing from the documented list).</p>
434 /// </note>
435 /// <dl>
436 /// <dt>
437 /// ABANDON_TIME
438 /// </dt>
439 /// <dd>
440 /// <p>Unit: SECONDS</p>
441 /// <p>Statistic: AVG</p>
442 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#average-queue-abandon-time">Average queue abandon time</a></p>
443 /// </dd>
444 /// <dt>
445 /// AFTER_CONTACT_WORK_TIME
446 /// </dt>
447 /// <dd>
448 /// <p>Unit: SECONDS</p>
449 /// <p>Statistic: AVG</p>
450 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#after-contact-work-time">After contact work time</a></p>
451 /// </dd>
452 /// <dt>
453 /// API_CONTACTS_HANDLED
454 /// </dt>
455 /// <dd>
456 /// <p>Unit: COUNT</p>
457 /// <p>Statistic: SUM</p>
458 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#api-contacts-handled">API contacts handled</a></p>
459 /// </dd>
460 /// <dt>
461 /// AVG_HOLD_TIME
462 /// </dt>
463 /// <dd>
464 /// <p>Unit: SECONDS</p>
465 /// <p>Statistic: AVG</p>
466 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#average-customer-hold-time">Average customer hold time</a></p>
467 /// </dd>
468 /// <dt>
469 /// CALLBACK_CONTACTS_HANDLED
470 /// </dt>
471 /// <dd>
472 /// <p>Unit: COUNT</p>
473 /// <p>Statistic: SUM</p>
474 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#callback-contacts-handled">Callback contacts handled</a></p>
475 /// </dd>
476 /// <dt>
477 /// CONTACTS_ABANDONED
478 /// </dt>
479 /// <dd>
480 /// <p>Unit: COUNT</p>
481 /// <p>Statistic: SUM</p>
482 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-abandoned">Contacts abandoned</a></p>
483 /// </dd>
484 /// <dt>
485 /// CONTACTS_AGENT_HUNG_UP_FIRST
486 /// </dt>
487 /// <dd>
488 /// <p>Unit: COUNT</p>
489 /// <p>Statistic: SUM</p>
490 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-agent-hung-up-first">Contacts agent hung up first</a></p>
491 /// </dd>
492 /// <dt>
493 /// CONTACTS_CONSULTED
494 /// </dt>
495 /// <dd>
496 /// <p>Unit: COUNT</p>
497 /// <p>Statistic: SUM</p>
498 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-consulted">Contacts consulted</a></p>
499 /// </dd>
500 /// <dt>
501 /// CONTACTS_HANDLED
502 /// </dt>
503 /// <dd>
504 /// <p>Unit: COUNT</p>
505 /// <p>Statistic: SUM</p>
506 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-handled">Contacts handled</a></p>
507 /// </dd>
508 /// <dt>
509 /// CONTACTS_HANDLED_INCOMING
510 /// </dt>
511 /// <dd>
512 /// <p>Unit: COUNT</p>
513 /// <p>Statistic: SUM</p>
514 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-handled-incoming">Contacts handled incoming</a></p>
515 /// </dd>
516 /// <dt>
517 /// CONTACTS_HANDLED_OUTBOUND
518 /// </dt>
519 /// <dd>
520 /// <p>Unit: COUNT</p>
521 /// <p>Statistic: SUM</p>
522 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-handled-outbound">Contacts handled outbound</a></p>
523 /// </dd>
524 /// <dt>
525 /// CONTACTS_HOLD_ABANDONS
526 /// </dt>
527 /// <dd>
528 /// <p>Unit: COUNT</p>
529 /// <p>Statistic: SUM</p>
530 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-hold-disconnect">Contacts hold disconnect</a></p>
531 /// </dd>
532 /// <dt>
533 /// CONTACTS_MISSED
534 /// </dt>
535 /// <dd>
536 /// <p>Unit: COUNT</p>
537 /// <p>Statistic: SUM</p>
538 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#agent-non-response">AGENT_NON_RESPONSE</a></p>
539 /// </dd>
540 /// <dt>
541 /// CONTACTS_QUEUED
542 /// </dt>
543 /// <dd>
544 /// <p>Unit: COUNT</p>
545 /// <p>Statistic: SUM</p>
546 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-queued">Contacts queued</a></p>
547 /// </dd>
548 /// <dt>
549 /// CONTACTS_TRANSFERRED_IN
550 /// </dt>
551 /// <dd>
552 /// <p>Unit: COUNT</p>
553 /// <p>Statistic: SUM</p>
554 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-transferred-in">Contacts transferred in</a></p>
555 /// </dd>
556 /// <dt>
557 /// CONTACTS_TRANSFERRED_IN_FROM_QUEUE
558 /// </dt>
559 /// <dd>
560 /// <p>Unit: COUNT</p>
561 /// <p>Statistic: SUM</p>
562 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-transferred-out-queue">Contacts transferred out queue</a></p>
563 /// </dd>
564 /// <dt>
565 /// CONTACTS_TRANSFERRED_OUT
566 /// </dt>
567 /// <dd>
568 /// <p>Unit: COUNT</p>
569 /// <p>Statistic: SUM</p>
570 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-transferred-out">Contacts transferred out</a></p>
571 /// </dd>
572 /// <dt>
573 /// CONTACTS_TRANSFERRED_OUT_FROM_QUEUE
574 /// </dt>
575 /// <dd>
576 /// <p>Unit: COUNT</p>
577 /// <p>Statistic: SUM</p>
578 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-transferred-out-queue">Contacts transferred out queue</a></p>
579 /// </dd>
580 /// <dt>
581 /// HANDLE_TIME
582 /// </dt>
583 /// <dd>
584 /// <p>Unit: SECONDS</p>
585 /// <p>Statistic: AVG</p>
586 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#average-handle-time">Average handle time</a></p>
587 /// </dd>
588 /// <dt>
589 /// INTERACTION_AND_HOLD_TIME
590 /// </dt>
591 /// <dd>
592 /// <p>Unit: SECONDS</p>
593 /// <p>Statistic: AVG</p>
594 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#average-agent-interaction-and-customer-hold-time">Average agent interaction and customer hold time</a></p>
595 /// </dd>
596 /// <dt>
597 /// INTERACTION_TIME
598 /// </dt>
599 /// <dd>
600 /// <p>Unit: SECONDS</p>
601 /// <p>Statistic: AVG</p>
602 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#aaverage-agent-interaction-time">Average agent interaction time</a></p>
603 /// </dd>
604 /// <dt>
605 /// OCCUPANCY
606 /// </dt>
607 /// <dd>
608 /// <p>Unit: PERCENT</p>
609 /// <p>Statistic: AVG</p>
610 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#occupancy">Occupancy</a></p>
611 /// </dd>
612 /// <dt>
613 /// QUEUE_ANSWER_TIME
614 /// </dt>
615 /// <dd>
616 /// <p>Unit: SECONDS</p>
617 /// <p>Statistic: AVG</p>
618 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html##average-queue-answer-time">Average queue answer time</a></p>
619 /// </dd>
620 /// <dt>
621 /// QUEUED_TIME
622 /// </dt>
623 /// <dd>
624 /// <p>Unit: SECONDS</p>
625 /// <p>Statistic: MAX</p>
626 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#minimum-flow-time">Minimum flow time</a></p>
627 /// </dd>
628 /// <dt>
629 /// SERVICE_LEVEL
630 /// </dt>
631 /// <dd>
632 /// <p>You can include up to 20 SERVICE_LEVEL metrics in a request.</p>
633 /// <p>Unit: PERCENT</p>
634 /// <p>Statistic: AVG</p>
635 /// <p>Threshold: For <code>ThresholdValue</code>, enter any whole number from 1 to 604800 (inclusive), in seconds. For <code>Comparison</code>, you must enter <code>LT</code> (for "Less than").</p>
636 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#average-queue-abandon-time">Average queue abandon time</a></p>
637 /// </dd>
638 /// </dl>
639 pub fn set_historical_metrics(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::HistoricalMetric>>) -> Self {
640 self.inner = self.inner.set_historical_metrics(input);
641 self
642 }
643 /// <p>The metrics to retrieve. Specify the name, unit, and statistic for each metric. The following historical metrics are available. For a description of each metric, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html">Metrics definition</a> in the <i>Amazon Connect Administrator Guide</i>.</p><note>
644 /// <p>This API does not support a contacts incoming metric (there's no CONTACTS_INCOMING metric missing from the documented list).</p>
645 /// </note>
646 /// <dl>
647 /// <dt>
648 /// ABANDON_TIME
649 /// </dt>
650 /// <dd>
651 /// <p>Unit: SECONDS</p>
652 /// <p>Statistic: AVG</p>
653 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#average-queue-abandon-time">Average queue abandon time</a></p>
654 /// </dd>
655 /// <dt>
656 /// AFTER_CONTACT_WORK_TIME
657 /// </dt>
658 /// <dd>
659 /// <p>Unit: SECONDS</p>
660 /// <p>Statistic: AVG</p>
661 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#after-contact-work-time">After contact work time</a></p>
662 /// </dd>
663 /// <dt>
664 /// API_CONTACTS_HANDLED
665 /// </dt>
666 /// <dd>
667 /// <p>Unit: COUNT</p>
668 /// <p>Statistic: SUM</p>
669 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#api-contacts-handled">API contacts handled</a></p>
670 /// </dd>
671 /// <dt>
672 /// AVG_HOLD_TIME
673 /// </dt>
674 /// <dd>
675 /// <p>Unit: SECONDS</p>
676 /// <p>Statistic: AVG</p>
677 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#average-customer-hold-time">Average customer hold time</a></p>
678 /// </dd>
679 /// <dt>
680 /// CALLBACK_CONTACTS_HANDLED
681 /// </dt>
682 /// <dd>
683 /// <p>Unit: COUNT</p>
684 /// <p>Statistic: SUM</p>
685 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#callback-contacts-handled">Callback contacts handled</a></p>
686 /// </dd>
687 /// <dt>
688 /// CONTACTS_ABANDONED
689 /// </dt>
690 /// <dd>
691 /// <p>Unit: COUNT</p>
692 /// <p>Statistic: SUM</p>
693 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-abandoned">Contacts abandoned</a></p>
694 /// </dd>
695 /// <dt>
696 /// CONTACTS_AGENT_HUNG_UP_FIRST
697 /// </dt>
698 /// <dd>
699 /// <p>Unit: COUNT</p>
700 /// <p>Statistic: SUM</p>
701 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-agent-hung-up-first">Contacts agent hung up first</a></p>
702 /// </dd>
703 /// <dt>
704 /// CONTACTS_CONSULTED
705 /// </dt>
706 /// <dd>
707 /// <p>Unit: COUNT</p>
708 /// <p>Statistic: SUM</p>
709 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-consulted">Contacts consulted</a></p>
710 /// </dd>
711 /// <dt>
712 /// CONTACTS_HANDLED
713 /// </dt>
714 /// <dd>
715 /// <p>Unit: COUNT</p>
716 /// <p>Statistic: SUM</p>
717 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-handled">Contacts handled</a></p>
718 /// </dd>
719 /// <dt>
720 /// CONTACTS_HANDLED_INCOMING
721 /// </dt>
722 /// <dd>
723 /// <p>Unit: COUNT</p>
724 /// <p>Statistic: SUM</p>
725 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-handled-incoming">Contacts handled incoming</a></p>
726 /// </dd>
727 /// <dt>
728 /// CONTACTS_HANDLED_OUTBOUND
729 /// </dt>
730 /// <dd>
731 /// <p>Unit: COUNT</p>
732 /// <p>Statistic: SUM</p>
733 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-handled-outbound">Contacts handled outbound</a></p>
734 /// </dd>
735 /// <dt>
736 /// CONTACTS_HOLD_ABANDONS
737 /// </dt>
738 /// <dd>
739 /// <p>Unit: COUNT</p>
740 /// <p>Statistic: SUM</p>
741 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-hold-disconnect">Contacts hold disconnect</a></p>
742 /// </dd>
743 /// <dt>
744 /// CONTACTS_MISSED
745 /// </dt>
746 /// <dd>
747 /// <p>Unit: COUNT</p>
748 /// <p>Statistic: SUM</p>
749 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#agent-non-response">AGENT_NON_RESPONSE</a></p>
750 /// </dd>
751 /// <dt>
752 /// CONTACTS_QUEUED
753 /// </dt>
754 /// <dd>
755 /// <p>Unit: COUNT</p>
756 /// <p>Statistic: SUM</p>
757 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-queued">Contacts queued</a></p>
758 /// </dd>
759 /// <dt>
760 /// CONTACTS_TRANSFERRED_IN
761 /// </dt>
762 /// <dd>
763 /// <p>Unit: COUNT</p>
764 /// <p>Statistic: SUM</p>
765 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-transferred-in">Contacts transferred in</a></p>
766 /// </dd>
767 /// <dt>
768 /// CONTACTS_TRANSFERRED_IN_FROM_QUEUE
769 /// </dt>
770 /// <dd>
771 /// <p>Unit: COUNT</p>
772 /// <p>Statistic: SUM</p>
773 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-transferred-out-queue">Contacts transferred out queue</a></p>
774 /// </dd>
775 /// <dt>
776 /// CONTACTS_TRANSFERRED_OUT
777 /// </dt>
778 /// <dd>
779 /// <p>Unit: COUNT</p>
780 /// <p>Statistic: SUM</p>
781 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-transferred-out">Contacts transferred out</a></p>
782 /// </dd>
783 /// <dt>
784 /// CONTACTS_TRANSFERRED_OUT_FROM_QUEUE
785 /// </dt>
786 /// <dd>
787 /// <p>Unit: COUNT</p>
788 /// <p>Statistic: SUM</p>
789 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-transferred-out-queue">Contacts transferred out queue</a></p>
790 /// </dd>
791 /// <dt>
792 /// HANDLE_TIME
793 /// </dt>
794 /// <dd>
795 /// <p>Unit: SECONDS</p>
796 /// <p>Statistic: AVG</p>
797 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#average-handle-time">Average handle time</a></p>
798 /// </dd>
799 /// <dt>
800 /// INTERACTION_AND_HOLD_TIME
801 /// </dt>
802 /// <dd>
803 /// <p>Unit: SECONDS</p>
804 /// <p>Statistic: AVG</p>
805 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#average-agent-interaction-and-customer-hold-time">Average agent interaction and customer hold time</a></p>
806 /// </dd>
807 /// <dt>
808 /// INTERACTION_TIME
809 /// </dt>
810 /// <dd>
811 /// <p>Unit: SECONDS</p>
812 /// <p>Statistic: AVG</p>
813 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#aaverage-agent-interaction-time">Average agent interaction time</a></p>
814 /// </dd>
815 /// <dt>
816 /// OCCUPANCY
817 /// </dt>
818 /// <dd>
819 /// <p>Unit: PERCENT</p>
820 /// <p>Statistic: AVG</p>
821 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#occupancy">Occupancy</a></p>
822 /// </dd>
823 /// <dt>
824 /// QUEUE_ANSWER_TIME
825 /// </dt>
826 /// <dd>
827 /// <p>Unit: SECONDS</p>
828 /// <p>Statistic: AVG</p>
829 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html##average-queue-answer-time">Average queue answer time</a></p>
830 /// </dd>
831 /// <dt>
832 /// QUEUED_TIME
833 /// </dt>
834 /// <dd>
835 /// <p>Unit: SECONDS</p>
836 /// <p>Statistic: MAX</p>
837 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#minimum-flow-time">Minimum flow time</a></p>
838 /// </dd>
839 /// <dt>
840 /// SERVICE_LEVEL
841 /// </dt>
842 /// <dd>
843 /// <p>You can include up to 20 SERVICE_LEVEL metrics in a request.</p>
844 /// <p>Unit: PERCENT</p>
845 /// <p>Statistic: AVG</p>
846 /// <p>Threshold: For <code>ThresholdValue</code>, enter any whole number from 1 to 604800 (inclusive), in seconds. For <code>Comparison</code>, you must enter <code>LT</code> (for "Less than").</p>
847 /// <p>UI name: <a href="https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#average-queue-abandon-time">Average queue abandon time</a></p>
848 /// </dd>
849 /// </dl>
850 pub fn get_historical_metrics(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::HistoricalMetric>> {
851 self.inner.get_historical_metrics()
852 }
853 /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
854 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
855 self.inner = self.inner.next_token(input.into());
856 self
857 }
858 /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
859 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
860 self.inner = self.inner.set_next_token(input);
861 self
862 }
863 /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
864 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
865 self.inner.get_next_token()
866 }
867 /// <p>The maximum number of results to return per page.</p>
868 pub fn max_results(mut self, input: i32) -> Self {
869 self.inner = self.inner.max_results(input);
870 self
871 }
872 /// <p>The maximum number of results to return per page.</p>
873 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
874 self.inner = self.inner.set_max_results(input);
875 self
876 }
877 /// <p>The maximum number of results to return per page.</p>
878 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
879 self.inner.get_max_results()
880 }
881}