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