use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DlpSensitivityScore {
#[serde(skip_serializing_if = "Option::is_none")]
pub score: Option<String>,
}
impl DlpSensitivityScore {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
score: Some("test-score".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DlpDataRiskLevel {
#[serde(skip_serializing_if = "Option::is_none")]
pub score: Option<String>,
}
impl DlpDataRiskLevel {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
score: Some("test-score".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DiscoveryConfig {
pub name: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub create_time: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub update_time: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub last_run_time: Option<String>,
}
impl DiscoveryConfig {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
name: "test-google_privacy_dlp_v2_discovery_config".into(),
display_name: Some("test-display_name".into()),
status: Some("test-status".into()),
create_time: Some("test-create_time".into()),
update_time: Some("test-update_time".into()),
last_run_time: Some("test-last_run_time".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ProjectDataProfile {
pub name: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub project_id: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_last_generated: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub sensitivity_score: Option<DlpSensitivityScore>,
#[serde(skip_serializing_if = "Option::is_none")]
pub data_risk_level: Option<DlpDataRiskLevel>,
#[serde(skip_serializing_if = "Option::is_none")]
pub table_data_profile_count: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub file_store_data_profile_count: Option<String>,
}
impl ProjectDataProfile {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
name: "test-google_privacy_dlp_v2_project_data_profile".into(),
project_id: Some("test-project_id".into()),
profile_last_generated: Some("test-profile_last_generated".into()),
sensitivity_score: Some(DlpSensitivityScore::fixture()),
data_risk_level: Some(DlpDataRiskLevel::fixture()),
table_data_profile_count: Some("test-table_data_profile_count".into()),
file_store_data_profile_count: Some("test-file_store_data_profile_count".into()),
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GooglePrivacyDlpV2ListDiscoveryConfigsResponse {
#[serde(default)]
pub discovery_configs: Vec<DiscoveryConfig>,
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option<String>,
}
impl GooglePrivacyDlpV2ListDiscoveryConfigsResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
discovery_configs: vec![],
next_page_token: None,
}
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GooglePrivacyDlpV2ListProjectDataProfilesResponse {
#[serde(default)]
pub project_data_profiles: Vec<ProjectDataProfile>,
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_token: Option<String>,
}
impl GooglePrivacyDlpV2ListProjectDataProfilesResponse {
#[cfg(any(test, feature = "test-support"))]
pub fn fixture() -> Self {
Self {
project_data_profiles: vec![],
next_page_token: None,
}
}
}