vapi_client/models/
create_token_dto.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 CreateTokenDto {
16    /// This is the tag for the token. It represents its scope.
17    #[serde(rename = "tag", skip_serializing_if = "Option::is_none")]
18    pub tag: Option<TagTrue>,
19    /// This is the name of the token. This is just for your own reference.
20    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
21    pub name: Option<String>,
22    /// This are the restrictions for the token.
23    #[serde(rename = "restrictions", skip_serializing_if = "Option::is_none")]
24    pub restrictions: Option<models::TokenRestrictions>,
25}
26
27impl CreateTokenDto {
28    pub fn new() -> CreateTokenDto {
29        CreateTokenDto {
30            tag: None,
31            name: None,
32            restrictions: None,
33        }
34    }
35}
36/// This is the tag for the token. It represents its scope.
37#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
38pub enum TagTrue {
39    #[serde(rename = "private")]
40    Private,
41    #[serde(rename = "public")]
42    Public,
43}
44
45impl Default for TagTrue {
46    fn default() -> TagTrue {
47        Self::Private
48    }
49}