// @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 LedgerInventory {
    /// 종목 코드
    #[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="ledger_inventory::Data", tags="10, 11")]
    pub data: ::core::option::Option<ledger_inventory::Data>,
}
/// Nested message and enum types in `LedgerInventory`.
pub mod ledger_inventory {
    /// 유형별 원장 데이터
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Data {
        /// 주식 원장 데이터
        #[prost(message, tag="10")]
        Stock(super::LedgerStockData),
        /// 파생상품 원장 데이터
        #[prost(message, tag="11")]
        Deriv(super::LedgerDerivData),
    }
}
/// 주식 원장 재고 데이터
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LedgerStockData {
    /// 장부수량
    #[prost(int64, tag="1")]
    pub book_quantity: i64,
    /// 장부금액
    #[prost(int64, tag="2")]
    pub book_amount: i64,
    /// 대여수량
    #[prost(int64, tag="3")]
    pub lending_quantity: i64,
    /// 대주수량
    #[prost(int64, tag="4")]
    pub borrowing_quantity: i64,
    /// 매수청구수량
    #[prost(int64, tag="5")]
    pub purchase_claim_quantity: i64,
    /// 담보제공수량
    #[prost(int64, tag="6")]
    pub collateral_quantity: i64,
    /// 차입수량
    #[prost(int64, tag="7")]
    pub borrow_quantity: i64,
    /// 차입잔고수량
    #[prost(int64, tag="8")]
    pub borrow_balance_quantity: i64,
    /// 차입장부수량
    #[prost(int64, tag="9")]
    pub borrow_book_quantity: i64,
    /// 차입장부금액
    #[prost(int64, tag="10")]
    pub borrow_book_amount: i64,
    /// 차입대여수량
    #[prost(int64, tag="11")]
    pub borrow_lending_quantity: i64,
    /// 차입담보수량
    #[prost(int64, tag="12")]
    pub borrow_collateral_quantity: i64,
    /// 신청수량
    #[prost(int64, tag="13")]
    pub application_quantity: i64,
    /// 주문가능수량
    #[prost(int64, tag="14")]
    pub orderable_quantity: i64,
    /// 전일장부수량
    #[prost(int64, tag="15")]
    pub prev_book_quantity: i64,
    /// 전일매도장부수량
    #[prost(int64, tag="16")]
    pub prev_borrow_book_quantity: i64,
    /// 결제잔고
    #[prost(int64, tag="17")]
    pub settlement_balance: i64,
    /// 결제매도잔고
    #[prost(int64, tag="18")]
    pub settlement_borrow_balance: i64,
}
/// 파생상품 원장 재고 데이터
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LedgerDerivData {
    /// 펀드명
    #[prost(string, tag="1")]
    pub fund_name: ::prost::alloc::string::String,
    /// 한글종목명
    #[prost(string, tag="2")]
    pub item_name: ::prost::alloc::string::String,
    /// 포지션구분명
    #[prost(string, tag="3")]
    pub position_type: ::prost::alloc::string::String,
    /// 잔고수량
    #[prost(int64, tag="4")]
    pub balance_quantity: i64,
    /// 매입단가
    #[prost(double, tag="5")]
    pub entry_price: f64,
    /// 장부금액
    #[prost(int64, tag="6")]
    pub book_amount: i64,
    /// 현재가격
    #[prost(double, tag="7")]
    pub current_price: f64,
    /// 평가장부금액
    #[prost(int64, tag="8")]
    pub valuation_amount: i64,
    /// 당일평가손익금액
    #[prost(int64, tag="9")]
    pub daily_pnl: i64,
    /// 정산차금
    #[prost(int64, tag="10")]
    pub settlement_diff: i64,
    /// 수수료금액
    #[prost(int64, tag="11")]
    pub fee_amount: i64,
    /// 기초자산종목코드
    #[prost(string, tag="12")]
    pub underlying_code: ::prost::alloc::string::String,
    /// 한글종목약어명
    #[prost(string, tag="13")]
    pub item_short_name: ::prost::alloc::string::String,
    /// 거래승수
    #[prost(double, tag="14")]
    pub multiple: f64,
    /// 스프레드근월물종목코드
    #[prost(string, tag="15")]
    pub spread_near_month_code: ::prost::alloc::string::String,
    /// 한도금액
    #[prost(int64, tag="16")]
    pub limit_amount: i64,
    /// 잔여원화금액
    #[prost(int64, tag="17")]
    pub remaining_krw_amount: i64,
}
/// 주식 재고 데이터
/// 일반가용과 차입가용의 이원화 구조
#[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,
}
/// GetLedgerInventory 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLedgerInventoryRequest {
    #[prost(string, tag="1")]
    pub fund: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub symbol: ::prost::alloc::string::String,
}
/// SyncInventoryFromLedger 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SyncInventoryFromLedgerRequest {
    #[prost(string, tag="1")]
    pub fund: ::prost::alloc::string::String,
    /// 동기화할 종목 코드 목록 (비어있을 경우 전체 종목 동기화)
    /// 예: \["005930", "000660"\]
    /// "*" 입력 시 전체 종목 동기화
    #[prost(string, repeated, tag="2")]
    pub symbols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// ListLedgerInventories 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLedgerInventoriesRequest {
    #[prost(string, tag="1")]
    pub fund: ::prost::alloc::string::String,
    /// 페이지 크기 (optional)
    #[prost(uint32, optional, tag="2")]
    pub page_size: ::core::option::Option<u32>,
    /// 페이지 토큰 (optional)
    #[prost(string, optional, tag="3")]
    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
    /// 필터링 조건 (optional, AIP-160)
    ///
    /// Available Fields:
    /// * symbol - 종목 코드
    /// * inventory_type - 재고 유형 (INVENTORY_TYPE_STOCK, INVENTORY_TYPE_DERIV)
    ///
    /// Examples:
    /// * symbol:"005930"
    /// * inventory_type=INVENTORY_TYPE_STOCK
    #[prost(string, tag="4")]
    pub filter: ::prost::alloc::string::String,
}
/// ListLedgerInventories 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLedgerInventoriesResponse {
    /// 원장 재고 목록
    #[prost(message, repeated, tag="1")]
    pub ledger_inventories: ::prost::alloc::vec::Vec<LedgerInventory>,
    /// 다음 페이지 토큰
    #[prost(string, tag="2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// UpdateInventory 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateInventoryRequest {
    #[prost(string, tag="1")]
    pub fund: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub symbol: ::prost::alloc::string::String,
    /// 업데이트할 재고 데이터
    #[prost(oneof="update_inventory_request::Data", tags="10, 11")]
    pub data: ::core::option::Option<update_inventory_request::Data>,
}
/// Nested message and enum types in `UpdateInventoryRequest`.
pub mod update_inventory_request {
    /// 업데이트할 재고 데이터
    #[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),
    }
}
/// SyncInventoryFromLedger 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SyncInventoryFromLedgerResponse {
    /// 동기화된 재고 목록
    #[prost(message, repeated, tag="1")]
    pub inventories: ::prost::alloc::vec::Vec<Inventory>,
    /// 동기화된 종목 수
    #[prost(int32, tag="2")]
    pub synced_count: i32,
}
// ========== 대차거래 Request/Response Messages ==========

/// RepayLoan 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RepayLoanRequest {
    /// 펀드 리소스명 (예: "funds/KD0001")
    #[prost(string, tag="1")]
    pub fund: ::prost::alloc::string::String,
    /// 종목코드
    #[prost(string, tag="2")]
    pub symbol: ::prost::alloc::string::String,
    /// 상환 수량
    #[prost(int64, tag="3")]
    pub quantity: i64,
}
/// RepayLoan 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RepayLoanResponse {
}
/// TransferLoan 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransferLoanRequest {
    /// 이전 출발 펀드 리소스명
    #[prost(string, tag="1")]
    pub from_fund: ::prost::alloc::string::String,
    /// 이전 도착 펀드 리소스명
    #[prost(string, tag="2")]
    pub to_fund: ::prost::alloc::string::String,
    /// 종목코드
    #[prost(string, tag="3")]
    pub symbol: ::prost::alloc::string::String,
    /// 이전 수량
    #[prost(int64, tag="4")]
    pub quantity: i64,
    /// 이전 구분 (true=차입이전, false=대여이전)
    #[prost(bool, tag="5")]
    pub borrow: bool,
    /// 상품포지션구분 (PROD_PSTN_CLS_CODE)
    /// 042c/052a InBlock2: 상품유가증권 또는 매도유가증권
    #[prost(enumeration="ProductPositionType", tag="8")]
    pub product_position_type: i32,
    /// 처리구분 (PROS_CLS_CODE)
    /// 042c InBlock1: 상환/대여/기타/펀드간상환/펀드간대여
    #[prost(enumeration="LoanTransactionType", tag="9")]
    pub loan_transaction_type: i32,
}
/// TransferLoan 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TransferLoanResponse {
}
/// ListLoanDeliveries 요청 (조회 전용)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLoanDeliveriesRequest {
    /// 펀드 리소스명
    #[prost(string, tag="1")]
    pub fund: ::prost::alloc::string::String,
    /// 조회 기준일자 (YYYYMMDD)
    #[prost(string, tag="2")]
    pub date: ::prost::alloc::string::String,
    /// 대차상대처구분코드 (1=예탁원, 2=증금, 빈값=전체)
    #[prost(string, tag="3")]
    pub dbcr_cnof_cls_code: ::prost::alloc::string::String,
    /// 대차구분코드 (1=대여, 2=차입, 빈값=전체)
    #[prost(string, tag="4")]
    pub dbcr_cls_code: ::prost::alloc::string::String,
    /// 종목코드 (빈값=전체)
    #[prost(string, tag="5")]
    pub symbol: ::prost::alloc::string::String,
}
/// ListLoanDeliveries 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLoanDeliveriesResponse {
    /// 미처리 대차 인도내역 목록
    #[prost(message, repeated, tag="1")]
    pub items: ::prost::alloc::vec::Vec<LoanDeliveryItem>,
}
/// BatchProcessLoanDeliveries 요청 (원장 반영)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchProcessLoanDeliveriesRequest {
    /// 펀드 리소스명
    #[prost(string, tag="1")]
    pub fund: ::prost::alloc::string::String,
    /// 원장 반영할 대차 인도내역 항목들
    #[prost(message, repeated, tag="2")]
    pub items: ::prost::alloc::vec::Vec<LoanDeliveryItem>,
}
/// BatchProcessLoanDeliveries 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BatchProcessLoanDeliveriesResponse {
    /// 처리 건수
    #[prost(int32, tag="1")]
    pub processed_count: i32,
}
/// 대차체결인도내역 항목 (obfnp_loan_021r)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LoanDeliveryItem {
    /// 수신일자
    #[prost(string, tag="1")]
    pub rcms_date: ::prost::alloc::string::String,
    /// 대차상대처구분코드 (1=예탁원, 2=증금)
    #[prost(string, tag="2")]
    pub dbcr_cnof_cls_code: ::prost::alloc::string::String,
    /// 수신일련번호
    #[prost(string, tag="3")]
    pub rcms_srno: ::prost::alloc::string::String,
    /// 펀드코드
    #[prost(string, tag="4")]
    pub fncd: ::prost::alloc::string::String,
    /// 펀드명
    #[prost(string, tag="5")]
    pub fund_name: ::prost::alloc::string::String,
    /// 참가기관코드
    #[prost(string, tag="6")]
    pub prtc_istu_code: ::prost::alloc::string::String,
    /// 표준펀드코드
    #[prost(string, tag="7")]
    pub stnd_fncd: ::prost::alloc::string::String,
    /// 체결인도구분 (01=인도, 02=미인도)
    #[prost(string, tag="8")]
    pub cntg_trns_cls: ::prost::alloc::string::String,
    /// 대차체결사유코드
    #[prost(string, tag="9")]
    pub dbcr_cntg_reas_code: ::prost::alloc::string::String,
    /// 대차구분코드 (1=대여, 2=차입)
    #[prost(string, tag="10")]
    pub dbcr_cls_code: ::prost::alloc::string::String,
    /// 대차거래구분코드
    #[prost(string, tag="11")]
    pub dbcr_tr_cls_code: ::prost::alloc::string::String,
    /// 주식채권구분코드
    #[prost(string, tag="12")]
    pub stck_bond_cls_code: ::prost::alloc::string::String,
    /// 종목코드
    #[prost(string, tag="13")]
    pub iscd: ::prost::alloc::string::String,
    /// 종목명
    #[prost(string, tag="14")]
    pub isnm: ::prost::alloc::string::String,
    /// 대차신청일자
    #[prost(string, tag="15")]
    pub dbcr_aplt_date: ::prost::alloc::string::String,
    /// 대차신청일련번호
    #[prost(string, tag="16")]
    pub dbcr_aplt_srno: ::prost::alloc::string::String,
    /// 체결일자
    #[prost(string, tag="17")]
    pub cntg_date: ::prost::alloc::string::String,
    /// 체결번호
    #[prost(string, tag="18")]
    pub cntg_no: ::prost::alloc::string::String,
    /// 원체결일자
    #[prost(string, tag="19")]
    pub orgl_cntg_date: ::prost::alloc::string::String,
    /// 원체결번호
    #[prost(string, tag="20")]
    pub orgl_cntg_no: ::prost::alloc::string::String,
    /// 만기예정일자
    #[prost(string, tag="21")]
    pub mtrt_scdl_date: ::prost::alloc::string::String,
    /// 대차수수료율
    #[prost(string, tag="22")]
    pub dbcr_fert: ::prost::alloc::string::String,
    /// 대차수량
    #[prost(int64, tag="23")]
    pub dbcr_qty: i64,
    /// 현금담보금액
    #[prost(int64, tag="24")]
    pub cash_morg_amt: i64,
    /// 대차평가기준가
    #[prost(string, tag="25")]
    pub dbcr_vltn_sdpr: ::prost::alloc::string::String,
    /// 대차평가금액
    #[prost(int64, tag="26")]
    pub dbcr_vltn_amt: i64,
    /// 담보비율
    #[prost(string, tag="27")]
    pub morg_rate: ::prost::alloc::string::String,
    /// 거래상대방기관코드
    #[prost(string, tag="28")]
    pub tr_cnrp_istu_cod: ::prost::alloc::string::String,
    /// 거래상대방펀드코드
    #[prost(string, tag="29")]
    pub tr_cnrp_fncd: ::prost::alloc::string::String,
    /// 인도일자
    #[prost(string, tag="30")]
    pub trns_date: ::prost::alloc::string::String,
    /// 대차체결상환구분
    #[prost(string, tag="31")]
    pub dbcr_cntg_rdmp_cls: ::prost::alloc::string::String,
    /// 처리여부
    #[prost(string, tag="32")]
    pub pros_yn: ::prost::alloc::string::String,
    /// 포지션구분코드
    #[prost(string, tag="33")]
    pub pstn_cls_code: ::prost::alloc::string::String,
    /// 부서코드
    #[prost(string, tag="34")]
    pub dpcd: ::prost::alloc::string::String,
    /// 부서명
    #[prost(string, tag="35")]
    pub dpnm: ::prost::alloc::string::String,
    /// 최초체결일자
    #[prost(string, tag="36")]
    pub frst_cntg_date: ::prost::alloc::string::String,
}
// ========== 대여 등록 Request/Response Messages ==========

/// 대여 등록 요청 헤더 (obfnp_loan_015a InBlock1)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LendingRequestHeader {
    /// 처리구분코드 (1=등록, 2=수정, 3=취소)
    #[prost(string, tag="1")]
    pub pros_cls_code: ::prost::alloc::string::String,
    /// 대차발생일자 (당일, YYYYMMDD)
    #[prost(string, tag="2")]
    pub dbcr_ocrn_date: ::prost::alloc::string::String,
    /// 펀드코드 (4자리)
    #[prost(string, tag="3")]
    pub fncd: ::prost::alloc::string::String,
    /// 상품포지션구분코드 (1=상품, 2=매도)
    #[prost(string, tag="4")]
    pub prod_pstn_cls_code: ::prost::alloc::string::String,
    /// 대차구분코드 (1=대여, 2=차입승인)
    #[prost(string, tag="5")]
    pub dbcr_cls_code: ::prost::alloc::string::String,
    /// 대차상대처구분코드 (1=예탁원, 2=증권금융, 8=리테일, 9=기타)
    #[prost(string, tag="6")]
    pub dbcr_cnof_cls_code: ::prost::alloc::string::String,
    /// 대차거래구분코드 (1=결제, 2=경쟁, 3=맞춤, 4=지정)
    #[prost(string, tag="7")]
    pub dbcr_tr_cls_code: ::prost::alloc::string::String,
    /// 대차수수료율 (소수점 4자리)
    #[prost(double, tag="8")]
    pub dbcr_fert: f64,
    /// 중개수수료율 (소수점 4자리)
    #[prost(double, tag="9")]
    pub rela_fert: f64,
    /// 내부대차여부 (Y/N)
    #[prost(string, tag="10")]
    pub ins_dbcr_yn: ::prost::alloc::string::String,
    /// 거래상대방기관코드
    #[prost(string, tag="11")]
    pub tr_cnrp_istu_cod: ::prost::alloc::string::String,
    /// 거래상대방펀드코드
    #[prost(string, tag="12")]
    pub tr_cnrp_fncd: ::prost::alloc::string::String,
    /// 거래상대방예탁재산구분코드
    #[prost(string, tag="13")]
    pub tr_cnrp_deps_pprt_clcd: ::prost::alloc::string::String,
    /// 거래상대방SLB코드
    #[prost(string, tag="14")]
    pub tr_cnrp_slb_code: ::prost::alloc::string::String,
}
/// 대여 등록 종목 항목 (obfnp_loan_015a InBlock2 - 복수종목)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LendingItem {
    /// 종목코드 (A포함 12자리)
    #[prost(string, tag="1")]
    pub iscd: ::prost::alloc::string::String,
    /// 대차수량
    #[prost(int64, tag="2")]
    pub dbcr_qty: i64,
    /// 거래상대방식별ID
    #[prost(string, tag="3")]
    pub tr_cnrp_idnt_id: ::prost::alloc::string::String,
    /// 대차구분코드 (정정취소용)
    #[prost(string, tag="4")]
    pub dbcr_cls_code: ::prost::alloc::string::String,
    /// 체결일자 (YYYYMMDD)
    #[prost(string, tag="5")]
    pub cntg_date: ::prost::alloc::string::String,
    /// 체결번호 (미존재시 0)
    #[prost(int64, tag="6")]
    pub cntg_no: i64,
    /// 대차일련번호 (신규=0)
    #[prost(int64, tag="7")]
    pub dbcr_srno: i64,
    /// 거래일련번호 (신규=0)
    #[prost(int64, tag="8")]
    pub tr_srno: i64,
}
/// 대여 등록 결과 항목 (obfnp_loan_015a OutBlock1)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LendingResultItem {
    /// 거래일련번호 (처리완료)
    #[prost(int64, tag="1")]
    pub tr_srno: i64,
    /// 대차일련번호 (처리완료)
    #[prost(int64, tag="2")]
    pub dbcr_srno: i64,
    /// 메시지코드
    #[prost(string, tag="3")]
    pub msg_code: ::prost::alloc::string::String,
    /// 고객용메시지내용
    #[prost(string, tag="4")]
    pub uscs_msg_cntt: ::prost::alloc::string::String,
}
/// RegisterLending 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterLendingRequest {
    /// 펀드 리소스명 (예: "funds/KD0001")
    #[prost(string, tag="1")]
    pub fund: ::prost::alloc::string::String,
    /// 대여 등록 헤더 정보 (InBlock1)
    #[prost(message, optional, tag="2")]
    pub request: ::core::option::Option<LendingRequestHeader>,
    /// 대여 종목 목록 (InBlock2)
    #[prost(message, repeated, tag="3")]
    pub items: ::prost::alloc::vec::Vec<LendingItem>,
}
/// RegisterLending 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterLendingResponse {
    /// 대여 등록 결과 목록 (OutBlock1)
    #[prost(message, repeated, tag="1")]
    pub results: ::prost::alloc::vec::Vec<LendingResultItem>,
}
/// 상품포지션구분 (PROD_PSTN_CLS_CODE)
/// 042c/052a InBlock2.PROD_PSTN_CLS_CODE: 1=상품, 2=매도
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProductPositionType {
    Unspecified = 0,
    /// 상품유가증권 (1=상품)
    Stock = 1,
    /// 매도유가증권 (2=매도)
    Sell = 2,
}
impl ProductPositionType {
    /// 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 {
            ProductPositionType::Unspecified => "PRODUCT_POSITION_TYPE_UNSPECIFIED",
            ProductPositionType::Stock => "PRODUCT_POSITION_TYPE_STOCK",
            ProductPositionType::Sell => "PRODUCT_POSITION_TYPE_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 {
            "PRODUCT_POSITION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "PRODUCT_POSITION_TYPE_STOCK" => Some(Self::Stock),
            "PRODUCT_POSITION_TYPE_SELL" => Some(Self::Sell),
            _ => None,
        }
    }
}
/// 처리구분 (PROS_CLS_CODE)
/// 042c InBlock1.PROS_CLS_CODE: 1=상환, 2=대여, 3=기타
/// 펀드간이전 확장: 4=펀드간상환, 5=펀드간대여
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LoanTransactionType {
    Unspecified = 0,
    /// 상환 (1=상환)
    Repay = 1,
    /// 대여 (2=대여)
    Lend = 2,
    /// 기타 (3=기타)
    Other = 3,
    /// 펀드간상환
    FundRepay = 4,
    /// 펀드간대여
    FundLend = 5,
}
impl LoanTransactionType {
    /// 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 {
            LoanTransactionType::Unspecified => "LOAN_TRANSACTION_TYPE_UNSPECIFIED",
            LoanTransactionType::Repay => "LOAN_TRANSACTION_TYPE_REPAY",
            LoanTransactionType::Lend => "LOAN_TRANSACTION_TYPE_LEND",
            LoanTransactionType::Other => "LOAN_TRANSACTION_TYPE_OTHER",
            LoanTransactionType::FundRepay => "LOAN_TRANSACTION_TYPE_FUND_REPAY",
            LoanTransactionType::FundLend => "LOAN_TRANSACTION_TYPE_FUND_LEND",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "LOAN_TRANSACTION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "LOAN_TRANSACTION_TYPE_REPAY" => Some(Self::Repay),
            "LOAN_TRANSACTION_TYPE_LEND" => Some(Self::Lend),
            "LOAN_TRANSACTION_TYPE_OTHER" => Some(Self::Other),
            "LOAN_TRANSACTION_TYPE_FUND_REPAY" => Some(Self::FundRepay),
            "LOAN_TRANSACTION_TYPE_FUND_LEND" => Some(Self::FundLend),
            _ => None,
        }
    }
}
/// 재고 유형
#[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)