vapi_client/models/
step_destination.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 StepDestination {
17    #[serde(rename = "type")]
18    pub r#type: Type,
19    /// This is an optional array of conditions that must be met for this destination to be triggered. If empty, this is the default destination that the step transfers to.
20    #[serde(rename = "conditions", skip_serializing_if = "Option::is_none")]
21    pub conditions: Option<Vec<models::BlockStartMessageConditionsInner>>,
22    #[serde(rename = "stepName")]
23    pub step_name: String,
24}
25
26impl StepDestination {
27    pub fn new(r#type: Type, step_name: String) -> StepDestination {
28        StepDestination {
29            r#type,
30            conditions: None,
31            step_name,
32        }
33    }
34}
35///
36#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
37pub enum Type {
38    #[serde(rename = "step")]
39    Step,
40}
41
42impl Default for Type {
43    fn default() -> Type {
44        Self::Step
45    }
46}