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
/*
* Antimatter Public API
*
* Interact with the Antimatter Cloud API
*
* The version of the OpenAPI document: 2.0.13
* Contact: support@antimatter.io
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// AntimatterDelegatedGcpKeyInfo : The details required to use an GCP Key root encryption key that has been delegated to Antimatter's GCP service account. This will use Antimatter's service account during set up of the GCP client.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AntimatterDelegatedGcpKeyInfo {
/// The Google project ID.
#[serde(rename = "projectID")]
pub project_id: String,
/// Location of Google keyring.
#[serde(rename = "location")]
pub location: String,
/// The Google keyring's ID at location.
#[serde(rename = "keyringID")]
pub keyring_id: String,
/// The key ID that should be used in the Google keyring.
#[serde(rename = "keyID")]
pub key_id: String,
#[serde(rename = "providerName", skip_serializing_if = "Option::is_none")]
pub provider_name: Option<ProviderName>,
}
impl AntimatterDelegatedGcpKeyInfo {
/// The details required to use an GCP Key root encryption key that has been delegated to Antimatter's GCP service account. This will use Antimatter's service account during set up of the GCP client.
pub fn new(project_id: String, location: String, keyring_id: String, key_id: String) -> AntimatterDelegatedGcpKeyInfo {
AntimatterDelegatedGcpKeyInfo {
project_id,
location,
keyring_id,
key_id,
provider_name: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ProviderName {
#[serde(rename = "gcp_am")]
GcpAm,
}
impl Default for ProviderName {
fn default() -> ProviderName {
Self::GcpAm
}
}