vapi_client/models/monitor_plan.rs
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 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct MonitorPlan {
16 /// This determines whether the assistant's calls allow live listening. Defaults to true. Fetch `call.monitor.listenUrl` to get the live listening URL. @default true
17 #[serde(rename = "listenEnabled", skip_serializing_if = "Option::is_none")]
18 pub listen_enabled: Option<bool>,
19 /// This enables authentication on the `call.monitor.listenUrl`. If `listenAuthenticationEnabled` is `true`, the `call.monitor.listenUrl` will require an `Authorization: Bearer <vapi-public-api-key>` header. @default false
20 #[serde(
21 rename = "listenAuthenticationEnabled",
22 skip_serializing_if = "Option::is_none"
23 )]
24 pub listen_authentication_enabled: Option<bool>,
25 /// This determines whether the assistant's calls allow live control. Defaults to true. Fetch `call.monitor.controlUrl` to get the live control URL. To use, send any control message via a POST request to `call.monitor.controlUrl`. Here are the types of controls supported: https://docs.vapi.ai/api-reference/messages/client-inbound-message @default true
26 #[serde(rename = "controlEnabled", skip_serializing_if = "Option::is_none")]
27 pub control_enabled: Option<bool>,
28 /// This enables authentication on the `call.monitor.controlUrl`. If `controlAuthenticationEnabled` is `true`, the `call.monitor.controlUrl` will require an `Authorization: Bearer <vapi-public-api-key>` header. @default false
29 #[serde(
30 rename = "controlAuthenticationEnabled",
31 skip_serializing_if = "Option::is_none"
32 )]
33 pub control_authentication_enabled: Option<bool>,
34}
35
36impl MonitorPlan {
37 pub fn new() -> MonitorPlan {
38 MonitorPlan {
39 listen_enabled: None,
40 listen_authentication_enabled: None,
41 control_enabled: None,
42 control_authentication_enabled: None,
43 }
44 }
45}