vapi_client/models/
hangup.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 Hangup {
19    #[serde(rename = "type")]
20    pub r#type: Type,
21    #[serde(rename = "name")]
22    pub name: String,
23    /// This is for metadata you want to store on the task.
24    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
25    pub metadata: Option<serde_json::Value>,
26}
27
28impl Hangup {
29    pub fn new(r#type: Type, name: String) -> Hangup {
30        Hangup {
31            r#type,
32            name,
33            metadata: None,
34        }
35    }
36}
37///
38#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, OpenApi)]
39pub enum Type {
40    #[serde(rename = "hangup")]
41    Hangup,
42}
43
44impl Default for Type {
45    fn default() -> Type {
46        Self::Hangup
47    }
48}