vapi-client 0.4.2

Unofficial crate for Vapi - Voice AI for developers.
Documentation
/*
 * Vapi API
 *
 * Voice AI for developers.
 *
 * The version of the OpenAPI document: 1.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateCustomerDto {
    /// This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it.  Use cases: - `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks. - `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.  If `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`).  @default true (E164 check is enabled)
    #[serde(
        rename = "numberE164CheckEnabled",
        skip_serializing_if = "Option::is_none"
    )]
    pub number_e164_check_enabled: Option<bool>,
    /// This is the extension that will be dialed after the call is answered.
    #[serde(rename = "extension", skip_serializing_if = "Option::is_none")]
    pub extension: Option<String>,
    /// These are the overrides for the assistant's settings and template variables specific to this customer. This allows customization of the assistant's behavior for individual customers in batch calls.
    #[serde(rename = "assistantOverrides", skip_serializing_if = "Option::is_none")]
    pub assistant_overrides: Option<models::AssistantOverrides>,
    /// This is the number of the customer.
    #[serde(rename = "number", skip_serializing_if = "Option::is_none")]
    pub number: Option<String>,
    /// This is the SIP URI of the customer.
    #[serde(rename = "sipUri", skip_serializing_if = "Option::is_none")]
    pub sip_uri: Option<String>,
    /// This is the name of the customer. This is just for your own reference.  For SIP inbound calls, this is extracted from the `From` SIP header with format `\"Display Name\" <sip:username@domain>`.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
}

impl CreateCustomerDto {
    pub fn new() -> CreateCustomerDto {
        CreateCustomerDto {
            number_e164_check_enabled: None,
            extension: None,
            assistant_overrides: None,
            number: None,
            sip_uri: None,
            name: None,
        }
    }
}