// @generated
// This file is @generated by prost-build.
/// 통합 재고 정보
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Inventory {
    /// 종목 코드 (심볼)
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
    /// 펀드 코드
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    /// 재고 유형
    #[prost(enumeration="InventoryType", tag="3")]
    pub inventory_type: i32,
    /// 재고 유형별 데이터
    #[prost(oneof="inventory::Data", tags="10, 11")]
    pub data: ::core::option::Option<inventory::Data>,
}
/// Nested message and enum types in `Inventory`.
pub mod inventory {
    /// 재고 유형별 데이터
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Data {
        /// 주식 재고 데이터
        #[prost(message, tag="10")]
        Stock(super::StockData),
        /// 파생상품 재고 데이터
        #[prost(message, tag="11")]
        Deriv(super::DerivData),
    }
}
/// 주식 재고 데이터
/// 일반가용과 차입가용의 이원화 구조
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StockData {
    /// 전일잔고
    #[prost(int64, tag="1")]
    pub prev_balance: i64,
    /// 담보수량
    #[prost(int64, tag="2")]
    pub pledged: i64,
    /// 가용수량 (일반가용)
    #[prost(int64, tag="3")]
    pub sellable: i64,
    /// 차입가용수량
    #[prost(int64, tag="4")]
    pub borrow_sellable: i64,
    /// 차입수량
    #[prost(int64, tag="5")]
    pub borrow_quantity: i64,
    /// 장부수량
    #[prost(int64, tag="6")]
    pub book_quantity: i64,
    /// 장부금액 (원 단위)
    #[prost(string, tag="7")]
    pub book_amount: ::prost::alloc::string::String,
    /// 매도예약수량 (내부용)
    #[prost(int64, tag="8")]
    pub selling: i64,
    /// 차입매도예약수량 (내부용)
    #[prost(int64, tag="9")]
    pub borrow_selling: i64,
    /// 차입매도수량 (내부용)
    #[prost(int64, tag="10")]
    pub borrow_sold: i64,
}
/// 파생상품 재고 데이터
/// 단일 pending_quantity로 양방향 예약 관리
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DerivData {
    /// 잔고수량 (양수: Long, 음수: Short)
    #[prost(int64, tag="1")]
    pub quantity: i64,
    /// 매입단가
    #[prost(string, tag="2")]
    pub entry_price: ::prost::alloc::string::String,
    /// 장부금액
    #[prost(string, tag="3")]
    pub book_amount: ::prost::alloc::string::String,
    /// 거래승수
    #[prost(double, tag="4")]
    pub multiple: f64,
    /// 미체결수량 (양수: 매수대기, 음수: 매도대기) (내부용)
    #[prost(int64, tag="5")]
    pub pending_quantity: i64,
}
// ========== Request/Response Messages ==========

/// GetInventory 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetInventoryRequest {
    #[prost(string, tag="1")]
    pub fund: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub symbol: ::prost::alloc::string::String,
}
/// ListInventories 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInventoriesRequest {
    #[prost(string, tag="1")]
    pub fund: ::prost::alloc::string::String,
    /// 페이지 크기 (optional)
    #[prost(uint32, optional, tag="2")]
    pub page_size: ::core::option::Option<u32>,
    /// 페이지 토큰 (optional, for pagination)
    #[prost(string, optional, tag="3")]
    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
    /// 필터링 조건 (optional, AIP-160)
    ///
    /// Available Operators:
    /// * symbol
    ///    * `equal`, `contains`
    /// * inventory_type
    ///    * `equal` (INVENTORY_TYPE_STOCK, INVENTORY_TYPE_DERIV)
    /// * stock.sellable, stock.book_quantity
    ///    * `equal`, `greater_than`, `less_than`
    /// * deriv.quantity
    ///    * `equal`, `greater_than`, `less_than`
    ///
    /// Examples:
    /// * filter=symbol:"005930"
    /// * filter=inventory_type=INVENTORY_TYPE_STOCK
    /// * filter=stock.sellable > 1000
    /// * filter=deriv.quantity < 0 (Short 포지션만)
    #[prost(string, tag="4")]
    pub filter: ::prost::alloc::string::String,
    /// 오더링 조건 (optional, AIP-132)
    ///
    /// Supported Fields:
    /// * "symbol", "inventory_type"
    /// * "stock.sellable", "stock.book_quantity", "stock.book_amount"
    /// * "deriv.quantity", "deriv.book_amount"
    ///
    /// Examples:
    /// * order_by=stock.book_amount desc
    /// * order_by=deriv.quantity asc
    #[prost(string, tag="5")]
    pub order_by: ::prost::alloc::string::String,
}
/// ListInventories 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInventoriesResponse {
    /// 재고 현황 목록
    #[prost(message, repeated, tag="1")]
    pub inventories: ::prost::alloc::vec::Vec<Inventory>,
    /// 다음 페이지 토큰
    #[prost(string, tag="2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// 재고 유형
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum InventoryType {
    Unspecified = 0,
    /// 주식
    Stock = 1,
    /// 파생상품
    Deriv = 2,
}
impl InventoryType {
    /// 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 {
            InventoryType::Unspecified => "INVENTORY_TYPE_UNSPECIFIED",
            InventoryType::Stock => "INVENTORY_TYPE_STOCK",
            InventoryType::Deriv => "INVENTORY_TYPE_DERIV",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "INVENTORY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "INVENTORY_TYPE_STOCK" => Some(Self::Stock),
            "INVENTORY_TYPE_DERIV" => Some(Self::Deriv),
            _ => None,
        }
    }
}
include!("kdo.v1.inventory.tonic.rs");
include!("kdo.v1.inventory.serde.rs");
// @@protoc_insertion_point(module)