vapi_client/models/
sip_authentication.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::ToSchema;
13
14
15use crate::models;
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, ToSchema)]
18pub struct SipAuthentication {
19    /// This will be expected in the `realm` field of the `authorization` header of the SIP INVITE. Defaults to sip.vapi.ai.
20    #[serde(rename = "realm", skip_serializing_if = "Option::is_none")]
21    pub realm: Option<String>,
22    /// This will be expected in the `username` field of the `authorization` header of the SIP INVITE.
23    #[serde(rename = "username")]
24    pub username: String,
25    /// This will be expected to generate the `response` field of the `authorization` header of the SIP INVITE, through digest authentication.
26    #[serde(rename = "password")]
27    pub password: String,
28}
29
30impl SipAuthentication {
31    pub fn new(username: String, password: String) -> SipAuthentication {
32        SipAuthentication {
33            realm: None,
34            username,
35            password,
36        }
37    }
38}