// @generated
// This file is @generated by prost-build.
// ============================================================================
// Request / Response
// ============================================================================

/// 마켓 피드 구독 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubscribeMarketFeedRequest {
    /// 구독 대상 ISIN 코드 목록 (예: \["KR7252670005", "KR4A01630008"\])
    #[prost(string, repeated, tag="1")]
    pub symbols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 스트리밍 시작 시각 (해당 시각 이후 데이터만 전송)
    #[prost(message, optional, tag="2")]
    pub start_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
    /// 수신할 데이터 타입 필터 (비어있으면 전체)
    #[prost(enumeration="MarketDataType", repeated, tag="3")]
    pub data_types: ::prost::alloc::vec::Vec<i32>,
}
/// 서버 상태 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarketFeedStatus {
    /// 활성 구독 스트림 수
    #[prost(int32, tag="1")]
    pub active_streams: i32,
    /// 서버 시작 이후 전송된 총 이벤트 수
    #[prost(int64, tag="2")]
    pub total_events_sent: i64,
    /// 로드된 TXT 파일 경로 목록
    #[prost(string, repeated, tag="3")]
    pub loaded_files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 서버 시작 시각
    #[prost(message, optional, tag="4")]
    pub server_start_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
// ============================================================================
// Streaming Event
// ============================================================================

/// 스트리밍되는 마켓 피드 이벤트
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarketFeedEvent {
    /// ISIN 코드 (12자리, 예: "KR7252670005")
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
    /// 거래소 시각 (마이크로초 정밀도)
    #[prost(message, optional, tag="2")]
    pub exchange_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
    /// 파일 원본 시퀀스 번호
    #[prost(int64, tag="3")]
    pub sequence_number: i64,
    /// 원본 메시지 타입 (예: "B703S", "B601F", "G701F")
    #[prost(string, tag="4")]
    pub message_type: ::prost::alloc::string::String,
    /// 마켓 세션 상태
    #[prost(enumeration="SessionId", tag="5")]
    pub session_id: i32,
    /// 파싱된 데이터 본문
    #[prost(oneof="market_feed_event::Data", tags="10, 11, 12, 13, 14")]
    pub data: ::core::option::Option<market_feed_event::Data>,
}
/// Nested message and enum types in `MarketFeedEvent`.
pub mod market_feed_event {
    /// 파싱된 데이터 본문
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Data {
        /// ETF 호가 (B703S)
        #[prost(message, tag="10")]
        EtfOrderbook(super::EtfOrderbook),
        /// 선물 호가 (B601F, G701F)
        #[prost(message, tag="11")]
        FuturesOrderbook(super::FuturesOrderbook),
        /// 주식 호가 (B601S, B601Q)
        #[prost(message, tag="12")]
        StockOrderbook(super::StockOrderbook),
        /// 체결 (A301S, A303S)
        #[prost(message, tag="13")]
        Trade(super::Trade),
        /// NAV (BV03S)
        #[prost(message, tag="14")]
        Nav(super::Nav),
    }
}
// ============================================================================
// Data Messages
// ============================================================================

/// ETF 호가 (B703S) - 10단계, LP 수량 포함
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EtfOrderbook {
    /// 매도 호가 (10단계)
    #[prost(string, repeated, tag="1")]
    pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매수 호가 (10단계)
    #[prost(string, repeated, tag="2")]
    pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매도 수량 (10단계)
    #[prost(int64, repeated, tag="3")]
    pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 매수 수량 (10단계)
    #[prost(int64, repeated, tag="4")]
    pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
    /// LP 매도 수량 (10단계)
    #[prost(int64, repeated, tag="5")]
    pub lp_ask_quantities: ::prost::alloc::vec::Vec<i64>,
    /// LP 매수 수량 (10단계)
    #[prost(int64, repeated, tag="6")]
    pub lp_bid_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 중간 호가
    #[prost(string, tag="7")]
    pub mid_price: ::prost::alloc::string::String,
    /// 중간 매도 수량
    #[prost(int64, tag="8")]
    pub mid_ask_quantity: i64,
    /// 중간 매수 수량
    #[prost(int64, tag="9")]
    pub mid_bid_quantity: i64,
    /// 총 매도 호가 수량
    #[prost(int64, tag="10")]
    pub total_ask_quantity: i64,
    /// 총 매수 호가 수량
    #[prost(int64, tag="11")]
    pub total_bid_quantity: i64,
    /// 예상 체결가
    #[prost(string, tag="12")]
    pub est_price: ::prost::alloc::string::String,
    /// 예상 체결량
    #[prost(int64, tag="13")]
    pub est_volume: i64,
}
/// 선물 호가 (B601F, G701F 등) - 5단계
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FuturesOrderbook {
    /// 매도 호가 (5단계)
    #[prost(string, repeated, tag="1")]
    pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매수 호가 (5단계)
    #[prost(string, repeated, tag="2")]
    pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매도 수량 (5단계)
    #[prost(int64, repeated, tag="3")]
    pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 매수 수량 (5단계)
    #[prost(int64, repeated, tag="4")]
    pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 매도 주문 수 (5단계)
    #[prost(int64, repeated, tag="5")]
    pub ask_counts: ::prost::alloc::vec::Vec<i64>,
    /// 매수 주문 수 (5단계)
    #[prost(int64, repeated, tag="6")]
    pub bid_counts: ::prost::alloc::vec::Vec<i64>,
    /// 총 매도 호가 수량
    #[prost(int64, tag="7")]
    pub total_ask_quantity: i64,
    /// 총 매수 호가 수량
    #[prost(int64, tag="8")]
    pub total_bid_quantity: i64,
    /// 중간 가격
    #[prost(string, tag="9")]
    pub mid_price: ::prost::alloc::string::String,
    /// 예상 체결가
    #[prost(string, tag="10")]
    pub est_price: ::prost::alloc::string::String,
    /// 예상 체결량
    #[prost(int64, tag="11")]
    pub est_volume: i64,
}
/// 주식 호가 (B601S, B601Q) - 10단계
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StockOrderbook {
    /// 매도 호가 (10단계)
    #[prost(string, repeated, tag="1")]
    pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매수 호가 (10단계)
    #[prost(string, repeated, tag="2")]
    pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매도 수량 (10단계)
    #[prost(int64, repeated, tag="3")]
    pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 매수 수량 (10단계)
    #[prost(int64, repeated, tag="4")]
    pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 중간 호가
    #[prost(string, tag="5")]
    pub mid_price: ::prost::alloc::string::String,
    /// 중간 매도 수량
    #[prost(int64, tag="6")]
    pub mid_ask_quantity: i64,
    /// 중간 매수 수량
    #[prost(int64, tag="7")]
    pub mid_bid_quantity: i64,
    /// 총 매도 호가 수량
    #[prost(int64, tag="8")]
    pub total_ask_quantity: i64,
    /// 총 매수 호가 수량
    #[prost(int64, tag="9")]
    pub total_bid_quantity: i64,
    /// 예상 체결가
    #[prost(string, tag="10")]
    pub est_price: ::prost::alloc::string::String,
    /// 예상 체결량
    #[prost(int64, tag="11")]
    pub est_volume: i64,
}
/// 체결 (A301S, A301Q, A303S)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Trade {
    /// 체결 가격
    #[prost(string, tag="1")]
    pub price: ::prost::alloc::string::String,
    /// 체결 수량
    #[prost(int64, tag="2")]
    pub quantity: i64,
    /// 매수/매도 방향
    #[prost(enumeration="OrderSide", tag="3")]
    pub side: i32,
    /// 누적 거래량
    #[prost(int64, tag="4")]
    pub cumulative_volume: i64,
    /// 누적 거래대금
    #[prost(string, tag="5")]
    pub cumulative_value: ::prost::alloc::string::String,
}
/// NAV (BV03S, BW03S, L503S)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Nav {
    /// 직전 NAV
    #[prost(string, tag="1")]
    pub prev_nav: ::prost::alloc::string::String,
    /// 현재 NAV
    #[prost(string, tag="2")]
    pub current_nav: ::prost::alloc::string::String,
}
// ============================================================================
// Enums
// ============================================================================

/// 매수/매도 구분
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrderSide {
    Unspecified = 0,
    /// 매수
    Bid = 1,
    /// 매도
    Ask = 2,
}
impl OrderSide {
    /// 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 {
            OrderSide::Unspecified => "ORDER_SIDE_UNSPECIFIED",
            OrderSide::Bid => "ORDER_SIDE_BID",
            OrderSide::Ask => "ORDER_SIDE_ASK",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ORDER_SIDE_UNSPECIFIED" => Some(Self::Unspecified),
            "ORDER_SIDE_BID" => Some(Self::Bid),
            "ORDER_SIDE_ASK" => Some(Self::Ask),
            _ => None,
        }
    }
}
/// 세션 ID (장 상태)
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SessionId {
    Unspecified = 0,
    /// 장개시전
    Previous = 1,
    /// 시가단일가
    OpeningAuction = 2,
    /// 단일가
    OnePrice = 3,
    /// 종가단일가
    ClosingAuction = 4,
    /// 접속 (정규장)
    Continuous = 5,
    /// VI장중단일가
    ViAuction = 6,
    /// VI시가단일가
    ViOpeningAuction = 7,
    /// VI종가단일가
    ViClosingAuction = 8,
    /// 장종료후호가접수
    PostMarket = 9,
    /// 경매매수호가 접수
    AuctionBid = 10,
    /// 경매매도호가 접수
    AuctionAsk = 11,
    /// 단위매매
    UnitTrade = 12,
    /// 거래정지
    Suspended = 13,
    /// SHUTDOWN
    Shutdown = 14,
    /// 장마감
    Closed = 15,
}
impl SessionId {
    /// 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 {
            SessionId::Unspecified => "SESSION_ID_UNSPECIFIED",
            SessionId::Previous => "SESSION_ID_PREVIOUS",
            SessionId::OpeningAuction => "SESSION_ID_OPENING_AUCTION",
            SessionId::OnePrice => "SESSION_ID_ONE_PRICE",
            SessionId::ClosingAuction => "SESSION_ID_CLOSING_AUCTION",
            SessionId::Continuous => "SESSION_ID_CONTINUOUS",
            SessionId::ViAuction => "SESSION_ID_VI_AUCTION",
            SessionId::ViOpeningAuction => "SESSION_ID_VI_OPENING_AUCTION",
            SessionId::ViClosingAuction => "SESSION_ID_VI_CLOSING_AUCTION",
            SessionId::PostMarket => "SESSION_ID_POST_MARKET",
            SessionId::AuctionBid => "SESSION_ID_AUCTION_BID",
            SessionId::AuctionAsk => "SESSION_ID_AUCTION_ASK",
            SessionId::UnitTrade => "SESSION_ID_UNIT_TRADE",
            SessionId::Suspended => "SESSION_ID_SUSPENDED",
            SessionId::Shutdown => "SESSION_ID_SHUTDOWN",
            SessionId::Closed => "SESSION_ID_CLOSED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SESSION_ID_UNSPECIFIED" => Some(Self::Unspecified),
            "SESSION_ID_PREVIOUS" => Some(Self::Previous),
            "SESSION_ID_OPENING_AUCTION" => Some(Self::OpeningAuction),
            "SESSION_ID_ONE_PRICE" => Some(Self::OnePrice),
            "SESSION_ID_CLOSING_AUCTION" => Some(Self::ClosingAuction),
            "SESSION_ID_CONTINUOUS" => Some(Self::Continuous),
            "SESSION_ID_VI_AUCTION" => Some(Self::ViAuction),
            "SESSION_ID_VI_OPENING_AUCTION" => Some(Self::ViOpeningAuction),
            "SESSION_ID_VI_CLOSING_AUCTION" => Some(Self::ViClosingAuction),
            "SESSION_ID_POST_MARKET" => Some(Self::PostMarket),
            "SESSION_ID_AUCTION_BID" => Some(Self::AuctionBid),
            "SESSION_ID_AUCTION_ASK" => Some(Self::AuctionAsk),
            "SESSION_ID_UNIT_TRADE" => Some(Self::UnitTrade),
            "SESSION_ID_SUSPENDED" => Some(Self::Suspended),
            "SESSION_ID_SHUTDOWN" => Some(Self::Shutdown),
            "SESSION_ID_CLOSED" => Some(Self::Closed),
            _ => None,
        }
    }
}
/// 마켓 데이터 타입 필터
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MarketDataType {
    Unspecified = 0,
    /// ETF 호가 (B703S)
    EtfOrderbook = 1,
    /// 선물 호가 (B601F, G701F 등)
    FuturesOrderbook = 2,
    /// 주식 호가 (B601S, B601Q)
    StockOrderbook = 3,
    /// 체결 (A301S, A301Q, A303S)
    Trade = 4,
    /// NAV (BV03S, BW03S, L503S)
    Nav = 5,
}
impl MarketDataType {
    /// 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 {
            MarketDataType::Unspecified => "MARKET_DATA_TYPE_UNSPECIFIED",
            MarketDataType::EtfOrderbook => "MARKET_DATA_TYPE_ETF_ORDERBOOK",
            MarketDataType::FuturesOrderbook => "MARKET_DATA_TYPE_FUTURES_ORDERBOOK",
            MarketDataType::StockOrderbook => "MARKET_DATA_TYPE_STOCK_ORDERBOOK",
            MarketDataType::Trade => "MARKET_DATA_TYPE_TRADE",
            MarketDataType::Nav => "MARKET_DATA_TYPE_NAV",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "MARKET_DATA_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "MARKET_DATA_TYPE_ETF_ORDERBOOK" => Some(Self::EtfOrderbook),
            "MARKET_DATA_TYPE_FUTURES_ORDERBOOK" => Some(Self::FuturesOrderbook),
            "MARKET_DATA_TYPE_STOCK_ORDERBOOK" => Some(Self::StockOrderbook),
            "MARKET_DATA_TYPE_TRADE" => Some(Self::Trade),
            "MARKET_DATA_TYPE_NAV" => Some(Self::Nav),
            _ => None,
        }
    }
}
include!("market.v1.feed.tonic.rs");
include!("market.v1.feed.serde.rs");
// @@protoc_insertion_point(module)