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
/*
* Manager API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.0-dev
* Contact: support@babelforce.com
* Generated by: https://openapi-generator.tech
*/
use crate::gen::manager::models;
use serde::{Deserialize, Serialize};
/// ReportingCall : A call in the condensed reporting shape, carrying the per-call timing metrics (wait, queue, bridge, talk, hold, wrap-up and handle time) alongside the handling agent and queue. All durations are in seconds.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ReportingCall {
/// The unique Identifier (UUID) of the object
#[serde(rename = "id")]
pub id: uuid::Uuid,
/// The unique Identifier (UUID) of the object
#[serde(rename = "sessionId")]
pub session_id: uuid::Uuid,
/// When the call started.
#[serde(rename = "dateCreated")]
pub date_created: chrono::DateTime<chrono::FixedOffset>,
/// When the reporting record was last updated.
#[serde(rename = "lastUpdated")]
pub last_updated: chrono::DateTime<chrono::FixedOffset>,
#[serde(rename = "type")]
pub r#type: models::ReportingCallType,
/// Name of the queue that handled the call, if any.
#[serde(rename = "queueName", skip_serializing_if = "Option::is_none")]
pub queue_name: Option<String>,
/// Name of the agent who handled the call, if any.
#[serde(rename = "agentName", skip_serializing_if = "Option::is_none")]
pub agent_name: Option<String>,
/// Whether the call was bridged to an agent.
#[serde(rename = "bridged")]
pub bridged: bool,
/// Total call duration, in seconds.
#[serde(rename = "duration")]
pub duration: i32,
/// Time the caller waited before the call was answered, in seconds.
#[serde(rename = "waitTime")]
pub wait_time: i32,
/// Time the call spent waiting in queue, in seconds.
#[serde(rename = "queueWaitTime")]
pub queue_wait_time: i32,
/// Time until the call was bridged to an agent, in seconds.
#[serde(rename = "bridgeTime")]
pub bridge_time: i32,
/// Time spent in conversation, in seconds.
#[serde(rename = "talkTime")]
pub talk_time: i32,
/// Time the call was on hold, in seconds.
#[serde(rename = "holdTime")]
pub hold_time: i32,
/// Agent wrap-up (after-call work) time, in seconds.
#[serde(rename = "wrapupTime")]
pub wrapup_time: i32,
/// Total agent handle time (talk + hold + wrap-up), in seconds.
#[serde(rename = "handleTime")]
pub handle_time: i32,
}
impl ReportingCall {
/// A call in the condensed reporting shape, carrying the per-call timing metrics (wait, queue, bridge, talk, hold, wrap-up and handle time) alongside the handling agent and queue. All durations are in seconds.
pub fn new(
id: uuid::Uuid,
session_id: uuid::Uuid,
date_created: chrono::DateTime<chrono::FixedOffset>,
last_updated: chrono::DateTime<chrono::FixedOffset>,
r#type: models::ReportingCallType,
bridged: bool,
duration: i32,
wait_time: i32,
queue_wait_time: i32,
bridge_time: i32,
talk_time: i32,
hold_time: i32,
wrapup_time: i32,
handle_time: i32,
) -> ReportingCall {
ReportingCall {
id,
session_id,
date_created,
last_updated,
r#type,
queue_name: None,
agent_name: None,
bridged,
duration,
wait_time,
queue_wait_time,
bridge_time,
talk_time,
hold_time,
wrapup_time,
handle_time,
}
}
}