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