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
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstanceEvent {
/// The type of the event, e.g. Create, Update, etc.
#[prost(string, tag = "1")]
pub verb: ::prost::alloc::string::String,
/// The state of the instance, e.g. "RETRYING_CREATE_INSTANCE".
#[prost(string, tag = "2")]
pub stage: ::prost::alloc::string::String,
/// A human-readable log message, e.g. "error in stage: CREATING, err: location
/// not available".
#[prost(string, tag = "3")]
pub msg: ::prost::alloc::string::String,
/// The ID to uniquely locate all logs associated with a given request.
#[prost(string, tag = "4")]
pub trace_id: ::prost::alloc::string::String,
/// The instance node which is the subject of the operation, if known.
/// Currently unused as tf actuation does not manage nodes.
#[prost(string, tag = "5")]
pub node_id: ::prost::alloc::string::String,
}
/// Payload proto for Notification logs.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NotificationStage {
/// The type of the Notification Service event.
#[prost(enumeration = "notification_stage::Stage", tag = "1")]
pub stage: i32,
/// Time of the NotificationServiceEvent.
#[prost(message, optional, tag = "2")]
pub event_time: ::core::option::Option<::prost_types::Timestamp>,
/// The id of the notification.
#[prost(string, tag = "3")]
pub notification_id: ::prost::alloc::string::String,
/// The event that triggered the notification.
#[prost(enumeration = "notification_stage::Event", tag = "4")]
pub event: i32,
/// Message to denote the error related to the event if applicable.
#[prost(string, tag = "5")]
pub message: ::prost::alloc::string::String,
}
/// Nested message and enum types in `NotificationStage`.
pub mod notification_stage {
/// Types of Notification Status.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Stage {
/// Default.
Unspecified = 0,
/// Notification was sent.
Sent = 1,
/// Notification failed to send.
SendFailure = 2,
/// Notification was dropped.
Dropped = 3,
}
impl Stage {
/// 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 {
Stage::Unspecified => "STAGE_UNSPECIFIED",
Stage::Sent => "SENT",
Stage::SendFailure => "SEND_FAILURE",
Stage::Dropped => "DROPPED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STAGE_UNSPECIFIED" => Some(Self::Unspecified),
"SENT" => Some(Self::Sent),
"SEND_FAILURE" => Some(Self::SendFailure),
"DROPPED" => Some(Self::Dropped),
_ => None,
}
}
}
/// Event that triggered the notification.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Event {
/// Default value.
Unspecified = 0,
/// When a health status has been changed.
HealthStatusChange = 1,
}
impl Event {
/// 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 {
Event::Unspecified => "EVENT_UNSPECIFIED",
Event::HealthStatusChange => "HEALTH_STATUS_CHANGE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EVENT_UNSPECIFIED" => Some(Self::Unspecified),
"HEALTH_STATUS_CHANGE" => Some(Self::HealthStatusChange),
_ => None,
}
}
}
}