vapi_client/models/
call_log_privileged.rs

1/*
2 * Vapi API
3 *
4 * Voice AI for developers.
5 *
6 * The version of the OpenAPI document: 1.0
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 CallLogPrivileged {
16    /// This is the unique identifier for the call.
17    #[serde(rename = "callId")]
18    pub call_id: String,
19    /// This is the unique identifier for the org that this call log belongs to.
20    #[serde(rename = "orgId")]
21    pub org_id: String,
22    /// This is the log message associated with the call.
23    #[serde(rename = "log")]
24    pub log: String,
25    /// This is the level of the log message.
26    #[serde(rename = "level")]
27    pub level: Level,
28    /// This is the ISO 8601 date-time string of when the log was created.
29    #[serde(rename = "time")]
30    pub time: String,
31}
32
33impl CallLogPrivileged {
34    pub fn new(call_id: String, org_id: String, log: String, level: Level, time: String) -> CallLogPrivileged {
35        CallLogPrivileged {
36            call_id,
37            org_id,
38            log,
39            level,
40            time,
41        }
42    }
43}
44/// This is the level of the log message.
45#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
46pub enum Level {
47    #[serde(rename = "INFO")]
48    Info,
49    #[serde(rename = "LOG")]
50    Log,
51    #[serde(rename = "WARN")]
52    Warn,
53    #[serde(rename = "ERROR")]
54    Error,
55    #[serde(rename = "CHECKPOINT")]
56    Checkpoint,
57}
58
59impl Default for Level {
60    fn default() -> Level {
61        Self::Info
62    }
63}
64