vapi_client/models/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 BucketPlan {
19 /// This is the name of the bucket.
20 #[serde(rename = "name")]
21 pub name: String,
22 /// This is the region of the bucket. Usage: - If `credential.type` is `aws`, then this is required. - If `credential.type` is `gcp`, then this is optional since GCP allows buckets to be accessed without a region but region is required for data residency requirements. Read here: https://cloud.google.com/storage/docs/request-endpoints
23 #[serde(rename = "region", skip_serializing_if = "Option::is_none")]
24 pub region: Option<String>,
25 /// This is the path where call artifacts will be stored. Usage: - To store call artifacts in a specific folder, set this to the full path. Eg. \"/folder-name1/folder-name2\". - To store call artifacts in the root of the bucket, leave this blank. @default \"/\"
26 #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
27 pub path: Option<String>,
28 /// This is the HMAC access key offered by GCP for interoperability with S3 clients. Here is the guide on how to create: https://cloud.google.com/storage/docs/authentication/managing-hmackeys#console Usage: - If `credential.type` is `gcp`, then this is required. - If `credential.type` is `aws`, then this is not required since credential.awsAccessKeyId is used instead.
29 #[serde(rename = "hmacAccessKey", skip_serializing_if = "Option::is_none")]
30 pub hmac_access_key: Option<String>,
31 /// This is the secret for the HMAC access key. Here is the guide on how to create: https://cloud.google.com/storage/docs/authentication/managing-hmackeys#console Usage: - If `credential.type` is `gcp`, then this is required. - If `credential.type` is `aws`, then this is not required since credential.awsSecretAccessKey is used instead. Note: This is not returned in the API.
32 #[serde(rename = "hmacSecret", skip_serializing_if = "Option::is_none")]
33 pub hmac_secret: Option<String>,
34}
35
36impl BucketPlan {
37 pub fn new(name: String) -> BucketPlan {
38 BucketPlan {
39 name,
40 region: None,
41 path: None,
42 hmac_access_key: None,
43 hmac_secret: None,
44 }
45 }
46}