#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PublishRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub message_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub client_timestamp: ::core::option::Option<::prost_types::Timestamp>,
#[prost(enumeration = "Phase", tag = "4")]
pub phase: i32,
#[prost(uint64, tag = "5")]
pub sequence: u64,
#[prost(message, optional, tag = "6")]
pub payload: ::core::option::Option<::prost_types::Struct>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Phase {
Unspecified = 0,
Start = 1,
Delta = 2,
End = 3,
Error = 4,
}
impl Phase {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "PHASE_UNSPECIFIED",
Self::Start => "PHASE_START",
Self::Delta => "PHASE_DELTA",
Self::End => "PHASE_END",
Self::Error => "PHASE_ERROR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PHASE_UNSPECIFIED" => Some(Self::Unspecified),
"PHASE_START" => Some(Self::Start),
"PHASE_DELTA" => Some(Self::Delta),
"PHASE_END" => Some(Self::End),
"PHASE_ERROR" => Some(Self::Error),
_ => None,
}
}
}