vapi_client/models/
response_text_done_event.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ResponseTextDoneEvent {
16 #[serde(rename = "content_index")]
18 pub content_index: f64,
19 #[serde(rename = "item_id")]
21 pub item_id: String,
22 #[serde(rename = "output_index")]
24 pub output_index: f64,
25 #[serde(rename = "text")]
27 pub text: String,
28 #[serde(rename = "type")]
30 pub r#type: TypeTrue,
31}
32
33impl ResponseTextDoneEvent {
34 pub fn new(
35 content_index: f64,
36 item_id: String,
37 output_index: f64,
38 text: String,
39 r#type: TypeTrue,
40 ) -> ResponseTextDoneEvent {
41 ResponseTextDoneEvent {
42 content_index,
43 item_id,
44 output_index,
45 text,
46 r#type,
47 }
48 }
49}
50#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
52pub enum TypeTrue {
53 #[serde(rename = "response.output_text.done")]
54 ResponsePeriodOutputTextPeriodDone,
55}
56
57impl Default for TypeTrue {
58 fn default() -> TypeTrue {
59 Self::ResponsePeriodOutputTextPeriodDone
60 }
61}