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 */
1011use crate::models;
12use serde::{Deserialize, Serialize};
1314#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ClientMessageWorkflowNodeStarted {
16#[serde(rename = "phoneNumber", skip_serializing_if = "Option::is_none")]
17pub phone_number: Option<models::ClientMessageWorkflowNodeStartedPhoneNumber>,
18/// This is the type of the message. \"workflow.node.started\" is sent when the active node changes.
19#[serde(rename = "type")]
20pub r#type: TypeTrue,
21/// This is the timestamp of the message.
22#[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
23pub timestamp: Option<f64>,
24/// This is the call that the message is associated with.
25#[serde(rename = "call", skip_serializing_if = "Option::is_none")]
26pub call: Option<models::Call>,
27/// This is the customer that the message is associated with.
28#[serde(rename = "customer", skip_serializing_if = "Option::is_none")]
29pub customer: Option<models::CreateCustomerDto>,
30/// This is the assistant that the message is associated with.
31#[serde(rename = "assistant", skip_serializing_if = "Option::is_none")]
32pub assistant: Option<models::CreateAssistantDto>,
33/// This is the active node.
34#[serde(rename = "node")]
35pub node: serde_json::Value,
36}
3738impl ClientMessageWorkflowNodeStarted {
39pub fn new(r#type: TypeTrue, node: serde_json::Value) -> ClientMessageWorkflowNodeStarted {
40 ClientMessageWorkflowNodeStarted {
41 phone_number: None,
42 r#type,
43 timestamp: None,
44 call: None,
45 customer: None,
46 assistant: None,
47 node,
48 }
49 }
50}
51/// This is the type of the message. \"workflow.node.started\" is sent when the active node changes.
52#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
53pub enum TypeTrue {
54#[serde(rename = "workflow.node.started")]
55WorkflowPeriodNodePeriodStarted,
56}
5758impl Default for TypeTrue {
59fn default() -> TypeTrue {
60Self::WorkflowPeriodNodePeriodStarted
61 }
62}