Skip to main content

hanzo_client/models/
call_input.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 CallInput {
16    /// Agent hands the answered call to a Hanzo assistant by name instead of connecting it to a person. Empty places an ordinary call.
17    #[serde(rename = "agent", skip_serializing_if = "Option::is_none")]
18    pub agent: Option<String>,
19    /// From is the number to call FROM, in E.164. It must be one this org holds.
20    #[serde(rename = "from", skip_serializing_if = "Option::is_none")]
21    pub from: Option<String>,
22    /// Record is a per-call flag rather than a product. Where a recording lands and how long it is kept is the org's retention policy, not this call's.
23    #[serde(rename = "record", skip_serializing_if = "Option::is_none")]
24    pub record: Option<bool>,
25    /// To is the number to call, in E.164.
26    #[serde(rename = "to", skip_serializing_if = "Option::is_none")]
27    pub to: Option<String>,
28    /// Webhook is a URL the carrier posts this call's events to as it progresses. Empty means the call's outcome is only visible by reading it back.
29    #[serde(rename = "webhook", skip_serializing_if = "Option::is_none")]
30    pub webhook: Option<String>,
31}
32
33impl CallInput {
34    pub fn new() -> CallInput {
35        CallInput {
36            agent: None,
37            from: None,
38            record: None,
39            to: None,
40            webhook: None,
41        }
42    }
43}
44