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