sentry_protos 0.8.20

Rust bindings for sentry-protos
Documentation
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PublishRequest {
    /// Channel identifier for routing
    #[prost(string, tag = "1")]
    pub channel_id: ::prost::alloc::string::String,
    /// Unique message identifier for deduplication and idempotency
    #[prost(string, tag = "2")]
    pub message_id: ::prost::alloc::string::String,
    /// Timestamp when client sent the event
    #[prost(message, optional, tag = "3")]
    pub client_timestamp: ::core::option::Option<::prost_types::Timestamp>,
    /// Current phase of the streaming lifecycle
    #[prost(enumeration = "Phase", tag = "4")]
    pub phase: i32,
    /// Monotonically increasing sequence number within a stream
    #[prost(uint64, tag = "5")]
    pub sequence: u64,
    /// Application-specific payload data
    #[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,
    /// Initial event to establish stream
    Start = 1,
    /// Incremental updates
    Delta = 2,
    /// Clean stream termination
    End = 3,
    /// Stream encountered an error
    Error = 4,
}
impl Phase {
    /// 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 {
            Self::Unspecified => "PHASE_UNSPECIFIED",
            Self::Start => "PHASE_START",
            Self::Delta => "PHASE_DELTA",
            Self::End => "PHASE_END",
            Self::Error => "PHASE_ERROR",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    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,
        }
    }
}