vapi_client/models/
create_gcp_credential_dto.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 CreateGcpCredentialDto {
16    #[serde(rename = "provider")]
17    pub provider: ProviderTrue,
18    /// This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.
19    #[serde(rename = "fallbackIndex", skip_serializing_if = "Option::is_none")]
20    pub fallback_index: Option<f64>,
21    /// This is the GCP key. This is the JSON that can be generated in the Google Cloud Console at https://console.cloud.google.com/iam-admin/serviceaccounts/details/<service-account-id>/keys.  The schema is identical to the JSON that GCP outputs.
22    #[serde(rename = "gcpKey")]
23    pub gcp_key: models::GcpKey,
24    /// This is the region of the GCP resource.
25    #[serde(rename = "region", skip_serializing_if = "Option::is_none")]
26    pub region: Option<String>,
27    #[serde(rename = "bucketPlan", skip_serializing_if = "Option::is_none")]
28    pub bucket_plan: Option<models::BucketPlan>,
29    /// This is the name of credential. This is just for your reference.
30    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
31    pub name: Option<String>,
32}
33
34impl CreateGcpCredentialDto {
35    pub fn new(provider: ProviderTrue, gcp_key: models::GcpKey) -> CreateGcpCredentialDto {
36        CreateGcpCredentialDto {
37            provider,
38            fallback_index: None,
39            gcp_key,
40            region: None,
41            bucket_plan: None,
42            name: None,
43        }
44    }
45}
46///
47#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
48pub enum ProviderTrue {
49    #[serde(rename = "gcp")]
50    Gcp,
51}
52
53impl Default for ProviderTrue {
54    fn default() -> ProviderTrue {
55        Self::Gcp
56    }
57}