vapi-client 0.4.2

Unofficial crate for Vapi - Voice AI for developers.
Documentation
/*
 * Vapi API
 *
 * Voice AI for developers.
 *
 * The version of the OpenAPI document: 1.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ClientInboundMessageControl {
    /// This is the type of the message. Send \"control\" message to control the assistant. `control` options are: - \"mute-assistant\" - mute the assistant - \"unmute-assistant\" - unmute the assistant - \"say-first-message\" - say the first message (this is used when video recording is enabled and the conversation is only started once the client side kicks off the recording)
    #[serde(rename = "type")]
    pub r#type: TypeTrue,
    /// This is the control action
    #[serde(rename = "control")]
    pub control: ControlTrue,
}

impl ClientInboundMessageControl {
    pub fn new(r#type: TypeTrue, control: ControlTrue) -> ClientInboundMessageControl {
        ClientInboundMessageControl { r#type, control }
    }
}
/// This is the type of the message. Send \"control\" message to control the assistant. `control` options are: - \"mute-assistant\" - mute the assistant - \"unmute-assistant\" - unmute the assistant - \"say-first-message\" - say the first message (this is used when video recording is enabled and the conversation is only started once the client side kicks off the recording)
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TypeTrue {
    #[serde(rename = "control")]
    Control,
}

impl Default for TypeTrue {
    fn default() -> TypeTrue {
        Self::Control
    }
}
/// This is the control action
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ControlTrue {
    #[serde(rename = "mute-assistant")]
    MuteAssistant,
    #[serde(rename = "unmute-assistant")]
    UnmuteAssistant,
    #[serde(rename = "say-first-message")]
    SayFirstMessage,
}

impl Default for ControlTrue {
    fn default() -> ControlTrue {
        Self::MuteAssistant
    }
}