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 SupabaseCredential {
16/// This is for supabase storage.
17#[serde(rename = "provider")]
18pub provider: ProviderTrue,
19/// This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.
20#[serde(rename = "fallbackIndex", skip_serializing_if = "Option::is_none")]
21pub fallback_index: Option<f64>,
22/// This is the unique identifier for the credential.
23#[serde(rename = "id")]
24pub id: String,
25/// This is the unique identifier for the org that this credential belongs to.
26#[serde(rename = "orgId")]
27pub org_id: String,
28/// This is the ISO 8601 date-time string of when the credential was created.
29#[serde(rename = "createdAt")]
30pub created_at: String,
31/// This is the ISO 8601 date-time string of when the assistant was last updated.
32#[serde(rename = "updatedAt")]
33pub 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")]
36pub name: Option<String>,
37#[serde(rename = "bucketPlan", skip_serializing_if = "Option::is_none")]
38pub bucket_plan: Option<models::SupabaseBucketPlan>,
39}
4041impl SupabaseCredential {
42pub fn new(
43 provider: ProviderTrue,
44 id: String,
45 org_id: String,
46 created_at: String,
47 updated_at: String,
48 ) -> SupabaseCredential {
49 SupabaseCredential {
50 provider,
51 fallback_index: None,
52 id,
53 org_id,
54 created_at,
55 updated_at,
56 name: None,
57 bucket_plan: None,
58 }
59 }
60}
61/// This is for supabase storage.
62#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
63pub enum ProviderTrue {
64#[serde(rename = "supabase")]
65Supabase,
66}
6768impl Default for ProviderTrue {
69fn default() -> ProviderTrue {
70Self::Supabase
71 }
72}