// @generated
// This file is @generated by prost-build.
/// ETF 주문장 데이터
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EtfOrderbookData {
    /// 매수 호가 (10단계, AIP-144)
    #[prost(string, repeated, tag="1")]
    pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매도 호가 (10단계)
    #[prost(string, repeated, tag="2")]
    pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매수 수량 (10단계)
    #[prost(int64, repeated, tag="3")]
    pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 매도 수량 (10단계)
    #[prost(int64, repeated, tag="4")]
    pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
    /// LP 매수 수량 (10단계)
    #[prost(int64, repeated, tag="5")]
    pub lp_bid_quantities: ::prost::alloc::vec::Vec<i64>,
    /// LP 매도 수량 (10단계)
    #[prost(int64, repeated, tag="6")]
    pub lp_ask_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 ask_quote_total_quantity: i64,
    /// 총 매수 호가 수량
    #[prost(int64, tag="11")]
    pub bid_quote_total_quantity: i64,
    /// 예상 가격
    #[prost(string, tag="12")]
    pub est_price: ::prost::alloc::string::String,
    /// 예상 거래량
    #[prost(int64, tag="13")]
    pub est_volume: i64,
    /// 세션 ID
    #[prost(enumeration="SessionId", tag="14")]
    pub session_id: i32,
}
/// 선물 주문장 데이터
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FuturesOrderbookData {
    /// 매수 호가 (5단계, AIP-144)
    #[prost(string, repeated, tag="1")]
    pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매도 호가 (5단계)
    #[prost(string, repeated, tag="2")]
    pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매수 수량 (5단계)
    #[prost(int64, repeated, tag="3")]
    pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 매도 수량 (5단계)
    #[prost(int64, repeated, tag="4")]
    pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 매수 주문 수 (5단계)
    #[prost(int64, repeated, tag="5")]
    pub bid_counts: ::prost::alloc::vec::Vec<i64>,
    /// 매도 주문 수 (5단계)
    #[prost(int64, repeated, tag="6")]
    pub ask_counts: ::prost::alloc::vec::Vec<i64>,
    /// 총 매도 호가 수량
    #[prost(int64, tag="7")]
    pub ask_quote_total_quantity: i64,
    /// 총 매수 호가 수량
    #[prost(int64, tag="8")]
    pub bid_quote_total_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,
    /// 세션 ID
    #[prost(enumeration="SessionId", tag="12")]
    pub session_id: i32,
}
/// 주문 정보
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Order {
    /// 주문 ID
    #[prost(string, tag="1")]
    pub order_id: ::prost::alloc::string::String,
    /// 주문 타입
    #[prost(enumeration="OrderType", tag="2")]
    pub order_type: i32,
    /// 상품 (예: etfs/A069500)
    #[prost(string, tag="3")]
    pub symbol: ::prost::alloc::string::String,
    /// 주문 가격
    #[prost(string, tag="4")]
    pub price: ::prost::alloc::string::String,
    /// 주문 수량
    #[prost(int64, tag="5")]
    pub quantity: i64,
    /// 체결 수량
    #[prost(int64, tag="6")]
    pub filled_quantity: i64,
    /// 주문 상태
    #[prost(enumeration="OrderStatus", tag="7")]
    pub status: i32,
    /// 주문 시간 (Unix timestamp)
    #[prost(int64, tag="8")]
    pub created_at: i64,
    /// 업데이트 시간 (Unix timestamp)
    #[prost(int64, tag="9")]
    pub updated_at: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EtfNav {
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub etf_symbol: ::prost::alloc::string::String,
    /// 순자산가치 (원 단위, string)
    #[prost(string, tag="10")]
    pub theory_nav: ::prost::alloc::string::String,
    /// 전일 대비 (string)
    #[prost(string, tag="11")]
    pub krx_nav: ::prost::alloc::string::String,
}
// ========== Request/Response Messages ==========

/// ETF 주문장 스트리밍 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamEtfOrderbookRequest {
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
}
/// 선물 주문장 스트리밍 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamFuturesOrderbookRequest {
    /// 리소스 이름 (예: futures/K101W9000)
    #[prost(string, tag="1")]
    pub future: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamEtfNavRequest {
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
}
/// 주문 접수 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlaceOrderRequest {
    /// 주문 타입
    #[prost(enumeration="OrderType", tag="1")]
    pub order_type: i32,
    /// 상품 (예: etfs/A069500)
    #[prost(string, tag="2")]
    pub symbol: ::prost::alloc::string::String,
    /// 주문 가격
    #[prost(string, tag="3")]
    pub price: ::prost::alloc::string::String,
    /// 주문 수량
    #[prost(int64, tag="4")]
    pub quantity: i64,
}
/// 주문 접수 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlaceOrderResponse {
    /// 생성된 주문 정보
    #[prost(message, optional, tag="1")]
    pub order: ::core::option::Option<Order>,
}
/// 주문 취소 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelOrderRequest {
    /// 취소할 주문 ID
    #[prost(string, tag="1")]
    pub order_id: ::prost::alloc::string::String,
}
/// 주문 취소 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelOrderResponse {
    /// 취소된 주문 정보
    #[prost(message, optional, tag="1")]
    pub order: ::core::option::Option<Order>,
}
/// 모든 주문 취소 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelAllOrdersRequest {
    /// 선택적: 특정 상품의 주문만 취소
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
}
/// 모든 주문 취소 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelAllOrdersResponse {
    /// 취소된 주문 수
    #[prost(int32, tag="1")]
    pub cancelled_count: i32,
    /// 취소된 주문 목록
    #[prost(message, repeated, tag="2")]
    pub cancelled_orders: ::prost::alloc::vec::Vec<Order>,
}
/// 주문 목록 조회 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListOrdersRequest {
    /// 필터링 조건 (선택적, AIP-160)
    #[prost(string, tag="1")]
    pub filter: ::prost::alloc::string::String,
    /// 페이징 (AIP-158)
    #[prost(int32, tag="2")]
    pub page_size: i32,
    #[prost(string, tag="3")]
    pub page_token: ::prost::alloc::string::String,
}
/// 주문 목록 조회 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListOrdersResponse {
    /// 주문 목록
    #[prost(message, repeated, tag="1")]
    pub orders: ::prost::alloc::vec::Vec<Order>,
    /// 다음 페이지 토큰 (AIP-158)
    #[prost(string, tag="2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// 주문 업데이트 스트리밍 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUserOrderBookRequest {
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub fund: ::prost::alloc::string::String,
}
/// 주문 업데이트 정보
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserOrderbookData {
    /// 매수 호가 (10단계, AIP-144)
    #[prost(string, repeated, tag="1")]
    pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매도 호가 (10단계)
    #[prost(string, repeated, tag="2")]
    pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매수 수량 (10단계)
    #[prost(int64, repeated, tag="3")]
    pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 매도 수량 (10단계)
    #[prost(int64, repeated, tag="4")]
    pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
}
/// Request to add a new raw UDP socket
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddRawMessagesSocketRequest {
    /// Multicast address to listen on (e.g., "239.1.1.1")
    #[prost(string, tag="1")]
    pub multicast_address: ::prost::alloc::string::String,
    /// Interface address to bind (e.g., "192.168.1.100")
    #[prost(string, tag="2")]
    pub multicast_interface: ::prost::alloc::string::String,
    /// UDP port to listen on
    #[prost(uint32, tag="3")]
    pub port: u32,
    /// Buffer size for receiving UDP packets (default: 2048)
    #[prost(uint32, tag="4")]
    pub buffer_size: u32,
}
/// Response from adding a raw socket
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddRawMessagesSocketResponse {
    /// Whether the socket was added successfully
    #[prost(bool, tag="1")]
    pub success: bool,
    /// Error message if success is false
    #[prost(string, tag="2")]
    pub error_message: ::prost::alloc::string::String,
}
/// Request to stream raw market messages
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamRawMessagesRequest {
    /// Optional filter by socket IDs (empty = all sockets)
    #[prost(string, repeated, tag="1")]
    pub socket_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Optional buffer size for the stream (default: 100)
    #[prost(uint32, tag="2")]
    pub buffer_size: u32,
}
/// Raw market message received from UDP socket
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawMarketMessage {
    /// Raw binary data received from the socket
    #[prost(bytes="vec", tag="1")]
    pub data: ::prost::alloc::vec::Vec<u8>,
    /// Timestamp when the message was received (nanoseconds since epoch)
    #[prost(int64, tag="2")]
    pub receive_timestamp_ns: i64,
    /// Message sequence number (per socket)
    #[prost(uint64, tag="3")]
    pub sequence_number: u64,
}
/// 세션 ID 열거형 (AIP-126)
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SessionId {
    /// 기본값
    Unspecified = 0,
    /// 장개시전
    Previous = 1,
    /// 연결됨
    Connected = 2,
    /// 시가단일가
    OpeningOnePrice = 3,
    /// 단일가
    OnePrice = 4,
    /// 종가단일가
    ClosingOnePrice = 5,
    /// VI장중단일가
    ViOnePrice = 6,
    /// VI시가단일가
    ViOpeningOnePrice = 7,
    /// VI종가단일가
    ViClosingOnePrice = 8,
    /// 단위매매
    UnitTrade = 9,
    /// 장종료후호가접수
    PostMarket = 10,
    /// 경매매수호가 접수 세션
    AuctionBid = 11,
    /// 경매매도호가 접수 세션
    AuctionAsk = 12,
    /// 거래정지
    Suspended = 13,
    /// 셧다운
    Shutdown = 14,
    /// 장마감
    Closed = 15,
    /// 기타
    Etc = 16,
}
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 => "PREVIOUS",
            SessionId::Connected => "CONNECTED",
            SessionId::OpeningOnePrice => "OPENING_ONE_PRICE",
            SessionId::OnePrice => "ONE_PRICE",
            SessionId::ClosingOnePrice => "CLOSING_ONE_PRICE",
            SessionId::ViOnePrice => "VI_ONE_PRICE",
            SessionId::ViOpeningOnePrice => "VI_OPENING_ONE_PRICE",
            SessionId::ViClosingOnePrice => "VI_CLOSING_ONE_PRICE",
            SessionId::UnitTrade => "UNIT_TRADE",
            SessionId::PostMarket => "POST_MARKET",
            SessionId::AuctionBid => "AUCTION_BID",
            SessionId::AuctionAsk => "AUCTION_ASK",
            SessionId::Suspended => "SUSPENDED",
            SessionId::Shutdown => "SHUTDOWN",
            SessionId::Closed => "CLOSED",
            SessionId::Etc => "ETC",
        }
    }
    /// 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),
            "PREVIOUS" => Some(Self::Previous),
            "CONNECTED" => Some(Self::Connected),
            "OPENING_ONE_PRICE" => Some(Self::OpeningOnePrice),
            "ONE_PRICE" => Some(Self::OnePrice),
            "CLOSING_ONE_PRICE" => Some(Self::ClosingOnePrice),
            "VI_ONE_PRICE" => Some(Self::ViOnePrice),
            "VI_OPENING_ONE_PRICE" => Some(Self::ViOpeningOnePrice),
            "VI_CLOSING_ONE_PRICE" => Some(Self::ViClosingOnePrice),
            "UNIT_TRADE" => Some(Self::UnitTrade),
            "POST_MARKET" => Some(Self::PostMarket),
            "AUCTION_BID" => Some(Self::AuctionBid),
            "AUCTION_ASK" => Some(Self::AuctionAsk),
            "SUSPENDED" => Some(Self::Suspended),
            "SHUTDOWN" => Some(Self::Shutdown),
            "CLOSED" => Some(Self::Closed),
            "ETC" => Some(Self::Etc),
            _ => None,
        }
    }
}
/// 주문 타입 열거형
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrderType {
    /// 기본값
    Unspecified = 0,
    /// 매수
    Buy = 1,
    /// 매도
    Sell = 2,
}
impl OrderType {
    /// 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 {
            OrderType::Unspecified => "ORDER_TYPE_UNSPECIFIED",
            OrderType::Buy => "BUY",
            OrderType::Sell => "SELL",
        }
    }
    /// 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_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "BUY" => Some(Self::Buy),
            "SELL" => Some(Self::Sell),
            _ => None,
        }
    }
}
/// 주문 상태 열거형
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrderStatus {
    /// 기본값
    Unspecified = 0,
    /// 대기중
    Pending = 1,
    /// 부분체결
    PartialFilled = 2,
    /// 체결완료
    Filled = 3,
    /// 취소됨
    Cancelled = 4,
    /// 거부됨
    Rejected = 5,
}
impl OrderStatus {
    /// 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 {
            OrderStatus::Unspecified => "ORDER_STATUS_UNSPECIFIED",
            OrderStatus::Pending => "PENDING",
            OrderStatus::PartialFilled => "PARTIAL_FILLED",
            OrderStatus::Filled => "FILLED",
            OrderStatus::Cancelled => "CANCELLED",
            OrderStatus::Rejected => "REJECTED",
        }
    }
    /// 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_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "PENDING" => Some(Self::Pending),
            "PARTIAL_FILLED" => Some(Self::PartialFilled),
            "FILLED" => Some(Self::Filled),
            "CANCELLED" => Some(Self::Cancelled),
            "REJECTED" => Some(Self::Rejected),
            _ => None,
        }
    }
}
include!("kdo.v1.market.tonic.rs");
include!("kdo.v1.market.serde.rs");
// @@protoc_insertion_point(module)