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 CreateTokenDto {
    /// This is the tag for the token. It represents its scope.
    #[serde(rename = "tag", skip_serializing_if = "Option::is_none")]
    pub tag: Option<TagTrue>,
    /// This is the name of the token. This is just for your own reference.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// This are the restrictions for the token.
    #[serde(rename = "restrictions", skip_serializing_if = "Option::is_none")]
    pub restrictions: Option<models::TokenRestrictions>,
}

impl CreateTokenDto {
    pub fn new() -> CreateTokenDto {
        CreateTokenDto {
            tag: None,
            name: None,
            restrictions: None,
        }
    }
}
/// This is the tag for the token. It represents its scope.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TagTrue {
    #[serde(rename = "private")]
    Private,
    #[serde(rename = "public")]
    Public,
}

impl Default for TagTrue {
    fn default() -> TagTrue {
        Self::Private
    }
}