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};
12use utoipa::OpenApi;
13
14
15use crate::models;
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, OpenApi)]
18pub struct StepDestination {
19    #[serde(rename = "type")]
20    pub r#type: Type,
21    /// 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.
22    #[serde(rename = "conditions", skip_serializing_if = "Option::is_none")]
23    pub conditions: Option<Vec<models::BlockStartMessageConditionsInner>>,
24    #[serde(rename = "stepName")]
25    pub step_name: String,
26}
27
28impl StepDestination {
29    pub fn new(r#type: Type, step_name: String) -> StepDestination {
30        StepDestination {
31            r#type,
32            conditions: None,
33            step_name,
34        }
35    }
36}
37///
38#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, OpenApi)]
39pub enum Type {
40    #[serde(rename = "step")]
41    Step,
42}
43
44impl Default for Type {
45    fn default() -> Type {
46        Self::Step
47    }
48}