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 HangupNode {
    #[serde(rename = "type")]
    pub r#type: TypeTrue,
    #[serde(rename = "name")]
    pub name: String,
    /// This is whether or not the node is the start of the workflow.
    #[serde(rename = "isStart", skip_serializing_if = "Option::is_none")]
    pub is_start: Option<bool>,
    /// This is for metadata you want to store on the task.
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<serde_json::Value>,
}

impl HangupNode {
    pub fn new(r#type: TypeTrue, name: String) -> HangupNode {
        HangupNode {
            r#type,
            name,
            is_start: None,
            metadata: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TypeTrue {
    #[serde(rename = "hangup")]
    Hangup,
}

impl Default for TypeTrue {
    fn default() -> TypeTrue {
        Self::Hangup
    }
}