// @generated
// This file is @generated by prost-build.
/// ETF 가격 산출 방식
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EtfPricing {
    #[prost(oneof="etf_pricing::Method", tags="1, 2, 3, 4, 5")]
    pub method: ::core::option::Option<etf_pricing::Method>,
}
/// Nested message and enum types in `EtfPricing`.
pub mod etf_pricing {
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Method {
        /// 분해 헷지 방식
        #[prost(message, tag="1")]
        PdfNavHedge(super::PdfNavHedgePricing),
        /// 선물 헷지 방식
        #[prost(message, tag="2")]
        IndexTrackingHedge(super::IndexTrackingHedgePricing),
        #[prost(message, tag="3")]
        FutureBasis(super::FutureBasis),
        /// 레버리지 선물 방식
        #[prost(message, tag="4")]
        LeverageFuture(super::LeverageFuturePricing),
        /// PDF 재귀 분해 헷지 방식: leaf가 단일 종목으로 귀결되는 ETF에 대한 프라이싱
        #[prost(message, tag="5")]
        PdfDecomposeHedge(super::PdfDecomposeHedgePricing),
    }
}
/// 분해 헷지 가격 산출 (추가 파라미터 없음)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PdfNavHedgePricing {
}
/// 선물 헷지 가격 산출
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct IndexTrackingHedgePricing {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FutureBasis {
    #[prost(string, tag="1")]
    pub prev_index: ::prost::alloc::string::String,
}
/// 레버리지 선물 가격 산출
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LeverageFuturePricing {
    /// 기초지수 전일종가
    #[prost(double, tag="1")]
    pub prev_index: f64,
    /// 선물 전일종가
    #[prost(double, tag="2")]
    pub prev_future: f64,
}
/// PDF 재귀 분해 헷지 가격 산출 (파라미터 없음)
/// NAV 계산은 Etf.decomposed_constituents를 PdfNavHedge와 동일 공식으로 적용.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PdfDecomposeHedgePricing {
}
/// 주문 방향
#[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 MarketType {
    Unspecified = 0,
    /// KOSPI
    Kospi = 1,
    /// KOSDAQ
    Kosdaq = 2,
    /// 파생상품
    Derivative = 3,
}
impl MarketType {
    /// 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 {
            MarketType::Unspecified => "MARKET_TYPE_UNSPECIFIED",
            MarketType::Kospi => "MARKET_TYPE_KOSPI",
            MarketType::Kosdaq => "MARKET_TYPE_KOSDAQ",
            MarketType::Derivative => "MARKET_TYPE_DERIVATIVE",
        }
    }
    /// 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_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "MARKET_TYPE_KOSPI" => Some(Self::Kospi),
            "MARKET_TYPE_KOSDAQ" => Some(Self::Kosdaq),
            "MARKET_TYPE_DERIVATIVE" => Some(Self::Derivative),
            _ => None,
        }
    }
}
/// 상품 타입
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProductType {
    Unspecified = 0,
    Stock = 1,
    Futures = 2,
    Etf = 3,
    Cash = 4,
}
impl ProductType {
    /// 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 {
            ProductType::Unspecified => "PRODUCT_TYPE_UNSPECIFIED",
            ProductType::Stock => "PRODUCT_TYPE_STOCK",
            ProductType::Futures => "PRODUCT_TYPE_FUTURES",
            ProductType::Etf => "PRODUCT_TYPE_ETF",
            ProductType::Cash => "PRODUCT_TYPE_CASH",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PRODUCT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "PRODUCT_TYPE_STOCK" => Some(Self::Stock),
            "PRODUCT_TYPE_FUTURES" => Some(Self::Futures),
            "PRODUCT_TYPE_ETF" => Some(Self::Etf),
            "PRODUCT_TYPE_CASH" => Some(Self::Cash),
            _ => None,
        }
    }
}
/// KRX 세부 세션 ID (16-state)
#[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,
        }
    }
}
/// 호가조건코드 (KRX)
/// 주문 체결 방식을 지정하는 조건
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrderConditionType {
    /// 미지정 (기본값: FAS로 처리, 하위 호환)
    Unspecified = 0,
    /// Fill-and-Store: 체결 후 잔량은 호가창에 유지 (일반 지정가) — KRX code "0"
    Fas = 1,
    /// Fill-and-Kill (IOC): 체결 후 잔량 즉시 취소 — KRX code "3"
    Fak = 2,
    /// Fill-or-Kill: 전량 체결 아니면 전량 취소 — KRX code "4"
    Fok = 3,
}
impl OrderConditionType {
    /// 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 {
            OrderConditionType::Unspecified => "ORDER_CONDITION_TYPE_UNSPECIFIED",
            OrderConditionType::Fas => "ORDER_CONDITION_TYPE_FAS",
            OrderConditionType::Fak => "ORDER_CONDITION_TYPE_FAK",
            OrderConditionType::Fok => "ORDER_CONDITION_TYPE_FOK",
        }
    }
    /// 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_CONDITION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "ORDER_CONDITION_TYPE_FAS" => Some(Self::Fas),
            "ORDER_CONDITION_TYPE_FAK" => Some(Self::Fak),
            "ORDER_CONDITION_TYPE_FOK" => Some(Self::Fok),
            _ => None,
        }
    }
}
/// 자동정정 전략 유형
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AmendMethodType {
    /// 미지정 (기본값: TIMED_MARKET으로 처리)
    Unspecified = 0,
    /// 적극적 정정: 반대편 잔량 비율이 임계값 이상이면 즉시 체결 시도
    Aggressive = 1,
    /// 회피적 정정: tick_offset 만큼 가격을 조정하여 미체결 유지
    Evasive = 2,
    /// 최우선 호가: 상대방 최우선 호가로 정정
    BestPrice = 3,
    /// 손절 정정: tick_threshold 이상 불리해지면 시장가로 전환
    StopLoss = 4,
    /// 시간 제한 시장가: timeout 후 시장가로 전환
    TimedMarket = 5,
    /// 시간 기반 전진 정정 (100ms 간격): 상대호가 방향으로 1tick씩 전진
    TickAdvance100ms = 6,
    /// 시간 기반 전진 정정 (500ms 간격): 상대호가 방향으로 1tick씩 전진
    TickAdvance500ms = 7,
    /// 시간 기반 전진 정정 (1s 간격): 상대호가 방향으로 1tick씩 전진
    TickAdvance1s = 8,
    /// 스프레드 갭 추격 + 잔량 감소 추격
    /// 1단계: 내 가격과 상대호가 사이 빈 tick 존재 시 상대호가 ±1tick으로 점프
    /// 2단계: 스프레드 1tick 상태에서 상대 1호가 잔량이 임계 비율 미만 시 1tick 추격
    SpreadFollow = 9,
}
impl AmendMethodType {
    /// 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 {
            AmendMethodType::Unspecified => "AMEND_METHOD_TYPE_UNSPECIFIED",
            AmendMethodType::Aggressive => "AMEND_METHOD_TYPE_AGGRESSIVE",
            AmendMethodType::Evasive => "AMEND_METHOD_TYPE_EVASIVE",
            AmendMethodType::BestPrice => "AMEND_METHOD_TYPE_BEST_PRICE",
            AmendMethodType::StopLoss => "AMEND_METHOD_TYPE_STOP_LOSS",
            AmendMethodType::TimedMarket => "AMEND_METHOD_TYPE_TIMED_MARKET",
            AmendMethodType::TickAdvance100ms => "AMEND_METHOD_TYPE_TICK_ADVANCE_100MS",
            AmendMethodType::TickAdvance500ms => "AMEND_METHOD_TYPE_TICK_ADVANCE_500MS",
            AmendMethodType::TickAdvance1s => "AMEND_METHOD_TYPE_TICK_ADVANCE_1S",
            AmendMethodType::SpreadFollow => "AMEND_METHOD_TYPE_SPREAD_FOLLOW",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "AMEND_METHOD_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "AMEND_METHOD_TYPE_AGGRESSIVE" => Some(Self::Aggressive),
            "AMEND_METHOD_TYPE_EVASIVE" => Some(Self::Evasive),
            "AMEND_METHOD_TYPE_BEST_PRICE" => Some(Self::BestPrice),
            "AMEND_METHOD_TYPE_STOP_LOSS" => Some(Self::StopLoss),
            "AMEND_METHOD_TYPE_TIMED_MARKET" => Some(Self::TimedMarket),
            "AMEND_METHOD_TYPE_TICK_ADVANCE_100MS" => Some(Self::TickAdvance100ms),
            "AMEND_METHOD_TYPE_TICK_ADVANCE_500MS" => Some(Self::TickAdvance500ms),
            "AMEND_METHOD_TYPE_TICK_ADVANCE_1S" => Some(Self::TickAdvance1s),
            "AMEND_METHOD_TYPE_SPREAD_FOLLOW" => Some(Self::SpreadFollow),
            _ => None,
        }
    }
}
include!("kdo.v1.common.serde.rs");
// @@protoc_insertion_point(module)