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 */
1011use crate::models;
12use serde::{Deserialize, Serialize};
1314#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct TwilioCredential {
16#[serde(rename = "provider")]
17pub provider: ProviderTrue,
18/// This is not returned in the API.
19#[serde(rename = "authToken", skip_serializing_if = "Option::is_none")]
20pub auth_token: Option<String>,
21/// This is not returned in the API.
22#[serde(rename = "apiKey", skip_serializing_if = "Option::is_none")]
23pub api_key: Option<String>,
24/// This is not returned in the API.
25#[serde(rename = "apiSecret", skip_serializing_if = "Option::is_none")]
26pub api_secret: Option<String>,
27/// This is the unique identifier for the credential.
28#[serde(rename = "id")]
29pub id: String,
30/// This is the unique identifier for the org that this credential belongs to.
31#[serde(rename = "orgId")]
32pub org_id: String,
33/// This is the ISO 8601 date-time string of when the credential was created.
34#[serde(rename = "createdAt")]
35pub created_at: String,
36/// This is the ISO 8601 date-time string of when the assistant was last updated.
37#[serde(rename = "updatedAt")]
38pub updated_at: String,
39/// This is the name of credential. This is just for your reference.
40#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
41pub name: Option<String>,
42#[serde(rename = "accountSid")]
43pub account_sid: String,
44}
4546impl TwilioCredential {
47pub fn new(
48 provider: ProviderTrue,
49 id: String,
50 org_id: String,
51 created_at: String,
52 updated_at: String,
53 account_sid: String,
54 ) -> TwilioCredential {
55 TwilioCredential {
56 provider,
57 auth_token: None,
58 api_key: None,
59 api_secret: None,
60 id,
61 org_id,
62 created_at,
63 updated_at,
64 name: None,
65 account_sid,
66 }
67 }
68}
69///
70#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
71pub enum ProviderTrue {
72#[serde(rename = "twilio")]
73Twilio,
74}
7576impl Default for ProviderTrue {
77fn default() -> ProviderTrue {
78Self::Twilio
79 }
80}