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