// This file is @generated by prost-build.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FrameHeader {
    /// Magic number: 0x4E57424D ("NWBM")
    #[prost(uint32, tag = "1")]
    pub magic: u32,
    /// Type of the following message
    #[prost(enumeration = "MessageType", tag = "2")]
    pub message_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PingMessage {
    /// Incrementing sequence number
    #[prost(uint64, tag = "1")]
    pub sequence_number: u64,
    /// Sender's timestamp in microseconds
    #[prost(uint64, tag = "2")]
    pub timestamp: u64,
    /// Optional payload to measure throughput
    #[prost(bytes = "vec", tag = "3")]
    pub payload: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PongMessage {
    /// Matching sequence number from ping
    #[prost(uint64, tag = "1")]
    pub sequence_number: u64,
    /// Original ping timestamp
    #[prost(uint64, tag = "2")]
    pub timestamp: u64,
    /// Timestamp when ping was received
    #[prost(uint64, tag = "3")]
    pub receive_timestamp: u64,
    /// Echo of ping payload
    #[prost(bytes = "vec", tag = "4")]
    pub payload: ::prost::alloc::vec::Vec<u8>,
}
/// Hello message for initial handshake
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HelloMessage {
    /// Protocol version for compatibility
    #[prost(uint32, tag = "1")]
    pub protocol_version: u32,
    /// Random nonce for security
    #[prost(bytes = "vec", tag = "2")]
    pub nonce: ::prost::alloc::vec::Vec<u8>,
    /// List of supported features/capabilities
    #[prost(string, repeated, tag = "3")]
    pub capabilities: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Connection flags/options
    #[prost(fixed32, tag = "4")]
    pub flags: u32,
}
/// Server response to auth message
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthResponse {
    #[prost(enumeration = "auth_response::Status", tag = "1")]
    pub status: i32,
    /// Optional error message
    #[prost(string, optional, tag = "2")]
    pub message: ::core::option::Option<::prost::alloc::string::String>,
}
/// Nested message and enum types in `AuthResponse`.
pub mod auth_response {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Status {
        Ok = 0,
        NotOk = 1,
    }
    impl Status {
        /// 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::Ok => "OK",
                Self::NotOk => "NOT_OK",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "OK" => Some(Self::Ok),
                "NOT_OK" => Some(Self::NotOk),
                _ => None,
            }
        }
    }
}
/// Authentication message
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthMessage {
    #[prost(string, tag = "1")]
    pub auth: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub serial: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "3")]
    pub sign: ::prost::alloc::vec::Vec<u8>,
    #[prost(uint64, tag = "4")]
    pub stream_id: u64,
}
/// H264 specific message
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct H264Message {
    /// Raw H264 frame data
    #[prost(bytes = "vec", tag = "1")]
    pub data: ::prost::alloc::vec::Vec<u8>,
    /// Presentation timestamp
    #[prost(uint64, tag = "2")]
    pub timestamp: u64,
    /// 0: Unknown, 1: I-Frame, 2: P-Frame, 3: B-Frame
    #[prost(uint32, tag = "3")]
    pub frame_type: u32,
    /// Frame-specific metadata
    #[prost(map = "string, string", tag = "4")]
    pub metadata: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Frame width if known
    #[prost(uint32, optional, tag = "5")]
    pub width: ::core::option::Option<u32>,
    /// Frame height if known
    #[prost(uint32, optional, tag = "6")]
    pub height: ::core::option::Option<u32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataMessage {
    /// Type of data being carried
    #[prost(enumeration = "MessageType", tag = "1")]
    pub r#type: i32,
    /// Message timestamp
    #[prost(uint64, tag = "5")]
    pub timestamp: u64,
    #[prost(oneof = "data_message::Payload", tags = "2")]
    pub payload: ::core::option::Option<data_message::Payload>,
}
/// Nested message and enum types in `DataMessage`.
pub mod data_message {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Payload {
        /// H264 frame data and metadata
        #[prost(message, tag = "2")]
        H264(super::H264Message),
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MessageType {
    Unknown = 0,
    Hello = 1,
    Init = 2,
    Auth = 3,
    AuthResponse = 4,
    H264 = 5,
    Ping = 6,
    Pong = 7,
}
impl MessageType {
    /// 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::Unknown => "UNKNOWN",
            Self::Hello => "HELLO",
            Self::Init => "INIT",
            Self::Auth => "AUTH",
            Self::AuthResponse => "AUTH_RESPONSE",
            Self::H264 => "H264",
            Self::Ping => "PING",
            Self::Pong => "PONG",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "UNKNOWN" => Some(Self::Unknown),
            "HELLO" => Some(Self::Hello),
            "INIT" => Some(Self::Init),
            "AUTH" => Some(Self::Auth),
            "AUTH_RESPONSE" => Some(Self::AuthResponse),
            "H264" => Some(Self::H264),
            "PING" => Some(Self::Ping),
            "PONG" => Some(Self::Pong),
            _ => None,
        }
    }
}
