vapi_client/models/
supabase_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 SupabaseCredential {
16    /// This is for supabase storage.
17    #[serde(rename = "provider")]
18    pub provider: Provider,
19    /// This is the unique identifier for the credential.
20    #[serde(rename = "id")]
21    pub id: String,
22    /// This is the unique identifier for the org that this credential belongs to.
23    #[serde(rename = "orgId")]
24    pub org_id: String,
25    /// This is the ISO 8601 date-time string of when the credential was created.
26    #[serde(rename = "createdAt")]
27    pub created_at: String,
28    /// This is the ISO 8601 date-time string of when the assistant was last updated.
29    #[serde(rename = "updatedAt")]
30    pub updated_at: String,
31    /// This is the name of credential. This is just for your reference.
32    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
33    pub name: Option<String>,
34    #[serde(rename = "bucketPlan", skip_serializing_if = "Option::is_none")]
35    pub bucket_plan: Option<Box<models::SupabaseBucketPlan>>,
36}
37
38impl SupabaseCredential {
39    pub fn new(provider: Provider, id: String, org_id: String, created_at: String, updated_at: String) -> SupabaseCredential {
40        SupabaseCredential {
41            provider,
42            id,
43            org_id,
44            created_at,
45            updated_at,
46            name: None,
47            bucket_plan: None,
48        }
49    }
50}
51/// This is for supabase storage.
52#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
53pub enum Provider {
54    #[serde(rename = "supabase")]
55    Supabase,
56}
57
58impl Default for Provider {
59    fn default() -> Provider {
60        Self::Supabase
61    }
62}
63