vapi_client/models/
gcp_credential.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 GcpCredential {
16    #[serde(rename = "provider")]
17    pub provider: Provider,
18    /// This is the unique identifier for the credential.
19    #[serde(rename = "id")]
20    pub id: String,
21    /// This is the unique identifier for the org that this credential belongs to.
22    #[serde(rename = "orgId")]
23    pub org_id: String,
24    /// This is the ISO 8601 date-time string of when the credential was created.
25    #[serde(rename = "createdAt")]
26    pub created_at: String,
27    /// This is the ISO 8601 date-time string of when the assistant was last updated.
28    #[serde(rename = "updatedAt")]
29    pub updated_at: String,
30    /// This is the name of credential. This is just for your reference.
31    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
32    pub name: Option<String>,
33    /// 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.
34    #[serde(rename = "gcpKey")]
35    pub gcp_key: Box<models::GcpKey>,
36    /// This is the bucket plan that can be provided to store call artifacts in GCP.
37    #[serde(rename = "bucketPlan", skip_serializing_if = "Option::is_none")]
38    pub bucket_plan: Option<Box<models::BucketPlan>>,
39}
40
41impl GcpCredential {
42    pub fn new(provider: Provider, id: String, org_id: String, created_at: String, updated_at: String, gcp_key: models::GcpKey) -> GcpCredential {
43        GcpCredential {
44            provider,
45            id,
46            org_id,
47            created_at,
48            updated_at,
49            name: None,
50            gcp_key: Box::new(gcp_key),
51            bucket_plan: None,
52        }
53    }
54}
55/// 
56#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
57pub enum Provider {
58    #[serde(rename = "gcp")]
59    Gcp,
60}
61
62impl Default for Provider {
63    fn default() -> Provider {
64        Self::Gcp
65    }
66}
67