// @generated
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Etf {
    /// ETF ID
    #[prost(uint64, tag="1")]
    pub id: u64,
    /// ETF 심볼 (ISIN 코드)
    #[prost(string, tag="2")]
    pub symbol: ::prost::alloc::string::String,
    /// ETF 코드
    #[prost(string, tag="3")]
    pub code: ::prost::alloc::string::String,
    /// ETF 이름
    #[prost(string, tag="4")]
    pub name: ::prost::alloc::string::String,
    /// 마지막 가격
    #[prost(string, tag="5")]
    pub prev_close: ::prost::alloc::string::String,
    #[prost(string, tag="6")]
    pub prev_close_nav: ::prost::alloc::string::String,
    #[prost(string, tag="7")]
    pub last_price: ::prost::alloc::string::String,
    #[prost(string, tag="8")]
    pub last_ask_inav: ::prost::alloc::string::String,
    #[prost(string, tag="9")]
    pub last_bid_inav: ::prost::alloc::string::String,
    /// PDF 구성 종목 목록
    #[prost(map="string, message", tag="10")]
    pub constituents: ::std::collections::HashMap<::prost::alloc::string::String, EtfPdfConstituent>,
    /// 설정 단위
    #[prost(int64, tag="11")]
    pub creation_unit: i64,
    /// 복제 방법
    #[prost(enumeration="ReplicationMethod", tag="12")]
    pub replication_method: i32,
    /// Tick 크기 (원 단위, i64)
    #[prost(int64, tag="13")]
    pub tick_size: i64,
    /// Tick 크기 (원 단위, i64)
    #[prost(int64, tag="14")]
    pub listed_quantity: i64,
    #[prost(float, tag="15")]
    pub leverage: f32,
    #[prost(bool, tag="16")]
    pub tradable: bool,
    #[prost(bool, tag="17")]
    pub short_sellable: bool,
    /// 기초자산 정보
    #[prost(message, optional, tag="18")]
    pub tracking_asset: ::core::option::Option<UnderlyingAsset>,
    #[prost(bool, tag="23")]
    pub cash_creditable: bool,
    #[prost(int64, tag="24")]
    pub cash_creation_amount: i64,
    /// ETF 변환 정보 (예: 레버리지/인버스 ETF의 선물 변환)
    #[prost(map="string, message", tag="25")]
    pub conversions: ::std::collections::HashMap<::prost::alloc::string::String, Conversion>,
    /// unit_delta (구성종목 기반 NAV 계산용)
    #[prost(string, tag="26")]
    pub unit_delta: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EtfConstituent {
    #[prost(oneof="etf_constituent::ConstituentType", tags="1, 2, 3")]
    pub constituent_type: ::core::option::Option<etf_constituent::ConstituentType>,
}
/// Nested message and enum types in `EtfConstituent`.
pub mod etf_constituent {
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum ConstituentType {
        #[prost(message, tag="1")]
        Stock(super::StockConstituent),
        #[prost(message, tag="2")]
        Futures(super::FuturesConstituent),
        #[prost(message, tag="3")]
        Cash(super::CashConstituent),
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StockConstituent {
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub prev_close: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub last_price: ::prost::alloc::string::String,
    #[prost(int64, tag="4")]
    pub quantity: i64,
    #[prost(int64, tag="5")]
    pub last_valuation: i64,
    #[prost(int64, tag="6")]
    pub notional_amount: i64,
    #[prost(uint32, tag="7")]
    pub num_members: u32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FuturesConstituent {
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub prev_close: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub last_price: ::prost::alloc::string::String,
    #[prost(float, tag="4")]
    pub quantity: f32,
    #[prost(double, tag="5")]
    pub multiple: f64,
    #[prost(int64, tag="6")]
    pub last_valuation: i64,
    #[prost(int64, tag="7")]
    pub notional_amount: i64,
    #[prost(uint32, tag="8")]
    pub num_members: u32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CashConstituent {
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
    #[prost(int64, tag="2")]
    pub prev_valuation: i64,
    #[prost(uint32, tag="3")]
    pub num_members: u32,
}
/// PDF 구성 종목
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EtfPdfConstituent {
    /// 종목 코드
    ///
    /// symbol
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
    /// 종목명
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
    /// 상품 타입
    #[prost(enumeration="super::common::ProductType", tag="3")]
    pub product_type: i32,
    /// 구성 수량 (선물 숏의 경우 음수, 소수 지원). Cash의 경우 원화 금액(원 단위 정수).
    #[prost(string, tag="4")]
    pub quantity: ::prost::alloc::string::String,
}
/// ETF가 다른 상품으로 변환될 수 있는 정보
/// 예: KODEX 2X Inverse는 1cu당 -0.37개의 코스피200 선물로 변환 가능
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Conversion {
    /// 변환 대상 심볼
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
    /// 변환 대상 상품 타입
    #[prost(enumeration="super::common::ProductType", tag="2")]
    pub product_type: i32,
    /// 1 CU당 변환 비율
    /// 예: KODEX 2X Inverse → 코스피200 선물 = -0.37
    #[prost(double, tag="3")]
    pub ratio_per_cu: f64,
}
/// 기초자산
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnderlyingAsset {
    #[prost(oneof="underlying_asset::Asset", tags="1, 2, 3, 4")]
    pub asset: ::core::option::Option<underlying_asset::Asset>,
}
/// Nested message and enum types in `UnderlyingAsset`.
pub mod underlying_asset {
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Asset {
        /// 선물형
        #[prost(message, tag="1")]
        Future(super::UnderlyingFuture),
        /// 채권형
        #[prost(message, tag="2")]
        FixedIncome(super::UnderlyingFixedIncome),
        /// 원자재형
        #[prost(message, tag="3")]
        Commodity(super::UnderlyingCommodity),
        /// 통화형
        #[prost(message, tag="4")]
        Currency(super::UnderlyingCurrency),
    }
}
/// 선물형 기초자산
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnderlyingFuture {
    /// 선물 종목 심볼
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
    /// 승수
    #[prost(string, tag="2")]
    pub multiple: ::prost::alloc::string::String,
    /// 최근 매도호가
    #[prost(string, tag="3")]
    pub last_ask_price: ::prost::alloc::string::String,
    /// 최근 매수호가
    #[prost(string, tag="4")]
    pub last_bid_price: ::prost::alloc::string::String,
}
/// 채권형 기초자산
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnderlyingFixedIncome {
    /// 종목 심볼
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
}
/// 원자재형 기초자산
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnderlyingCommodity {
    /// 종목 심볼
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
}
/// 통화형 기초자산
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnderlyingCurrency {
    /// 종목 심볼
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
}
// ========== Request/Response Messages ==========

/// GetEtf
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEtfRequest {
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
}
/// ListEtfs
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEtfsRequest {
    /// 페이지 크기 (optional)
    #[prost(uint32, optional, tag="1")]
    pub page_size: ::core::option::Option<u32>,
    /// 페이지 토큰 (optional, for pagination)
    #[prost(string, optional, tag="2")]
    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
    /// 필터링 조건 (optional, AIP-160)
    #[prost(string, tag="3")]
    pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEtfsResponse {
    /// ETF 목록
    #[prost(message, repeated, tag="1")]
    pub etfs: ::prost::alloc::vec::Vec<Etf>,
    /// 다음 페이지 토큰
    #[prost(string, tag="2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// GetEtfTickImpact
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEtfTickImpactRequest {
    /// ETF 리소스 이름 (예: etfs/069500)
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
    /// 구성종목 심볼
    #[prost(string, tag="2")]
    pub constituent_symbol: ::prost::alloc::string::String,
    /// 기준가 (이 가격을 중심으로 위아래 틱 계산)
    #[prost(string, tag="3")]
    pub base_price: ::prost::alloc::string::String,
    /// 위아래 계산할 틱 수 (예: 3이면 base_price 기준 -3틱 ~ +3틱)
    #[prost(int32, tag="4")]
    pub tick_range: i32,
}
/// ETF 틱 임팩트 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EtfTickImpact {
    /// ETF 심볼
    #[prost(string, tag="1")]
    pub etf_symbol: ::prost::alloc::string::String,
    /// 구성종목 심볼
    #[prost(string, tag="2")]
    pub constituent_symbol: ::prost::alloc::string::String,
    /// 현재 ETF NAV
    #[prost(string, tag="3")]
    pub current_nav: ::prost::alloc::string::String,
    /// 구성종목 현재가
    #[prost(string, tag="4")]
    pub current_price: ::prost::alloc::string::String,
    /// 틱 변동별 NAV 시뮬레이션 결과 (-tick_range ~ +tick_range 순서)
    #[prost(message, repeated, tag="5")]
    pub points: ::prost::alloc::vec::Vec<TickNavPoint>,
}
/// 틱 변동에 따른 NAV 포인트
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TickNavPoint {
    /// 틱 오프셋 (예: -3, -2, -1, 0, +1, +2, +3)
    #[prost(int32, tag="1")]
    pub tick_offset: i32,
    /// 해당 틱에서의 구성종목 가격
    #[prost(string, tag="2")]
    pub price: ::prost::alloc::string::String,
    /// 해당 틱에서의 ETF NAV
    #[prost(string, tag="3")]
    pub nav: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateEtfUnitDeltaRequest {
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub unit_delta: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateRedeemEtfRequest {
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub fund: ::prost::alloc::string::String,
    #[prost(int64, tag="3")]
    pub quantity: i64,
    #[prost(bool, tag="4")]
    pub is_creation: bool,
}
/// CalcEtfUnitPrice
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CalcEtfUnitPriceRequest {
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
    /// 가격 산출 방식 (IndexTrackingHedge / LeverageFuture 만 지원)
    #[prost(message, optional, tag="2")]
    pub pricing: ::core::option::Option<super::common::EtfPricing>,
    /// ETF 체결 방향 (Bid=매수 / Ask=매도)
    #[prost(enumeration="super::common::OrderSide", tag="3")]
    pub etf_side: i32,
    /// ETF 체결 수량
    #[prost(int64, tag="4")]
    pub etf_quantity: i64,
    /// ETF 체결 가격
    #[prost(string, tag="5")]
    pub etf_price: ::prost::alloc::string::String,
    /// 헷지(선물) 방향
    #[prost(enumeration="super::common::OrderSide", tag="6")]
    pub hedge_side: i32,
    /// 헷지(선물) 수량
    #[prost(int64, tag="7")]
    pub hedge_quantity: i64,
    /// 헷지(선물) 가격
    #[prost(string, tag="8")]
    pub hedge_price: ::prost::alloc::string::String,
    /// 타겟 단가 (optional, 제공 시 PnL 계산)
    #[prost(string, optional, tag="9")]
    pub target_unit_price: ::core::option::Option<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CalcEtfUnitPriceResponse {
    /// 계산된 단가
    #[prost(string, tag="1")]
    pub unit_price: ::prost::alloc::string::String,
    /// (unit_price - target_unit_price) × etf_quantity, target 제공 시에만
    #[prost(string, optional, tag="2")]
    pub pnl: ::core::option::Option<::prost::alloc::string::String>,
}
/// GetEtfConstituents
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEtfConstituentsRequest {
    /// ETF 리소스 이름 (예: etfs/069500)
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
    /// 가격 산출 방식 (pricing 종류에 따라 flattened 여부가 결정됨)
    #[prost(message, optional, tag="2")]
    pub pricing: ::core::option::Option<super::common::EtfPricing>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEtfConstituentsResponse {
    /// pricing에 따라 flattened 여부가 결정된 구성종목 맵
    /// PdfDecomposeHedge: leaf(Stock/Futures/Cash)로 재귀 분해된 flattened 버전
    /// 그 외: 원본 PDF 구성종목
    #[prost(map="string, message", tag="1")]
    pub constituents: ::std::collections::HashMap<::prost::alloc::string::String, EtfPdfConstituent>,
}
/// GetEtfPricingState
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEtfPricingStateRequest {
    /// ETF 리소스 이름 (예: "etfs/069500")
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
    /// pricing 모드 + 파라미터
    #[prost(message, optional, tag="2")]
    pub pricing: ::core::option::Option<super::common::EtfPricing>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEtfPricingStateResponse {
    /// pricing 식별자 (도메인 EtfPricing::as_str():
    /// "pdf_nav_hedge" | "pdf_decompose_hedge" | "index_tracking_hedge"
    /// | "future_basis" | "leverage_future")
    #[prost(string, tag="1")]
    pub pricing_kind: ::prost::alloc::string::String,
    /// 공통 — 모든 pricing 모드에서 채워짐
    #[prost(string, tag="2")]
    pub unit_delta: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub prev_nav: ::prost::alloc::string::String,
    /// 정적 leverage 설정값 (예: "2.0", "-1.0"). 인버스면 음수.
    #[prost(string, tag="4")]
    pub leverage: ::prost::alloc::string::String,
    #[prost(string, tag="5")]
    pub cash_per_share: ::prost::alloc::string::String,
    #[prost(int64, tag="6")]
    pub creation_unit: i64,
    /// LeverageFuture 전용 (pricing_kind == "leverage_future"일 때만 채움)
    /// k: 바스켓 내 현물 비중 (0.0 ~ 1.0)
    #[prost(double, optional, tag="10")]
    pub stock_ratio: ::core::option::Option<f64>,
    /// Nav0: 하위 ETF 시장가-NAV 괴리 보정 전일 NAV
    #[prost(string, optional, tag="11")]
    pub constituent_adjusted_prev_nav: ::core::option::Option<::prost::alloc::string::String>,
    /// L = unit_delta / Nav0 (인버스면 부호 반전)
    #[prost(string, optional, tag="12")]
    pub actual_leverage_l: ::core::option::Option<::prost::alloc::string::String>,
    /// 요청에서 받은 prev_index, prev_future echo
    /// (FutureBasis는 prev_index만 채워짐)
    #[prost(string, optional, tag="13")]
    pub prev_index: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="14")]
    pub prev_future: ::core::option::Option<::prost::alloc::string::String>,
}
/// 복제 방법
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ReplicationMethod {
    Unspecified = 0,
    Active = 1,
    Physical = 2,
    Synthetic = 3,
}
impl ReplicationMethod {
    /// 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 {
            ReplicationMethod::Unspecified => "REPLICATION_METHOD_UNSPECIFIED",
            ReplicationMethod::Active => "REPLICATION_METHOD_ACTIVE",
            ReplicationMethod::Physical => "REPLICATION_METHOD_PHYSICAL",
            ReplicationMethod::Synthetic => "REPLICATION_METHOD_SYNTHETIC",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "REPLICATION_METHOD_UNSPECIFIED" => Some(Self::Unspecified),
            "REPLICATION_METHOD_ACTIVE" => Some(Self::Active),
            "REPLICATION_METHOD_PHYSICAL" => Some(Self::Physical),
            "REPLICATION_METHOD_SYNTHETIC" => Some(Self::Synthetic),
            _ => None,
        }
    }
}
include!("kdo.v1.etf.tonic.rs");
include!("kdo.v1.etf.serde.rs");
// @@protoc_insertion_point(module)