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