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 Edge {
    #[serde(rename = "condition", skip_serializing_if = "Option::is_none")]
    pub condition: Option<models::AiEdgeCondition>,
    #[serde(rename = "from")]
    pub from: String,
    #[serde(rename = "to")]
    pub to: String,
    /// This is for metadata you want to store on the edge.
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<serde_json::Value>,
}

impl Edge {
    pub fn new(from: String, to: String) -> Edge {
        Edge {
            condition: None,
            from,
            to,
            metadata: None,
        }
    }
}