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