vapi_client/models/
supabase_credential.rs

1/*
2 * Vapi API
3 *
4 * API for building voice assistants
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SupabaseCredential {
17    /// This is for supabase storage.
18    #[serde(rename = "provider")]
19    pub provider: Provider,
20    /// This is the unique identifier for the credential.
21    #[serde(rename = "id")]
22    pub id: String,
23    /// This is the unique identifier for the org that this credential belongs to.
24    #[serde(rename = "orgId")]
25    pub org_id: String,
26    /// This is the ISO 8601 date-time string of when the credential was created.
27    #[serde(rename = "createdAt")]
28    pub created_at: String,
29    /// This is the ISO 8601 date-time string of when the assistant was last updated.
30    #[serde(rename = "updatedAt")]
31    pub updated_at: String,
32    /// This is the name of credential. This is just for your reference.
33    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
34    pub name: Option<String>,
35    #[serde(rename = "bucketPlan", skip_serializing_if = "Option::is_none")]
36    pub bucket_plan: Option<models::SupabaseBucketPlan>,
37}
38
39impl SupabaseCredential {
40    pub fn new(
41        provider: Provider,
42        id: String,
43        org_id: String,
44        created_at: String,
45        updated_at: String,
46    ) -> SupabaseCredential {
47        SupabaseCredential {
48            provider,
49            id,
50            org_id,
51            created_at,
52            updated_at,
53            name: None,
54            bucket_plan: None,
55        }
56    }
57}
58/// This is for supabase storage.
59#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
60pub enum Provider {
61    #[serde(rename = "supabase")]
62    Supabase,
63}
64
65impl Default for Provider {
66    fn default() -> Provider {
67        Self::Supabase
68    }
69}