vapi_client/models/
supabase_bucket_plan.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 SupabaseBucketPlan {
16    /// This is the S3 Region. It should look like us-east-1 It should be one of the supabase regions defined in the SUPABASE_REGION enum Check https://supabase.com/docs/guides/platform/regions for up to date regions
17    #[serde(rename = "region")]
18    pub region: Region,
19    /// This is the S3 compatible URL for Supabase S3 This should look like https://<project-ID>.supabase.co/storage/v1/s3
20    #[serde(rename = "url")]
21    pub url: String,
22    /// This is the Supabase S3 Access Key ID. The user creates this in the Supabase project Storage settings
23    #[serde(rename = "accessKeyId")]
24    pub access_key_id: String,
25    /// This is the Supabase S3 Secret Access Key. The user creates this in the Supabase project Storage settings along with the access key id
26    #[serde(rename = "secretAccessKey")]
27    pub secret_access_key: String,
28    /// This is the Supabase S3 Bucket Name. The user must create this in Supabase under Storage > Buckets A bucket that does not exist will not be checked now, but file uploads will fail
29    #[serde(rename = "name")]
30    pub name: String,
31    /// This is the Supabase S3 Bucket Folder Path. The user can create this in Supabase under Storage > Buckets A path that does not exist will not be checked now, but file uploads will fail A Path is like a folder in the bucket Eg. If the bucket is called \"my-bucket\" and the path is \"my-folder\", the full path is \"my-bucket/my-folder\"
32    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
33    pub path: Option<String>,
34}
35
36impl SupabaseBucketPlan {
37    pub fn new(region: Region, url: String, access_key_id: String, secret_access_key: String, name: String) -> SupabaseBucketPlan {
38        SupabaseBucketPlan {
39            region,
40            url,
41            access_key_id,
42            secret_access_key,
43            name,
44            path: None,
45        }
46    }
47}
48/// This is the S3 Region. It should look like us-east-1 It should be one of the supabase regions defined in the SUPABASE_REGION enum Check https://supabase.com/docs/guides/platform/regions for up to date regions
49#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
50pub enum Region {
51    #[serde(rename = "us-west-1")]
52    UsWest1,
53    #[serde(rename = "us-east-1")]
54    UsEast1,
55    #[serde(rename = "us-east-2")]
56    UsEast2,
57    #[serde(rename = "ca-central-1")]
58    CaCentral1,
59    #[serde(rename = "eu-west-1")]
60    EuWest1,
61    #[serde(rename = "eu-west-2")]
62    EuWest2,
63    #[serde(rename = "eu-west-3")]
64    EuWest3,
65    #[serde(rename = "eu-central-1")]
66    EuCentral1,
67    #[serde(rename = "eu-central-2")]
68    EuCentral2,
69    #[serde(rename = "eu-north-1")]
70    EuNorth1,
71    #[serde(rename = "ap-south-1")]
72    ApSouth1,
73    #[serde(rename = "ap-southeast-1")]
74    ApSoutheast1,
75    #[serde(rename = "ap-northeast-1")]
76    ApNortheast1,
77    #[serde(rename = "ap-northeast-2")]
78    ApNortheast2,
79    #[serde(rename = "ap-southeast-2")]
80    ApSoutheast2,
81    #[serde(rename = "sa-east-1")]
82    SaEast1,
83}
84
85impl Default for Region {
86    fn default() -> Region {
87        Self::UsWest1
88    }
89}
90