vapi_client/models/
system_message.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 SystemMessage {
16    /// The role of the system in the conversation.
17    #[serde(rename = "role")]
18    pub role: String,
19    /// The message content from the system.
20    #[serde(rename = "message")]
21    pub message: String,
22    /// The timestamp when the message was sent.
23    #[serde(rename = "time")]
24    pub time: f64,
25    /// The number of seconds from the start of the conversation.
26    #[serde(rename = "secondsFromStart")]
27    pub seconds_from_start: f64,
28}
29
30impl SystemMessage {
31    pub fn new(role: String, message: String, time: f64, seconds_from_start: f64) -> SystemMessage {
32        SystemMessage {
33            role,
34            message,
35            time,
36            seconds_from_start,
37        }
38    }
39}