vapi_client/models/
edge.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 Edge {
17    #[serde(rename = "condition", skip_serializing_if = "Option::is_none")]
18    pub condition: Option<models::EdgeCondition>,
19    #[serde(rename = "from")]
20    pub from: String,
21    #[serde(rename = "to")]
22    pub to: String,
23    /// This is for metadata you want to store on the edge.
24    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
25    pub metadata: Option<serde_json::Value>,
26}
27
28impl Edge {
29    pub fn new(from: String, to: String) -> Edge {
30        Edge {
31            condition: None,
32            from,
33            to,
34            metadata: None,
35        }
36    }
37}