vapi_client/models/
supabase_bucket_plan.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 SupabaseBucketPlan {
19    /// 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
20    #[serde(rename = "region")]
21    pub region: Region,
22    /// This is the S3 compatible URL for Supabase S3 This should look like https://<project-ID>.supabase.co/storage/v1/s3
23    #[serde(rename = "url")]
24    pub url: String,
25    /// This is the Supabase S3 Access Key ID. The user creates this in the Supabase project Storage settings
26    #[serde(rename = "accessKeyId")]
27    pub access_key_id: String,
28    /// This is the Supabase S3 Secret Access Key. The user creates this in the Supabase project Storage settings along with the access key id
29    #[serde(rename = "secretAccessKey")]
30    pub secret_access_key: String,
31    /// 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
32    #[serde(rename = "name")]
33    pub name: String,
34    /// 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\"
35    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
36    pub path: Option<String>,
37}
38
39impl SupabaseBucketPlan {
40    pub fn new(
41        region: Region,
42        url: String,
43        access_key_id: String,
44        secret_access_key: String,
45        name: String,
46    ) -> SupabaseBucketPlan {
47        SupabaseBucketPlan {
48            region,
49            url,
50            access_key_id,
51            secret_access_key,
52            name,
53            path: None,
54        }
55    }
56}
57/// 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
58#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
59pub enum Region {
60    #[serde(rename = "us-west-1")]
61    UsWest1,
62    #[serde(rename = "us-east-1")]
63    UsEast1,
64    #[serde(rename = "us-east-2")]
65    UsEast2,
66    #[serde(rename = "ca-central-1")]
67    CaCentral1,
68    #[serde(rename = "eu-west-1")]
69    EuWest1,
70    #[serde(rename = "eu-west-2")]
71    EuWest2,
72    #[serde(rename = "eu-west-3")]
73    EuWest3,
74    #[serde(rename = "eu-central-1")]
75    EuCentral1,
76    #[serde(rename = "eu-central-2")]
77    EuCentral2,
78    #[serde(rename = "eu-north-1")]
79    EuNorth1,
80    #[serde(rename = "ap-south-1")]
81    ApSouth1,
82    #[serde(rename = "ap-southeast-1")]
83    ApSoutheast1,
84    #[serde(rename = "ap-northeast-1")]
85    ApNortheast1,
86    #[serde(rename = "ap-northeast-2")]
87    ApNortheast2,
88    #[serde(rename = "ap-southeast-2")]
89    ApSoutheast2,
90    #[serde(rename = "sa-east-1")]
91    SaEast1,
92}
93
94impl Default for Region {
95    fn default() -> Region {
96        Self::UsWest1
97    }
98}