vapi_client/models/
call_log_privileged.rs

1/*
2 * Vapi API
3 *
4 * API for building voice assistants
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CallLogPrivileged {
17    /// This is the unique identifier for the call.
18    #[serde(rename = "callId")]
19    pub call_id: String,
20    /// This is the unique identifier for the org that this call log belongs to.
21    #[serde(rename = "orgId")]
22    pub org_id: String,
23    /// This is the log message associated with the call.
24    #[serde(rename = "log")]
25    pub log: String,
26    /// This is the level of the log message.
27    #[serde(rename = "level")]
28    pub level: Level,
29    /// This is the ISO 8601 date-time string of when the log was created.
30    #[serde(rename = "time")]
31    pub time: String,
32}
33
34impl CallLogPrivileged {
35    pub fn new(
36        call_id: String,
37        org_id: String,
38        log: String,
39        level: Level,
40        time: String,
41    ) -> CallLogPrivileged {
42        CallLogPrivileged {
43            call_id,
44            org_id,
45            log,
46            level,
47            time,
48        }
49    }
50}
51/// This is the level of the log message.
52#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
53pub enum Level {
54    #[serde(rename = "INFO")]
55    Info,
56    #[serde(rename = "LOG")]
57    Log,
58    #[serde(rename = "WARN")]
59    Warn,
60    #[serde(rename = "ERROR")]
61    Error,
62    #[serde(rename = "CHECKPOINT")]
63    Checkpoint,
64}
65
66impl Default for Level {
67    fn default() -> Level {
68        Self::Info
69    }
70}