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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233
// This file is @generated by prost-build.
/// Logged event discussing an abuse finding on the monitored resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AbuseEvent {
/// REQUIRED Correlates to the abuse finding causing the notification.
#[prost(enumeration = "abuse_event::DetectionType", tag = "1")]
pub detection_type: i32,
/// REQUIRED Explains the meaning of the detection_type.
#[prost(string, tag = "2")]
pub reason: ::prost::alloc::string::String,
/// REQUIRED Correlates to the action taken on the monitored resource.
#[prost(enumeration = "abuse_event::ActionType", tag = "3")]
pub action: i32,
/// Contains the umbrella link for remediation after an abuse notification.
#[prost(string, tag = "7")]
pub remediation_link: ::prost::alloc::string::String,
/// REQUIRED Contains addiional metadata about the detected abuse event.
#[prost(oneof = "abuse_event::EventType", tags = "4, 5, 6, 8, 9")]
pub event_type: ::core::option::Option<abuse_event::EventType>,
}
/// Nested message and enum types in `AbuseEvent`.
pub mod abuse_event {
/// Indicates the type of abuse detected on the monitored resource.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum DetectionType {
/// Default/unspecified abuse detection type.
Unspecified = 0,
/// The monitored resource is used to mine cryptocurrencies.
CryptoMining = 1,
/// The monitored resource's credentials have accidentally been leaked on the
/// internet.
LeakedCredentials = 2,
/// The monitored resource is used for phishing attacks.
Phishing = 3,
/// The monitored resource is associated with content that is infected or
/// infects users with malicious software.
Malware = 4,
/// No abuse is detected on the monitored resource, but its abuse state may
/// have been updated.
NoAbuse = 5,
}
impl DetectionType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
DetectionType::Unspecified => "DETECTION_TYPE_UNSPECIFIED",
DetectionType::CryptoMining => "CRYPTO_MINING",
DetectionType::LeakedCredentials => "LEAKED_CREDENTIALS",
DetectionType::Phishing => "PHISHING",
DetectionType::Malware => "MALWARE",
DetectionType::NoAbuse => "NO_ABUSE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DETECTION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"CRYPTO_MINING" => Some(Self::CryptoMining),
"LEAKED_CREDENTIALS" => Some(Self::LeakedCredentials),
"PHISHING" => Some(Self::Phishing),
"MALWARE" => Some(Self::Malware),
"NO_ABUSE" => Some(Self::NoAbuse),
_ => None,
}
}
}
/// Indicates any action taken on the monitored resource due to abuse
/// detection.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ActionType {
/// The monitored resource state is unspecified.
Unspecified = 0,
/// The owner of the monitored resource needs to be notified about a finding.
Notify = 1,
/// The associated cloud project has been suspended.
ProjectSuspension = 2,
/// The monitored resource has been reinstated.
Reinstate = 3,
/// The owner of the monitored resource needs to be warned about abusive
/// behavior. This notification could lead to future enforcements if remedial
/// actions are not taken. This action should not be confused with NOTIFY.
Warn = 4,
/// The resource (eg: VM) has been suspended.
ResourceSuspension = 5,
}
impl ActionType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
ActionType::Unspecified => "ACTION_TYPE_UNSPECIFIED",
ActionType::Notify => "NOTIFY",
ActionType::ProjectSuspension => "PROJECT_SUSPENSION",
ActionType::Reinstate => "REINSTATE",
ActionType::Warn => "WARN",
ActionType::ResourceSuspension => "RESOURCE_SUSPENSION",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ACTION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"NOTIFY" => Some(Self::Notify),
"PROJECT_SUSPENSION" => Some(Self::ProjectSuspension),
"REINSTATE" => Some(Self::Reinstate),
"WARN" => Some(Self::Warn),
"RESOURCE_SUSPENSION" => Some(Self::ResourceSuspension),
_ => None,
}
}
}
/// REQUIRED Contains addiional metadata about the detected abuse event.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum EventType {
/// Information about a cryptocurrency mining event observed on the monitored
/// resource.
#[prost(message, tag = "4")]
CryptoMiningEvent(super::CryptoMiningEvent),
/// Information about the leaked client credentials observed on the monitored
/// resource.
#[prost(message, tag = "5")]
LeakedCredentialEvent(super::LeakedCredentialEvent),
/// Information about the phishing/malware URI(s) associated with the
/// monitored resource.
#[prost(message, tag = "6")]
HarmfulContentEvent(super::HarmfulContentEvent),
/// Information about the reinstatement issued on the monitored resource.
#[prost(message, tag = "8")]
ReinstatementEvent(super::ReinstatementEvent),
/// Information about the escalation of enforcement action on the monitored
/// resource.
#[prost(message, tag = "9")]
DecisionEscalationEvent(super::DecisionEscalationEvent),
}
}
/// Information about a cryptocurrency mining event observed on the monitored
/// resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CryptoMiningEvent {
/// VM and zone in which cryptocurrency mining occurred.
/// Format: projects/{project}/zones/{zone}/instances/{instance}
#[prost(string, repeated, tag = "1")]
pub vm_resource: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Detected start time of the cryptocurrency mining.
#[prost(message, optional, tag = "2")]
pub detected_mining_start_time: ::core::option::Option<::prost_types::Timestamp>,
/// Detected end time of the cryptocurrency mining.
#[prost(message, optional, tag = "3")]
pub detected_mining_end_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Information about the leaked client credentials observed on the monitored
/// resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeakedCredentialEvent {
/// URI where the client credentials were found.
#[prost(string, tag = "3")]
pub detected_uri: ::prost::alloc::string::String,
/// Indicates the type of credential leaked.
#[prost(oneof = "leaked_credential_event::CredentialType", tags = "1, 2")]
pub credential_type: ::core::option::Option<leaked_credential_event::CredentialType>,
}
/// Nested message and enum types in `LeakedCredentialEvent`.
pub mod leaked_credential_event {
/// Indicates the type of credential leaked.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum CredentialType {
/// Information about leaked service accounts.
#[prost(message, tag = "1")]
ServiceAccountCredential(super::ServiceAccountCredential),
/// Information about leaked API keys.
#[prost(message, tag = "2")]
ApiKeyCredential(super::ApiKeyCredential),
}
}
/// Information about leaked service accounts.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServiceAccountCredential {
/// Service account whose credentials were leaked.
#[prost(string, tag = "1")]
pub service_account: ::prost::alloc::string::String,
/// Private Key ID for any leaked keys.
#[prost(string, tag = "2")]
pub key_id: ::prost::alloc::string::String,
}
/// Information about leaked API keys.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApiKeyCredential {
/// API key that was leaked.
#[prost(string, tag = "1")]
pub api_key: ::prost::alloc::string::String,
}
/// Information about the phishing/malware URIs associated with the monitored
/// resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HarmfulContentEvent {
/// URIs associated with the phishing/malware finding.
#[prost(string, repeated, tag = "1")]
pub uri: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Information about the reinstatement issued on the monitored resource.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReinstatementEvent {}
/// Information about the escalation of enforcement action on the monitored
/// resource. Eg: Used for repeat offenders.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DecisionEscalationEvent {}