vapi_client/models/
edge.rs

1/*
2 * Vapi API
3 *
4 * Voice AI for developers.
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Edge {
16    #[serde(rename = "condition", skip_serializing_if = "Option::is_none")]
17    pub condition: Option<models::AiEdgeCondition>,
18    #[serde(rename = "from")]
19    pub from: String,
20    #[serde(rename = "to")]
21    pub to: String,
22    /// This is for metadata you want to store on the edge.
23    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
24    pub metadata: Option<serde_json::Value>,
25}
26
27impl Edge {
28    pub fn new(from: String, to: String) -> Edge {
29        Edge {
30            condition: None,
31            from,
32            to,
33            metadata: None,
34        }
35    }
36}