vapi_client/models/
gcp_key.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 GcpKey {
16    /// This is the type of the key. Most likely, this is \"service_account\".
17    #[serde(rename = "type")]
18    pub r#type: String,
19    /// This is the ID of the Google Cloud project associated with this key.
20    #[serde(rename = "projectId")]
21    pub project_id: String,
22    /// This is the unique identifier for the private key.
23    #[serde(rename = "privateKeyId")]
24    pub private_key_id: String,
25    /// This is the private key in PEM format.  Note: This is not returned in the API.
26    #[serde(rename = "privateKey")]
27    pub private_key: String,
28    /// This is the email address associated with the service account.
29    #[serde(rename = "clientEmail")]
30    pub client_email: String,
31    /// This is the unique identifier for the client.
32    #[serde(rename = "clientId")]
33    pub client_id: String,
34    /// This is the URI for the auth provider's authorization endpoint.
35    #[serde(rename = "authUri")]
36    pub auth_uri: String,
37    /// This is the URI for the auth provider's token endpoint.
38    #[serde(rename = "tokenUri")]
39    pub token_uri: String,
40    /// This is the URL of the public x509 certificate for the auth provider.
41    #[serde(rename = "authProviderX509CertUrl")]
42    pub auth_provider_x509_cert_url: String,
43    /// This is the URL of the public x509 certificate for the client.
44    #[serde(rename = "clientX509CertUrl")]
45    pub client_x509_cert_url: String,
46    /// This is the domain associated with the universe this service account belongs to.
47    #[serde(rename = "universeDomain")]
48    pub universe_domain: String,
49}
50
51impl GcpKey {
52    pub fn new(
53        r#type: String,
54        project_id: String,
55        private_key_id: String,
56        private_key: String,
57        client_email: String,
58        client_id: String,
59        auth_uri: String,
60        token_uri: String,
61        auth_provider_x509_cert_url: String,
62        client_x509_cert_url: String,
63        universe_domain: String,
64    ) -> GcpKey {
65        GcpKey {
66            r#type,
67            project_id,
68            private_key_id,
69            private_key,
70            client_email,
71            client_id,
72            auth_uri,
73            token_uri,
74            auth_provider_x509_cert_url,
75            client_x509_cert_url,
76            universe_domain,
77        }
78    }
79}