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};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BucketPlan {
17 /// This is the name of the bucket.
18 #[serde(rename = "name")]
19 pub name: String,
20 /// 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
21 #[serde(rename = "region", skip_serializing_if = "Option::is_none")]
22 pub region: Option<String>,
23 /// 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 \"/\"
24 #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
25 pub path: Option<String>,
26 /// 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.
27 #[serde(rename = "hmacAccessKey", skip_serializing_if = "Option::is_none")]
28 pub hmac_access_key: Option<String>,
29 /// 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.
30 #[serde(rename = "hmacSecret", skip_serializing_if = "Option::is_none")]
31 pub hmac_secret: Option<String>,
32}
33
34impl BucketPlan {
35 pub fn new(name: String) -> BucketPlan {
36 BucketPlan {
37 name,
38 region: None,
39 path: None,
40 hmac_access_key: None,
41 hmac_secret: None,
42 }
43 }
44}