vapi_client/models/
client_message_metadata.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 ClientMessageMetadata {
17    /// This is the type of the message. \"metadata\" is sent to forward metadata to the client.
18    #[serde(rename = "type")]
19    pub r#type: Type,
20    /// This is the metadata content
21    #[serde(rename = "metadata")]
22    pub metadata: String,
23}
24
25impl ClientMessageMetadata {
26    pub fn new(r#type: Type, metadata: String) -> ClientMessageMetadata {
27        ClientMessageMetadata { r#type, metadata }
28    }
29}
30/// This is the type of the message. \"metadata\" is sent to forward metadata to the client.
31#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
32pub enum Type {
33    #[serde(rename = "metadata")]
34    Metadata,
35}
36
37impl Default for Type {
38    fn default() -> Type {
39        Self::Metadata
40    }
41}