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