vapi_client/models/
server.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 Server {
16    /// This is the timeout in seconds for the request to your server. Defaults to 20 seconds.  @default 20
17    #[serde(rename = "timeoutSeconds", skip_serializing_if = "Option::is_none")]
18    pub timeout_seconds: Option<f64>,
19    /// API endpoint to send requests to.
20    #[serde(rename = "url")]
21    pub url: String,
22    /// This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret.  Same precedence logic as server.
23    #[serde(rename = "secret", skip_serializing_if = "Option::is_none")]
24    pub secret: Option<String>,
25    /// These are the custom headers to include in the request sent to your server.  Each key-value pair represents a header name and its value.
26    #[serde(rename = "headers", skip_serializing_if = "Option::is_none")]
27    pub headers: Option<serde_json::Value>,
28    /// This is the backoff plan to use if the request fails.
29    #[serde(rename = "backoffPlan", skip_serializing_if = "Option::is_none")]
30    pub backoff_plan: Option<Box<models::BackoffPlan>>,
31}
32
33impl Server {
34    pub fn new(url: String) -> Server {
35        Server {
36            timeout_seconds: None,
37            url,
38            secret: None,
39            headers: None,
40            backoff_plan: None,
41        }
42    }
43}
44