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

#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubmitOrderRequest {
    /// 펀드 코드 (필수)
    #[prost(string, tag="1")]
    pub fund_code: ::prost::alloc::string::String,
    /// 종목 코드 ISIN (필수)
    #[prost(string, tag="2")]
    pub symbol: ::prost::alloc::string::String,
    /// 매수/매도 (필수)
    #[prost(enumeration="OrderSide", tag="3")]
    pub side: i32,
    /// 수량 (필수)
    #[prost(int64, tag="4")]
    pub quantity: i64,
    /// 가격 (필수, 시장가 주문 시 0)
    #[prost(int64, tag="5")]
    pub price: i64,
    /// 주문 유형 (기본: LIMIT)
    #[prost(enumeration="QuoteType", tag="6")]
    pub quote_type: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubmitOrderResponse {
    /// 주문 ID
    #[prost(uint64, tag="1")]
    pub order_id: u64,
    /// 주문 상태
    #[prost(enumeration="OrderStatus", tag="2")]
    pub status: i32,
    /// 결과 메시지
    #[prost(string, tag="3")]
    pub message: ::prost::alloc::string::String,
}
// ========== AmendOrder ==========

#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AmendOrderRequest {
    /// 원주문 ID (필수)
    #[prost(uint64, tag="1")]
    pub original_order_id: u64,
    /// 펀드 코드 (필수)
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    /// 종목 코드 (필수)
    #[prost(string, tag="3")]
    pub symbol: ::prost::alloc::string::String,
    /// 정정 수량 (optional, 0이면 변경 없음)
    #[prost(int64, tag="4")]
    pub quantity: i64,
    /// 정정 가격 (optional, 0이면 변경 없음)
    #[prost(int64, tag="5")]
    pub price: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AmendOrderResponse {
    /// 신규 주문 ID
    #[prost(uint64, tag="1")]
    pub order_id: u64,
    /// 원주문 ID
    #[prost(uint64, tag="2")]
    pub original_order_id: u64,
    /// 주문 상태
    #[prost(enumeration="OrderStatus", tag="3")]
    pub status: i32,
    /// 결과 메시지
    #[prost(string, tag="4")]
    pub message: ::prost::alloc::string::String,
}
// ========== CancelOrder ==========

#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelOrderRequest {
    /// 원주문 ID (필수)
    #[prost(uint64, tag="1")]
    pub original_order_id: u64,
    /// 펀드 코드 (필수)
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    /// 종목 코드 (필수)
    #[prost(string, tag="3")]
    pub symbol: ::prost::alloc::string::String,
    /// 취소 수량 (optional, 0이면 전량)
    #[prost(int64, tag="4")]
    pub quantity: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelOrderResponse {
    /// 취소 주문 ID
    #[prost(uint64, tag="1")]
    pub order_id: u64,
    /// 원주문 ID
    #[prost(uint64, tag="2")]
    pub original_order_id: u64,
    /// 주문 상태
    #[prost(enumeration="OrderStatus", tag="3")]
    pub status: i32,
    /// 결과 메시지
    #[prost(string, tag="4")]
    pub message: ::prost::alloc::string::String,
}
// ========== StreamOrderResults ==========

#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamOrderResultsRequest {
    /// 필터: 특정 펀드만 (optional)
    #[prost(string, optional, tag="1")]
    pub fund_code: ::core::option::Option<::prost::alloc::string::String>,
    /// 필터: 특정 종목만 (optional)
    #[prost(string, optional, tag="2")]
    pub symbol: ::core::option::Option<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrderResult {
    /// 주문 ID
    #[prost(uint64, tag="1")]
    pub order_id: u64,
    /// 종목 코드
    #[prost(string, tag="2")]
    pub symbol: ::prost::alloc::string::String,
    /// 펀드 코드
    #[prost(string, tag="3")]
    pub fund_code: ::prost::alloc::string::String,
    /// 매수/매도
    #[prost(enumeration="OrderSide", tag="4")]
    pub side: i32,
    /// 가격
    #[prost(int64, tag="5")]
    pub price: i64,
    /// 수량
    #[prost(int64, tag="6")]
    pub quantity: i64,
    /// 결과 유형
    #[prost(enumeration="OrderResultType", tag="7")]
    pub result_type: i32,
    /// 타임스탬프
    #[prost(message, optional, tag="8")]
    pub timestamp: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
    /// result_type에 따른 추가 정보
    #[prost(oneof="order_result::Details", tags="10, 11, 12, 13")]
    pub details: ::core::option::Option<order_result::Details>,
}
/// Nested message and enum types in `OrderResult`.
pub mod order_result {
    /// result_type에 따른 추가 정보
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Details {
        #[prost(message, tag="10")]
        Received(super::ReceivedDetails),
        #[prost(message, tag="11")]
        Rejected(super::RejectedDetails),
        #[prost(message, tag="12")]
        Filled(super::FilledDetails),
        #[prost(message, tag="13")]
        Cancelled(super::CancelledDetails),
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReceivedDetails {
    /// 접수 시간 (nanoseconds since epoch)
    #[prost(uint64, tag="1")]
    pub receive_time: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RejectedDetails {
    /// 거부 코드
    #[prost(string, tag="1")]
    pub rejection_code: ::prost::alloc::string::String,
    /// 에러 메시지
    #[prost(string, tag="2")]
    pub error_message: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FilledDetails {
    /// 체결 가격
    #[prost(int64, tag="1")]
    pub filled_price: i64,
    /// 체결 수량
    #[prost(int64, tag="2")]
    pub filled_quantity: i64,
    /// 체결 시간 (nanoseconds since epoch)
    #[prost(uint64, tag="3")]
    pub trade_time: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelledDetails {
    /// 취소 코드
    #[prost(string, tag="1")]
    pub cancellation_code: ::prost::alloc::string::String,
    /// 취소 수량
    #[prost(int64, tag="2")]
    pub cancelled_quantity: i64,
}
/// 주문 목록 조회 요청
#[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 Order {
    /// 주문 ID
    #[prost(string, tag="1")]
    pub order_id: ::prost::alloc::string::String,
    /// 주문 타입
    #[prost(enumeration="OrderSide", tag="2")]
    pub order_side: 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,
}
// ========== 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,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum QuoteType {
    Unspecified = 0,
    /// 지정가
    Limit = 1,
    /// 시장가
    Market = 2,
}
impl QuoteType {
    /// 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 {
            QuoteType::Unspecified => "QUOTE_TYPE_UNSPECIFIED",
            QuoteType::Limit => "QUOTE_TYPE_LIMIT",
            QuoteType::Market => "QUOTE_TYPE_MARKET",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "QUOTE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "QUOTE_TYPE_LIMIT" => Some(Self::Limit),
            "QUOTE_TYPE_MARKET" => Some(Self::Market),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrderStatus {
    Unspecified = 0,
    /// 주문 제출됨
    Submitted = 1,
    /// 거부됨 (validation 실패)
    Rejected = 2,
}
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::Submitted => "ORDER_STATUS_SUBMITTED",
            OrderStatus::Rejected => "ORDER_STATUS_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),
            "ORDER_STATUS_SUBMITTED" => Some(Self::Submitted),
            "ORDER_STATUS_REJECTED" => Some(Self::Rejected),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrderResultType {
    Unspecified = 0,
    /// 접수됨
    Received = 1,
    /// 거부됨
    Rejected = 2,
    /// 체결됨
    Filled = 3,
    /// 취소됨
    Cancelled = 4,
}
impl OrderResultType {
    /// 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 {
            OrderResultType::Unspecified => "ORDER_RESULT_TYPE_UNSPECIFIED",
            OrderResultType::Received => "ORDER_RESULT_TYPE_RECEIVED",
            OrderResultType::Rejected => "ORDER_RESULT_TYPE_REJECTED",
            OrderResultType::Filled => "ORDER_RESULT_TYPE_FILLED",
            OrderResultType::Cancelled => "ORDER_RESULT_TYPE_CANCELLED",
        }
    }
    /// 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_RESULT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "ORDER_RESULT_TYPE_RECEIVED" => Some(Self::Received),
            "ORDER_RESULT_TYPE_REJECTED" => Some(Self::Rejected),
            "ORDER_RESULT_TYPE_FILLED" => Some(Self::Filled),
            "ORDER_RESULT_TYPE_CANCELLED" => Some(Self::Cancelled),
            _ => None,
        }
    }
}
include!("kdo.v1.order.tonic.rs");
include!("kdo.v1.order.serde.rs");
// @@protoc_insertion_point(module)