gong_rs/models/call_basic_data.rs
1/*
2 * Gong API
3 *
4 * <h2>Overview</h2> <p> The Gong API allows you to: </p> <ol> <li> Receive the following information from Gong: <ol type=\"a\"> <li> Your company's <a href=\"#tag--Calls\">calls</a> in Gong </li> <li> Your company's <a href=\"#tag--Users\">users</a> in Gong </li> <li> Your company's user <a href=\"#tag--Stats\">stats</a> in Gong </li> <li> Your company's user <a href=\"#tag--Settings\">settings</a> in Gong </li> <li> Your company's <a href=\"#tag--Library\">libraries</a> in Gong </li> </ol></li> <li> <a href=\"#post-/v2/calls\">Upload</a> new or <a href=\"#put-/v2/calls/-id-/media\">update</a> call recordings in Gong, in order to support cases where you have an internal system that records calls or obtains them from a third-party entity. </li> <li> <a href=\"#post-/v2/data-privacy/erase-data-for-email-address\">Data Privacy</a>: Delete users and all their associated elements.</li> <li> Upload <a href=\"#tag--CRM\">CRM</a> data into Gong. </li> </ol> <p>Check <a href=\"https://app.gong.io/company/api-authentication?currentTab=MY_API_TAB\">here</a> what's your base URL for all API calls. </p> <h2>Authentication</h2> <p> There are two ways to retrieve credentials to the Gong Public API: </p> <ol><li>Retrieve Manually:<br> <p> In the <a href=\"https://app.gong.io/company/api\">Gong API Page</a> (you must be a technical administrator in Gong), click \"Create\" to receive an <b>Access Key</b> and an <b>Access Key Secret</b>.<br> </p> <p> Use the Basic Authorization HTTP header (as per <a target=\"_blank\" href=\"https://www.rfc-editor.org/rfc/rfc7617.txt\">RFC</a>) to access the Public API as shown below:<br> <code>Authorization: Basic <token></code><br> </p> <p> To create the basic token, combine the <b>Access Key</b> and the <b>Access Key Secret</b> with colon (:) and then encode in Base64 as following:<br> <code>Base64(<accessKey> : <accessKeySecret>)</code><br><br> </p></li> <li>Retrieve through OAuth<br> <p> To obtain the Bearer token, follow the steps described in the <a target=\"_blank\" href=\"https://help.gong.io/hc/en-us/articles/13944551222157-Create-an-app-for-Gong\">Gong OAuth Guide</a>. <br></p> <p> After obtaining the token, use the Bearer Authorization HTTP header (as per <a target=\"_blank\" href=\"https://www.rfc-editor.org/rfc/rfc6750.txt\">RFC</a>) to access the Public API as shown below:<br> <code>Authorization: Bearer <token></code> </p> </li></ol> <h2>Limits</h2> <p> By default Gong limits your company's access to the service to 3 API calls per second, and 10,000 API calls per day. </p> <p> When the rate of API calls exceeds these limits an HTTP status code <b>429</b> is returned and a <b>Retry-After</b> header indicates how many seconds to wait before making a new request. </p><p> If required, contact <a target=\"_blank\" href=\"https://help.gong.io\">help.gong.io</a> to change these limits. </p> <h2>Cursors</h2> <p> Some API calls that return a list are limited in the amount of records they may return, so multiple API calls may be required to bring all records. Such an API call also returns a <b>records</b> field, which contains the number of records in the current page, the current page number and the total number of records. </p> <p> In cases where the total number of records exceeds the number of records thus far retrieved, the <b>records</b> field will also contain a <b>cursor</b> field which can be used to access the next page of records. To retrieve the next page, repeat the API call with the <b>cursor</b> value as supplied by the previous API call. All other request inputs should remain the same. </p> <h2>Forward Compatibility</h2> <p> When coding a system to accept Gong data, take into account that Gong may, without prior warning, add fields to the JSON output. It is recommended to future proof your code so that it disregards all JSON fields you don't actually use. </p><p></p>
5 *
6 * The version of the OpenAPI document: V2
7 * Contact: mail@cedric-ziel.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// CallBasicData : call's metadata.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CallBasicData {
17 /// Gong's unique numeric identifier for the call (up to 20 digits).
18 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
19 pub id: Option<String>,
20 /// The URL to the page in the Gong web application where the call is available.
21 #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
22 pub url: Option<String>,
23 /// The title of the call.
24 #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
25 pub title: Option<String>,
26 /// Scheduled date and time of the call in the ISO-8601 format (e.g., '2018-02-18T02:30:00-07:00' or '2018-02-18T08:00:00Z', where Z stands for UTC).
27 #[serde(rename = "scheduled", skip_serializing_if = "Option::is_none")]
28 pub scheduled: Option<String>,
29 /// The date and time when the call was recorded in the ISO-8601 format (e.g., '2018-02-18T02:30:00-07:00' or '2018-02-18T08:00:00Z', where Z stands for UTC).
30 #[serde(rename = "started", skip_serializing_if = "Option::is_none")]
31 pub started: Option<String>,
32 /// The duration of the call, in seconds.
33 #[serde(rename = "duration", skip_serializing_if = "Option::is_none")]
34 pub duration: Option<i64>,
35 /// The primary user ID of the team member who hosted the call.
36 #[serde(rename = "primaryUserId", skip_serializing_if = "Option::is_none")]
37 pub primary_user_id: Option<String>,
38 /// Call direction.
39 #[serde(rename = "direction", skip_serializing_if = "Option::is_none")]
40 pub direction: Option<Direction>,
41 /// The system with which the call was carried out (e.g., WebEx, ShoreTel, etc.).
42 #[serde(rename = "system", skip_serializing_if = "Option::is_none")]
43 pub system: Option<String>,
44 /// The scope of the call: 'internal' if all the participants are from the company, 'external' if some participants are not from the company, or 'unknown' if the scope is unknown.
45 #[serde(rename = "scope", skip_serializing_if = "Option::is_none")]
46 pub scope: Option<Scope>,
47 /// Media type
48 #[serde(rename = "media", skip_serializing_if = "Option::is_none")]
49 pub media: Option<Media>,
50 /// The language codes (as defined by ISO-639-2B). E.g., eng, fre, spa, ger, and ita. Also used are und (unsupported language), and zxx (not enough speech content for identification).
51 #[serde(rename = "language", skip_serializing_if = "Option::is_none")]
52 pub language: Option<String>,
53 /// Gong's unique numeric identifier for the call's workspace (up to 20 digits).
54 #[serde(rename = "workspaceId", skip_serializing_if = "Option::is_none")]
55 pub workspace_id: Option<String>,
56 /// The SDR disposition of the call. This can be an automated value provided by the provider, or manually entered by the rep.
57 #[serde(rename = "sdrDisposition", skip_serializing_if = "Option::is_none")]
58 pub sdr_disposition: Option<String>,
59 /// The call's unique identifier in the origin recording system (typically a telephony recording system). The identifier is provided to Gong during the call creation via the Public API or through telephony systems integrations.
60 #[serde(rename = "clientUniqueId", skip_serializing_if = "Option::is_none")]
61 pub client_unique_id: Option<String>,
62 /// Metadata as was provided to Gong during the call creation via the Public API.
63 #[serde(rename = "customData", skip_serializing_if = "Option::is_none")]
64 pub custom_data: Option<String>,
65 /// The purpose of the call.
66 #[serde(rename = "purpose", skip_serializing_if = "Option::is_none")]
67 pub purpose: Option<String>,
68 /// The meeting provider URL on which the web conference was recorded.
69 #[serde(rename = "meetingUrl", skip_serializing_if = "Option::is_none")]
70 pub meeting_url: Option<String>,
71 /// If the call is private.
72 #[serde(rename = "isPrivate", skip_serializing_if = "Option::is_none")]
73 pub is_private: Option<bool>,
74 /// The Id of the meeting in Google or Outlook Calendar.
75 #[serde(rename = "calendarEventId", skip_serializing_if = "Option::is_none")]
76 pub calendar_event_id: Option<String>,
77}
78
79impl CallBasicData {
80 /// call's metadata.
81 pub fn new() -> CallBasicData {
82 CallBasicData {
83 id: None,
84 url: None,
85 title: None,
86 scheduled: None,
87 started: None,
88 duration: None,
89 primary_user_id: None,
90 direction: None,
91 system: None,
92 scope: None,
93 media: None,
94 language: None,
95 workspace_id: None,
96 sdr_disposition: None,
97 client_unique_id: None,
98 custom_data: None,
99 purpose: None,
100 meeting_url: None,
101 is_private: None,
102 calendar_event_id: None,
103 }
104 }
105}
106/// Call direction.
107#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
108pub enum Direction {
109 #[serde(rename = "Inbound")]
110 Inbound,
111 #[serde(rename = "Outbound")]
112 Outbound,
113 #[serde(rename = "Conference")]
114 Conference,
115 #[serde(rename = "Unknown")]
116 Unknown,
117}
118
119impl Default for Direction {
120 fn default() -> Direction {
121 Self::Inbound
122 }
123}
124/// The scope of the call: 'internal' if all the participants are from the company, 'external' if some participants are not from the company, or 'unknown' if the scope is unknown.
125#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
126pub enum Scope {
127 #[serde(rename = "Internal")]
128 Internal,
129 #[serde(rename = "External")]
130 External,
131 #[serde(rename = "Unknown")]
132 Unknown,
133}
134
135impl Default for Scope {
136 fn default() -> Scope {
137 Self::Internal
138 }
139}
140/// Media type
141#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
142pub enum Media {
143 #[serde(rename = "Video")]
144 Video,
145 #[serde(rename = "Audio")]
146 Audio,
147}
148
149impl Default for Media {
150 fn default() -> Media {
151 Self::Video
152 }
153}
154