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