hanzo_client/models/call.rs
1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Call {
16 /// Agent names the Hanzo assistant handling the call. Set means the call was answered by that assistant rather than connected to a person.
17 #[serde(rename = "agent", skip_serializing_if = "Option::is_none")]
18 pub agent: Option<String>,
19 /// From is the calling number in E.164. It must be one this org holds: a carrier refuses an origination from a number nobody proved they own.
20 #[serde(rename = "from", skip_serializing_if = "Option::is_none")]
21 pub from: Option<String>,
22 /// ID is the carrier's handle for the call — what a hangup or a lookup names.
23 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
24 pub id: Option<String>,
25 /// Org is the tenant the call was placed for or received by.
26 #[serde(rename = "org", skip_serializing_if = "Option::is_none")]
27 pub org: Option<String>,
28 /// Status is where the call is: \"queued\", \"ringing\", \"answered\", \"completed\" or \"failed\". Only the last two are terminal.
29 #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
30 pub status: Option<String>,
31 /// To is the called number in E.164.
32 #[serde(rename = "to", skip_serializing_if = "Option::is_none")]
33 pub to: Option<String>,
34}
35
36impl Call {
37 pub fn new() -> Call {
38 Call {
39 agent: None,
40 from: None,
41 id: None,
42 org: None,
43 status: None,
44 to: None,
45 }
46 }
47}
48