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: Provider,
18    /// 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.
19    #[serde(rename = "gcpKey")]
20    pub gcp_key: Box<models::GcpKey>,
21    /// This is the bucket plan that can be provided to store call artifacts in GCP.
22    #[serde(rename = "bucketPlan", skip_serializing_if = "Option::is_none")]
23    pub bucket_plan: Option<Box<models::BucketPlan>>,
24    /// This is the name of credential. This is just for your reference.
25    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
26    pub name: Option<String>,
27}
28
29impl CreateGcpCredentialDto {
30    pub fn new(provider: Provider, gcp_key: models::GcpKey) -> CreateGcpCredentialDto {
31        CreateGcpCredentialDto {
32            provider,
33            gcp_key: Box::new(gcp_key),
34            bucket_plan: None,
35            name: None,
36        }
37    }
38}
39/// 
40#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
41pub enum Provider {
42    #[serde(rename = "gcp")]
43    Gcp,
44}
45
46impl Default for Provider {
47    fn default() -> Provider {
48        Self::Gcp
49    }
50}
51