vapi_client/models/
cloudflare_credential.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 CloudflareCredential {
16    /// Credential provider. Only allowed value is cloudflare
17    #[serde(rename = "provider")]
18    pub provider: Provider,
19    /// Cloudflare Account Id.
20    #[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
21    pub account_id: Option<String>,
22    /// Cloudflare API Key / Token.
23    #[serde(rename = "apiKey", skip_serializing_if = "Option::is_none")]
24    pub api_key: Option<String>,
25    /// Cloudflare Account Email.
26    #[serde(rename = "accountEmail", skip_serializing_if = "Option::is_none")]
27    pub account_email: Option<String>,
28    /// This is the unique identifier for the credential.
29    #[serde(rename = "id")]
30    pub id: String,
31    /// This is the unique identifier for the org that this credential belongs to.
32    #[serde(rename = "orgId")]
33    pub org_id: String,
34    /// This is the ISO 8601 date-time string of when the credential was created.
35    #[serde(rename = "createdAt")]
36    pub created_at: String,
37    /// This is the ISO 8601 date-time string of when the assistant was last updated.
38    #[serde(rename = "updatedAt")]
39    pub updated_at: String,
40    /// This is the name of credential. This is just for your reference.
41    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
42    pub name: Option<String>,
43    /// This is the bucket plan that can be provided to store call artifacts in R2
44    #[serde(rename = "bucketPlan", skip_serializing_if = "Option::is_none")]
45    pub bucket_plan: Option<Box<models::CloudflareR2BucketPlan>>,
46}
47
48impl CloudflareCredential {
49    pub fn new(provider: Provider, id: String, org_id: String, created_at: String, updated_at: String) -> CloudflareCredential {
50        CloudflareCredential {
51            provider,
52            account_id: None,
53            api_key: None,
54            account_email: None,
55            id,
56            org_id,
57            created_at,
58            updated_at,
59            name: None,
60            bucket_plan: None,
61        }
62    }
63}
64/// Credential provider. Only allowed value is cloudflare
65#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
66pub enum Provider {
67    #[serde(rename = "cloudflare")]
68    Cloudflare,
69}
70
71impl Default for Provider {
72    fn default() -> Provider {
73        Self::Cloudflare
74    }
75}
76