Skip to main content

ids_apis/
kdo.v1.inventory.rs

1// @generated
2// This file is @generated by prost-build.
3/// 통합 재고 정보
4#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct Inventory {
7    /// 종목 코드 (심볼)
8    #[prost(string, tag="1")]
9    pub symbol: ::prost::alloc::string::String,
10    /// 펀드 코드
11    #[prost(string, tag="2")]
12    pub fund_code: ::prost::alloc::string::String,
13    /// 재고 유형
14    #[prost(enumeration="InventoryType", tag="3")]
15    pub inventory_type: i32,
16    /// 재고 유형별 데이터
17    #[prost(oneof="inventory::Data", tags="10, 11")]
18    pub data: ::core::option::Option<inventory::Data>,
19}
20/// Nested message and enum types in `Inventory`.
21pub mod inventory {
22    /// 재고 유형별 데이터
23    #[allow(clippy::derive_partial_eq_without_eq)]
24#[derive(Clone, PartialEq, ::prost::Oneof)]
25    pub enum Data {
26        /// 주식 재고 데이터
27        #[prost(message, tag="10")]
28        Stock(super::StockData),
29        /// 파생상품 재고 데이터
30        #[prost(message, tag="11")]
31        Deriv(super::DerivData),
32    }
33}
34/// 원장 재고 정보 (주식/파생 통합)
35#[allow(clippy::derive_partial_eq_without_eq)]
36#[derive(Clone, PartialEq, ::prost::Message)]
37pub struct LedgerInventory {
38    /// 종목 코드
39    #[prost(string, tag="1")]
40    pub symbol: ::prost::alloc::string::String,
41    /// 펀드 코드
42    #[prost(string, tag="2")]
43    pub fund_code: ::prost::alloc::string::String,
44    /// 재고 유형
45    #[prost(enumeration="InventoryType", tag="3")]
46    pub inventory_type: i32,
47    /// 유형별 원장 데이터
48    #[prost(oneof="ledger_inventory::Data", tags="10, 11")]
49    pub data: ::core::option::Option<ledger_inventory::Data>,
50}
51/// Nested message and enum types in `LedgerInventory`.
52pub mod ledger_inventory {
53    /// 유형별 원장 데이터
54    #[allow(clippy::derive_partial_eq_without_eq)]
55#[derive(Clone, PartialEq, ::prost::Oneof)]
56    pub enum Data {
57        /// 주식 원장 데이터
58        #[prost(message, tag="10")]
59        Stock(super::LedgerStockData),
60        /// 파생상품 원장 데이터
61        #[prost(message, tag="11")]
62        Deriv(super::LedgerDerivData),
63    }
64}
65/// 주식 원장 재고 데이터
66#[allow(clippy::derive_partial_eq_without_eq)]
67#[derive(Clone, Copy, PartialEq, ::prost::Message)]
68pub struct LedgerStockData {
69    /// 장부수량
70    #[prost(int64, tag="1")]
71    pub book_quantity: i64,
72    /// 장부금액
73    #[prost(int64, tag="2")]
74    pub book_amount: i64,
75    /// 대여수량
76    #[prost(int64, tag="3")]
77    pub lending_quantity: i64,
78    /// 대주수량
79    #[prost(int64, tag="4")]
80    pub borrowing_quantity: i64,
81    /// 매수청구수량
82    #[prost(int64, tag="5")]
83    pub purchase_claim_quantity: i64,
84    /// 담보제공수량
85    #[prost(int64, tag="6")]
86    pub collateral_quantity: i64,
87    /// 차입수량
88    #[prost(int64, tag="7")]
89    pub borrow_quantity: i64,
90    /// 차입잔고수량
91    #[prost(int64, tag="8")]
92    pub borrow_balance_quantity: i64,
93    /// 차입장부수량
94    #[prost(int64, tag="9")]
95    pub borrow_book_quantity: i64,
96    /// 차입장부금액
97    #[prost(int64, tag="10")]
98    pub borrow_book_amount: i64,
99    /// 차입대여수량
100    #[prost(int64, tag="11")]
101    pub borrow_lending_quantity: i64,
102    /// 차입담보수량
103    #[prost(int64, tag="12")]
104    pub borrow_collateral_quantity: i64,
105    /// 신청수량
106    #[prost(int64, tag="13")]
107    pub application_quantity: i64,
108    /// 주문가능수량
109    #[prost(int64, tag="14")]
110    pub orderable_quantity: i64,
111    /// 전일장부수량
112    #[prost(int64, tag="15")]
113    pub prev_book_quantity: i64,
114    /// 전일매도장부수량
115    #[prost(int64, tag="16")]
116    pub prev_borrow_book_quantity: i64,
117    /// 결제잔고
118    #[prost(int64, tag="17")]
119    pub settlement_balance: i64,
120    /// 결제매도잔고
121    #[prost(int64, tag="18")]
122    pub settlement_borrow_balance: i64,
123}
124/// 파생상품 원장 재고 데이터
125#[allow(clippy::derive_partial_eq_without_eq)]
126#[derive(Clone, PartialEq, ::prost::Message)]
127pub struct LedgerDerivData {
128    /// 펀드명
129    #[prost(string, tag="1")]
130    pub fund_name: ::prost::alloc::string::String,
131    /// 한글종목명
132    #[prost(string, tag="2")]
133    pub item_name: ::prost::alloc::string::String,
134    /// 포지션구분명
135    #[prost(string, tag="3")]
136    pub position_type: ::prost::alloc::string::String,
137    /// 잔고수량
138    #[prost(int64, tag="4")]
139    pub balance_quantity: i64,
140    /// 매입단가
141    #[prost(double, tag="5")]
142    pub entry_price: f64,
143    /// 장부금액
144    #[prost(int64, tag="6")]
145    pub book_amount: i64,
146    /// 현재가격
147    #[prost(double, tag="7")]
148    pub current_price: f64,
149    /// 평가장부금액
150    #[prost(int64, tag="8")]
151    pub valuation_amount: i64,
152    /// 당일평가손익금액
153    #[prost(int64, tag="9")]
154    pub daily_pnl: i64,
155    /// 정산차금
156    #[prost(int64, tag="10")]
157    pub settlement_diff: i64,
158    /// 수수료금액
159    #[prost(int64, tag="11")]
160    pub fee_amount: i64,
161    /// 기초자산종목코드
162    #[prost(string, tag="12")]
163    pub underlying_code: ::prost::alloc::string::String,
164    /// 한글종목약어명
165    #[prost(string, tag="13")]
166    pub item_short_name: ::prost::alloc::string::String,
167    /// 거래승수
168    #[prost(double, tag="14")]
169    pub multiple: f64,
170    /// 스프레드근월물종목코드
171    #[prost(string, tag="15")]
172    pub spread_near_month_code: ::prost::alloc::string::String,
173    /// 한도금액
174    #[prost(int64, tag="16")]
175    pub limit_amount: i64,
176    /// 잔여원화금액
177    #[prost(int64, tag="17")]
178    pub remaining_krw_amount: i64,
179}
180/// 주식 재고 데이터
181/// 일반가용과 차입가용의 이원화 구조
182#[allow(clippy::derive_partial_eq_without_eq)]
183#[derive(Clone, PartialEq, ::prost::Message)]
184pub struct StockData {
185    /// 전일잔고
186    #[prost(int64, tag="1")]
187    pub prev_balance: i64,
188    /// 담보수량
189    #[prost(int64, tag="2")]
190    pub pledged: i64,
191    /// 가용수량 (일반가용)
192    #[prost(int64, tag="3")]
193    pub sellable: i64,
194    /// 차입가용수량
195    #[prost(int64, tag="4")]
196    pub borrow_sellable: i64,
197    /// 차입수량
198    #[prost(int64, tag="5")]
199    pub borrow_quantity: i64,
200    /// 장부수량
201    #[prost(int64, tag="6")]
202    pub book_quantity: i64,
203    /// 장부금액 (원 단위)
204    #[prost(string, tag="7")]
205    pub book_amount: ::prost::alloc::string::String,
206    /// 매도예약수량 (내부용)
207    #[prost(int64, tag="8")]
208    pub selling: i64,
209    /// 차입매도예약수량 (내부용)
210    #[prost(int64, tag="9")]
211    pub borrow_selling: i64,
212    /// 차입매도수량 (내부용)
213    #[prost(int64, tag="10")]
214    pub borrow_sold: i64,
215}
216/// 파생상품 재고 데이터
217/// 단일 pending_quantity로 양방향 예약 관리
218#[allow(clippy::derive_partial_eq_without_eq)]
219#[derive(Clone, PartialEq, ::prost::Message)]
220pub struct DerivData {
221    /// 잔고수량 (양수: Long, 음수: Short)
222    #[prost(int64, tag="1")]
223    pub quantity: i64,
224    /// 매입단가
225    #[prost(string, tag="2")]
226    pub entry_price: ::prost::alloc::string::String,
227    /// 장부금액
228    #[prost(string, tag="3")]
229    pub book_amount: ::prost::alloc::string::String,
230    /// 거래승수
231    #[prost(double, tag="4")]
232    pub multiple: f64,
233    /// 미체결수량 (양수: 매수대기, 음수: 매도대기) (내부용)
234    #[prost(int64, tag="5")]
235    pub pending_quantity: i64,
236}
237// ========== Request/Response Messages ==========
238
239/// GetInventory 요청
240#[allow(clippy::derive_partial_eq_without_eq)]
241#[derive(Clone, PartialEq, ::prost::Message)]
242pub struct GetInventoryRequest {
243    #[prost(string, tag="1")]
244    pub fund: ::prost::alloc::string::String,
245    #[prost(string, tag="2")]
246    pub symbol: ::prost::alloc::string::String,
247}
248/// ListInventories 요청
249#[allow(clippy::derive_partial_eq_without_eq)]
250#[derive(Clone, PartialEq, ::prost::Message)]
251pub struct ListInventoriesRequest {
252    #[prost(string, tag="1")]
253    pub fund: ::prost::alloc::string::String,
254    /// 페이지 크기 (optional)
255    #[prost(uint32, optional, tag="2")]
256    pub page_size: ::core::option::Option<u32>,
257    /// 페이지 토큰 (optional, for pagination)
258    #[prost(string, optional, tag="3")]
259    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
260    /// 필터링 조건 (optional, AIP-160)
261    ///
262    /// Available Operators:
263    /// * symbol
264    ///    * `equal`, `contains`
265    /// * inventory_type
266    ///    * `equal` (INVENTORY_TYPE_STOCK, INVENTORY_TYPE_DERIV)
267    /// * stock.sellable, stock.book_quantity
268    ///    * `equal`, `greater_than`, `less_than`
269    /// * deriv.quantity
270    ///    * `equal`, `greater_than`, `less_than`
271    ///
272    /// Examples:
273    /// * filter=symbol:"005930"
274    /// * filter=inventory_type=INVENTORY_TYPE_STOCK
275    /// * filter=stock.sellable > 1000
276    /// * filter=deriv.quantity < 0 (Short 포지션만)
277    #[prost(string, tag="4")]
278    pub filter: ::prost::alloc::string::String,
279    /// 오더링 조건 (optional, AIP-132)
280    ///
281    /// Supported Fields:
282    /// * "symbol", "inventory_type"
283    /// * "stock.sellable", "stock.book_quantity", "stock.book_amount"
284    /// * "deriv.quantity", "deriv.book_amount"
285    ///
286    /// Examples:
287    /// * order_by=stock.book_amount desc
288    /// * order_by=deriv.quantity asc
289    #[prost(string, tag="5")]
290    pub order_by: ::prost::alloc::string::String,
291}
292/// ListInventories 응답
293#[allow(clippy::derive_partial_eq_without_eq)]
294#[derive(Clone, PartialEq, ::prost::Message)]
295pub struct ListInventoriesResponse {
296    /// 재고 현황 목록
297    #[prost(message, repeated, tag="1")]
298    pub inventories: ::prost::alloc::vec::Vec<Inventory>,
299    /// 다음 페이지 토큰
300    #[prost(string, tag="2")]
301    pub next_page_token: ::prost::alloc::string::String,
302}
303/// GetLedgerInventory 요청
304#[allow(clippy::derive_partial_eq_without_eq)]
305#[derive(Clone, PartialEq, ::prost::Message)]
306pub struct GetLedgerInventoryRequest {
307    #[prost(string, tag="1")]
308    pub fund: ::prost::alloc::string::String,
309    #[prost(string, tag="2")]
310    pub symbol: ::prost::alloc::string::String,
311}
312/// SyncInventoryFromLedger 요청
313#[allow(clippy::derive_partial_eq_without_eq)]
314#[derive(Clone, PartialEq, ::prost::Message)]
315pub struct SyncInventoryFromLedgerRequest {
316    #[prost(string, tag="1")]
317    pub fund: ::prost::alloc::string::String,
318    /// 동기화할 종목 코드 목록 (비어있을 경우 전체 종목 동기화)
319    /// 예: \["005930", "000660"\]
320    /// "*" 입력 시 전체 종목 동기화
321    #[prost(string, repeated, tag="2")]
322    pub symbols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
323}
324/// ListLedgerInventories 요청
325#[allow(clippy::derive_partial_eq_without_eq)]
326#[derive(Clone, PartialEq, ::prost::Message)]
327pub struct ListLedgerInventoriesRequest {
328    #[prost(string, tag="1")]
329    pub fund: ::prost::alloc::string::String,
330    /// 페이지 크기 (optional)
331    #[prost(uint32, optional, tag="2")]
332    pub page_size: ::core::option::Option<u32>,
333    /// 페이지 토큰 (optional)
334    #[prost(string, optional, tag="3")]
335    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
336    /// 필터링 조건 (optional, AIP-160)
337    ///
338    /// Available Fields:
339    /// * symbol - 종목 코드
340    /// * inventory_type - 재고 유형 (INVENTORY_TYPE_STOCK, INVENTORY_TYPE_DERIV)
341    ///
342    /// Examples:
343    /// * symbol:"005930"
344    /// * inventory_type=INVENTORY_TYPE_STOCK
345    #[prost(string, tag="4")]
346    pub filter: ::prost::alloc::string::String,
347}
348/// ListLedgerInventories 응답
349#[allow(clippy::derive_partial_eq_without_eq)]
350#[derive(Clone, PartialEq, ::prost::Message)]
351pub struct ListLedgerInventoriesResponse {
352    /// 원장 재고 목록
353    #[prost(message, repeated, tag="1")]
354    pub ledger_inventories: ::prost::alloc::vec::Vec<LedgerInventory>,
355    /// 다음 페이지 토큰
356    #[prost(string, tag="2")]
357    pub next_page_token: ::prost::alloc::string::String,
358}
359/// UpdateInventory 용 주식 데이터 (업데이트 가능 필드만)
360#[allow(clippy::derive_partial_eq_without_eq)]
361#[derive(Clone, Copy, PartialEq, ::prost::Message)]
362pub struct UpdateStockData {
363    /// 장부수량
364    #[prost(int64, tag="3")]
365    pub book_quantity: i64,
366    /// 매도예약수량
367    #[prost(int64, tag="4")]
368    pub selling: i64,
369    /// 차입수량
370    #[prost(int64, tag="5")]
371    pub borrow_quantity: i64,
372    /// 차입매도예약수량
373    #[prost(int64, tag="6")]
374    pub borrow_selling: i64,
375}
376/// UpdateInventory 용 파생 데이터 (업데이트 가능 필드만)
377#[allow(clippy::derive_partial_eq_without_eq)]
378#[derive(Clone, Copy, PartialEq, ::prost::Message)]
379pub struct UpdateDerivData {
380    /// 잔고수량 (양수: Long, 음수: Short)
381    #[prost(int64, tag="1")]
382    pub quantity: i64,
383}
384/// UpdateInventory 요청
385#[allow(clippy::derive_partial_eq_without_eq)]
386#[derive(Clone, PartialEq, ::prost::Message)]
387pub struct UpdateInventoryRequest {
388    #[prost(string, tag="1")]
389    pub fund: ::prost::alloc::string::String,
390    #[prost(string, tag="2")]
391    pub symbol: ::prost::alloc::string::String,
392    /// 업데이트할 재고 데이터
393    #[prost(oneof="update_inventory_request::Data", tags="10, 11, 12, 13")]
394    pub data: ::core::option::Option<update_inventory_request::Data>,
395}
396/// Nested message and enum types in `UpdateInventoryRequest`.
397pub mod update_inventory_request {
398    /// 업데이트할 재고 데이터
399    #[allow(clippy::derive_partial_eq_without_eq)]
400#[derive(Clone, PartialEq, ::prost::Oneof)]
401    pub enum Data {
402        /// DEPRECATED: use stock_patch instead. 서버는 이 variant 사용 시 InvalidArgument 반환.
403        #[prost(message, tag="10")]
404        Stock(super::StockData),
405        /// DEPRECATED: use deriv_patch instead. 서버는 이 variant 사용 시 InvalidArgument 반환.
406        #[prost(message, tag="11")]
407        Deriv(super::DerivData),
408        /// 주식 재고 업데이트 (가용/차입가용만)
409        #[prost(message, tag="12")]
410        StockPatch(super::UpdateStockData),
411        /// 파생 재고 업데이트 (잔고만)
412        #[prost(message, tag="13")]
413        DerivPatch(super::UpdateDerivData),
414    }
415}
416/// SyncInventoryFromLedger 응답
417#[allow(clippy::derive_partial_eq_without_eq)]
418#[derive(Clone, PartialEq, ::prost::Message)]
419pub struct SyncInventoryFromLedgerResponse {
420    /// 동기화된 재고 목록
421    #[prost(message, repeated, tag="1")]
422    pub inventories: ::prost::alloc::vec::Vec<Inventory>,
423    /// 동기화된 종목 수
424    #[prost(int32, tag="2")]
425    pub synced_count: i32,
426}
427// ========== 대차거래 Request/Response Messages ==========
428
429/// RepayLoan 요청
430#[allow(clippy::derive_partial_eq_without_eq)]
431#[derive(Clone, PartialEq, ::prost::Message)]
432pub struct RepayLoanRequest {
433    /// 펀드 리소스명 (예: "funds/KD0001")
434    #[prost(string, tag="1")]
435    pub fund: ::prost::alloc::string::String,
436    /// 종목코드
437    #[prost(string, tag="2")]
438    pub symbol: ::prost::alloc::string::String,
439    /// 상환 수량
440    #[prost(int64, tag="3")]
441    pub quantity: i64,
442}
443/// RepayLoan 응답
444#[allow(clippy::derive_partial_eq_without_eq)]
445#[derive(Clone, Copy, PartialEq, ::prost::Message)]
446pub struct RepayLoanResponse {
447}
448/// TransferLoan 요청
449#[allow(clippy::derive_partial_eq_without_eq)]
450#[derive(Clone, PartialEq, ::prost::Message)]
451pub struct TransferLoanRequest {
452    /// 이전 출발 펀드 리소스명
453    #[prost(string, tag="1")]
454    pub from_fund: ::prost::alloc::string::String,
455    /// 이전 도착 펀드 리소스명
456    #[prost(string, tag="2")]
457    pub to_fund: ::prost::alloc::string::String,
458    /// 종목코드
459    #[prost(string, tag="3")]
460    pub symbol: ::prost::alloc::string::String,
461    /// 이전 수량
462    #[prost(int64, tag="4")]
463    pub quantity: i64,
464    /// 상품포지션구분 (PROD_PSTN_CLS_CODE)
465    /// 042c/052a InBlock2: 상품유가증권 또는 매도유가증권
466    #[prost(enumeration="ProductPositionType", tag="8")]
467    pub product_position_type: i32,
468    /// 처리구분 (PROS_CLS_CODE)
469    /// 042c InBlock1: 상환/대여/기타/펀드간상환/펀드간대여
470    #[prost(enumeration="LoanTransactionType", tag="9")]
471    pub loan_transaction_type: i32,
472}
473/// TransferLoan 응답
474#[allow(clippy::derive_partial_eq_without_eq)]
475#[derive(Clone, Copy, PartialEq, ::prost::Message)]
476pub struct TransferLoanResponse {
477}
478/// ListLoanDeliveries 요청 (조회 전용)
479#[allow(clippy::derive_partial_eq_without_eq)]
480#[derive(Clone, PartialEq, ::prost::Message)]
481pub struct ListLoanDeliveriesRequest {
482    /// 펀드 리소스명
483    #[prost(string, tag="1")]
484    pub fund: ::prost::alloc::string::String,
485    /// 조회 기준일자 (YYYYMMDD)
486    #[prost(string, tag="2")]
487    pub date: ::prost::alloc::string::String,
488    /// 대차상대처구분코드 (UNSPECIFIED=전체, DEPOSITORY=예탁원, SECURITIES_FINANCE=증권금융)
489    #[prost(enumeration="DbcrCnofClsCode", tag="3")]
490    pub dbcr_cnof_cls_code: i32,
491    /// 대차구분코드 (UNSPECIFIED=전체, LEND=대여, BORROW=차입)
492    #[prost(enumeration="DbcrClsCode", tag="4")]
493    pub dbcr_cls_code: i32,
494    /// 종목코드 (빈값=전체)
495    #[prost(string, tag="5")]
496    pub symbol: ::prost::alloc::string::String,
497}
498/// ListLoanDeliveries 응답
499#[allow(clippy::derive_partial_eq_without_eq)]
500#[derive(Clone, PartialEq, ::prost::Message)]
501pub struct ListLoanDeliveriesResponse {
502    /// 미처리 대차 인도내역 목록
503    #[prost(message, repeated, tag="1")]
504    pub items: ::prost::alloc::vec::Vec<LoanDeliveryItem>,
505}
506/// BatchProcessLoanDeliveries 요청 (원장 반영)
507#[allow(clippy::derive_partial_eq_without_eq)]
508#[derive(Clone, PartialEq, ::prost::Message)]
509pub struct BatchProcessLoanDeliveriesRequest {
510    /// 펀드 리소스명
511    #[prost(string, tag="1")]
512    pub fund: ::prost::alloc::string::String,
513    /// 원장 반영할 대차 인도내역 항목들
514    #[prost(message, repeated, tag="2")]
515    pub items: ::prost::alloc::vec::Vec<LoanDeliveryItem>,
516}
517/// BatchProcessLoanDeliveries 응답
518#[allow(clippy::derive_partial_eq_without_eq)]
519#[derive(Clone, Copy, PartialEq, ::prost::Message)]
520pub struct BatchProcessLoanDeliveriesResponse {
521    /// 처리 건수
522    #[prost(int32, tag="1")]
523    pub processed_count: i32,
524}
525/// 대차체결인도내역 항목 (obfnp_loan_021r)
526#[allow(clippy::derive_partial_eq_without_eq)]
527#[derive(Clone, PartialEq, ::prost::Message)]
528pub struct LoanDeliveryItem {
529    /// 수신일자
530    #[prost(string, tag="1")]
531    pub rcms_date: ::prost::alloc::string::String,
532    /// 대차상대처구분코드 (1=예탁원, 2=증금)
533    #[prost(string, tag="2")]
534    pub dbcr_cnof_cls_code: ::prost::alloc::string::String,
535    /// 수신일련번호
536    #[prost(string, tag="3")]
537    pub rcms_srno: ::prost::alloc::string::String,
538    /// 펀드코드
539    #[prost(string, tag="4")]
540    pub fncd: ::prost::alloc::string::String,
541    /// 펀드명
542    #[prost(string, tag="5")]
543    pub fund_name: ::prost::alloc::string::String,
544    /// 참가기관코드
545    #[prost(string, tag="6")]
546    pub prtc_istu_code: ::prost::alloc::string::String,
547    /// 표준펀드코드
548    #[prost(string, tag="7")]
549    pub stnd_fncd: ::prost::alloc::string::String,
550    /// 체결인도구분 (01=인도, 02=미인도)
551    #[prost(string, tag="8")]
552    pub cntg_trns_cls: ::prost::alloc::string::String,
553    /// 대차체결사유코드
554    #[prost(string, tag="9")]
555    pub dbcr_cntg_reas_code: ::prost::alloc::string::String,
556    /// 대차구분코드 (1=대여, 2=차입)
557    #[prost(string, tag="10")]
558    pub dbcr_cls_code: ::prost::alloc::string::String,
559    /// 대차거래구분코드
560    #[prost(string, tag="11")]
561    pub dbcr_tr_cls_code: ::prost::alloc::string::String,
562    /// 주식채권구분코드
563    #[prost(string, tag="12")]
564    pub stck_bond_cls_code: ::prost::alloc::string::String,
565    /// 종목코드
566    #[prost(string, tag="13")]
567    pub iscd: ::prost::alloc::string::String,
568    /// 종목명
569    #[prost(string, tag="14")]
570    pub isnm: ::prost::alloc::string::String,
571    /// 대차신청일자
572    #[prost(string, tag="15")]
573    pub dbcr_aplt_date: ::prost::alloc::string::String,
574    /// 대차신청일련번호
575    #[prost(string, tag="16")]
576    pub dbcr_aplt_srno: ::prost::alloc::string::String,
577    /// 체결일자
578    #[prost(string, tag="17")]
579    pub cntg_date: ::prost::alloc::string::String,
580    /// 체결번호
581    #[prost(string, tag="18")]
582    pub cntg_no: ::prost::alloc::string::String,
583    /// 원체결일자
584    #[prost(string, tag="19")]
585    pub orgl_cntg_date: ::prost::alloc::string::String,
586    /// 원체결번호
587    #[prost(string, tag="20")]
588    pub orgl_cntg_no: ::prost::alloc::string::String,
589    /// 만기예정일자
590    #[prost(string, tag="21")]
591    pub mtrt_scdl_date: ::prost::alloc::string::String,
592    /// 대차수수료율
593    #[prost(string, tag="22")]
594    pub dbcr_fert: ::prost::alloc::string::String,
595    /// 대차수량
596    #[prost(int64, tag="23")]
597    pub dbcr_qty: i64,
598    /// 현금담보금액
599    #[prost(int64, tag="24")]
600    pub cash_morg_amt: i64,
601    /// 대차평가기준가
602    #[prost(string, tag="25")]
603    pub dbcr_vltn_sdpr: ::prost::alloc::string::String,
604    /// 대차평가금액
605    #[prost(int64, tag="26")]
606    pub dbcr_vltn_amt: i64,
607    /// 담보비율
608    #[prost(string, tag="27")]
609    pub morg_rate: ::prost::alloc::string::String,
610    /// 거래상대방기관코드
611    #[prost(string, tag="28")]
612    pub tr_cnrp_istu_cod: ::prost::alloc::string::String,
613    /// 거래상대방펀드코드
614    #[prost(string, tag="29")]
615    pub tr_cnrp_fncd: ::prost::alloc::string::String,
616    /// 인도일자
617    #[prost(string, tag="30")]
618    pub trns_date: ::prost::alloc::string::String,
619    /// 대차체결상환구분
620    #[prost(string, tag="31")]
621    pub dbcr_cntg_rdmp_cls: ::prost::alloc::string::String,
622    /// 처리여부
623    #[prost(string, tag="32")]
624    pub pros_yn: ::prost::alloc::string::String,
625    /// 포지션구분코드
626    #[prost(string, tag="33")]
627    pub pstn_cls_code: ::prost::alloc::string::String,
628    /// 부서코드
629    #[prost(string, tag="34")]
630    pub dpcd: ::prost::alloc::string::String,
631    /// 부서명
632    #[prost(string, tag="35")]
633    pub dpnm: ::prost::alloc::string::String,
634    /// 최초체결일자
635    #[prost(string, tag="36")]
636    pub frst_cntg_date: ::prost::alloc::string::String,
637}
638// ========== 대여 등록 Request/Response Messages ==========
639
640/// 대여 등록 요청 헤더 (obfnp_loan_015a InBlock1)
641#[allow(clippy::derive_partial_eq_without_eq)]
642#[derive(Clone, PartialEq, ::prost::Message)]
643pub struct LendingRequestHeader {
644    /// 처리구분코드 (1=등록, 2=수정, 3=취소)
645    #[prost(string, tag="1")]
646    pub pros_cls_code: ::prost::alloc::string::String,
647    /// 대차발생일자 (당일, YYYYMMDD)
648    #[prost(string, tag="2")]
649    pub dbcr_ocrn_date: ::prost::alloc::string::String,
650    /// 펀드코드 (4자리)
651    #[prost(string, tag="3")]
652    pub fncd: ::prost::alloc::string::String,
653    /// 상품포지션구분코드 (1=상품, 2=매도)
654    #[prost(string, tag="4")]
655    pub prod_pstn_cls_code: ::prost::alloc::string::String,
656    /// 대차구분코드 (1=대여, 2=차입승인)
657    #[prost(string, tag="5")]
658    pub dbcr_cls_code: ::prost::alloc::string::String,
659    /// 대차상대처구분코드 (1=예탁원, 2=증권금융, 8=리테일, 9=기타)
660    #[prost(string, tag="6")]
661    pub dbcr_cnof_cls_code: ::prost::alloc::string::String,
662    /// 대차거래구분코드 (1=결제, 2=경쟁, 3=맞춤, 4=지정)
663    #[prost(string, tag="7")]
664    pub dbcr_tr_cls_code: ::prost::alloc::string::String,
665    /// 대차수수료율 (소수점 4자리)
666    #[prost(double, tag="8")]
667    pub dbcr_fert: f64,
668    /// 중개수수료율 (소수점 4자리)
669    #[prost(double, tag="9")]
670    pub rela_fert: f64,
671    /// 내부대차여부 (Y/N)
672    #[prost(string, tag="10")]
673    pub ins_dbcr_yn: ::prost::alloc::string::String,
674    /// 거래상대방기관코드
675    #[prost(string, tag="11")]
676    pub tr_cnrp_istu_cod: ::prost::alloc::string::String,
677    /// 거래상대방펀드코드
678    #[prost(string, tag="12")]
679    pub tr_cnrp_fncd: ::prost::alloc::string::String,
680    /// 거래상대방예탁재산구분코드
681    #[prost(string, tag="13")]
682    pub tr_cnrp_deps_pprt_clcd: ::prost::alloc::string::String,
683    /// 거래상대방SLB코드
684    #[prost(string, tag="14")]
685    pub tr_cnrp_slb_code: ::prost::alloc::string::String,
686}
687/// 대여 등록 종목 항목 (obfnp_loan_015a InBlock2 - 복수종목)
688#[allow(clippy::derive_partial_eq_without_eq)]
689#[derive(Clone, PartialEq, ::prost::Message)]
690pub struct LendingItem {
691    /// 종목코드 (A포함 12자리)
692    #[prost(string, tag="1")]
693    pub iscd: ::prost::alloc::string::String,
694    /// 대차수량
695    #[prost(int64, tag="2")]
696    pub dbcr_qty: i64,
697    /// 거래상대방식별ID
698    #[prost(string, tag="3")]
699    pub tr_cnrp_idnt_id: ::prost::alloc::string::String,
700    /// 대차구분코드 (정정취소용)
701    #[prost(string, tag="4")]
702    pub dbcr_cls_code: ::prost::alloc::string::String,
703    /// 체결일자 (YYYYMMDD)
704    #[prost(string, tag="5")]
705    pub cntg_date: ::prost::alloc::string::String,
706    /// 체결번호 (미존재시 0)
707    #[prost(int64, tag="6")]
708    pub cntg_no: i64,
709    /// 대차일련번호 (신규=0)
710    #[prost(int64, tag="7")]
711    pub dbcr_srno: i64,
712    /// 거래일련번호 (신규=0)
713    #[prost(int64, tag="8")]
714    pub tr_srno: i64,
715}
716/// 대여 등록 결과 항목 (obfnp_loan_015a OutBlock1)
717#[allow(clippy::derive_partial_eq_without_eq)]
718#[derive(Clone, PartialEq, ::prost::Message)]
719pub struct LendingResultItem {
720    /// 거래일련번호 (처리완료)
721    #[prost(int64, tag="1")]
722    pub tr_srno: i64,
723    /// 대차일련번호 (처리완료)
724    #[prost(int64, tag="2")]
725    pub dbcr_srno: i64,
726    /// 메시지코드
727    #[prost(string, tag="3")]
728    pub msg_code: ::prost::alloc::string::String,
729    /// 고객용메시지내용
730    #[prost(string, tag="4")]
731    pub uscs_msg_cntt: ::prost::alloc::string::String,
732}
733/// RegisterLending 요청
734#[allow(clippy::derive_partial_eq_without_eq)]
735#[derive(Clone, PartialEq, ::prost::Message)]
736pub struct RegisterLendingRequest {
737    /// 펀드 리소스명 (예: "funds/KD0001")
738    #[prost(string, tag="1")]
739    pub fund: ::prost::alloc::string::String,
740    /// 대여 등록 헤더 정보 (InBlock1)
741    #[prost(message, optional, tag="2")]
742    pub request: ::core::option::Option<LendingRequestHeader>,
743    /// 대여 종목 목록 (InBlock2)
744    #[prost(message, repeated, tag="3")]
745    pub items: ::prost::alloc::vec::Vec<LendingItem>,
746}
747/// RegisterLending 응답
748#[allow(clippy::derive_partial_eq_without_eq)]
749#[derive(Clone, PartialEq, ::prost::Message)]
750pub struct RegisterLendingResponse {
751    /// 대여 등록 결과 목록 (OutBlock1)
752    #[prost(message, repeated, tag="1")]
753    pub results: ::prost::alloc::vec::Vec<LendingResultItem>,
754}
755// ========== 세션 인벤토리 Request/Response Messages ==========
756
757/// 세션 인벤토리 상태
758#[allow(clippy::derive_partial_eq_without_eq)]
759#[derive(Clone, PartialEq, ::prost::Message)]
760pub struct SessionInventory {
761    /// 종목 코드
762    #[prost(string, tag="1")]
763    pub symbol: ::prost::alloc::string::String,
764    /// 펀드 코드
765    #[prost(string, tag="2")]
766    pub fund_code: ::prost::alloc::string::String,
767    /// 세션 소유 서비스 이름 (예: "multi_service")
768    #[prost(string, tag="3")]
769    pub service_name: ::prost::alloc::string::String,
770    /// 세션 할당 잔고 (매도 체결 시 감소, 매수 체결 시 증가)
771    #[prost(int64, tag="4")]
772    pub balance: i64,
773    /// 미체결 매도 예약 수량
774    #[prost(int64, tag="5")]
775    pub selling: i64,
776    /// 매도 가용 수량 (= balance - selling)
777    #[prost(int64, tag="6")]
778    pub available: i64,
779}
780/// AllocateSessionInventory 요청
781#[allow(clippy::derive_partial_eq_without_eq)]
782#[derive(Clone, PartialEq, ::prost::Message)]
783pub struct AllocateSessionInventoryRequest {
784    /// 펀드 리소스명 (예: "funds/KD0001")
785    #[prost(string, tag="1")]
786    pub fund: ::prost::alloc::string::String,
787    /// 종목 코드 (예: "KR7005930003")
788    #[prost(string, tag="2")]
789    pub symbol: ::prost::alloc::string::String,
790    /// 세션 소유 서비스 이름.
791    /// 빈 문자열이면 서버가 "multi_service" 를 기본값으로 사용한다.
792    #[prost(string, tag="3")]
793    pub service_name: ::prost::alloc::string::String,
794    /// 할당 잔고 수량.
795    /// 0 이면 서버가 DB 의 lp.session_inventory_balance 를 사용한다.
796    #[prost(int64, tag="4")]
797    pub balance_override: i64,
798}
799/// AllocateSessionInventory 응답
800#[allow(clippy::derive_partial_eq_without_eq)]
801#[derive(Clone, PartialEq, ::prost::Message)]
802pub struct AllocateSessionInventoryResponse {
803    /// 할당된 세션 인벤토리 상태
804    #[prost(message, optional, tag="1")]
805    pub session: ::core::option::Option<SessionInventory>,
806}
807/// ReleaseSessionInventory 요청
808#[allow(clippy::derive_partial_eq_without_eq)]
809#[derive(Clone, PartialEq, ::prost::Message)]
810pub struct ReleaseSessionInventoryRequest {
811    /// 펀드 리소스명 (예: "funds/KD0001")
812    #[prost(string, tag="1")]
813    pub fund: ::prost::alloc::string::String,
814    /// 종목 코드 (예: "KR7005930003")
815    #[prost(string, tag="2")]
816    pub symbol: ::prost::alloc::string::String,
817    /// 세션 소유 서비스 이름.
818    /// 빈 문자열이면 서버가 "multi_service" 를 기본값으로 사용한다.
819    #[prost(string, tag="3")]
820    pub service_name: ::prost::alloc::string::String,
821}
822/// ReleaseSessionInventory 응답
823#[allow(clippy::derive_partial_eq_without_eq)]
824#[derive(Clone, PartialEq, ::prost::Message)]
825pub struct ReleaseSessionInventoryResponse {
826    /// 해제 직전 세션의 최종 상태 스냅샷
827    #[prost(message, optional, tag="1")]
828    pub released_session: ::core::option::Option<SessionInventory>,
829}
830/// GetSessionInventory 요청
831#[allow(clippy::derive_partial_eq_without_eq)]
832#[derive(Clone, PartialEq, ::prost::Message)]
833pub struct GetSessionInventoryRequest {
834    /// 펀드 리소스명 (예: "funds/KD0001")
835    #[prost(string, tag="1")]
836    pub fund: ::prost::alloc::string::String,
837    /// 종목 코드 (예: "KR7005930003")
838    #[prost(string, tag="2")]
839    pub symbol: ::prost::alloc::string::String,
840    /// 세션 소유 서비스 이름.
841    /// 빈 문자열이면 서버가 "multi_service" 를 기본값으로 사용한다.
842    #[prost(string, tag="3")]
843    pub service_name: ::prost::alloc::string::String,
844}
845/// ResizeSessionInventory 요청
846#[allow(clippy::derive_partial_eq_without_eq)]
847#[derive(Clone, PartialEq, ::prost::Message)]
848pub struct ResizeSessionInventoryRequest {
849    /// 펀드 리소스명 (예: "funds/KD0001")
850    #[prost(string, tag="1")]
851    pub fund: ::prost::alloc::string::String,
852    /// 종목 코드 (예: "KR7005930003")
853    #[prost(string, tag="2")]
854    pub symbol: ::prost::alloc::string::String,
855    /// 세션 소유 서비스 이름.
856    /// 빈 문자열이면 서버가 "multi_service" 를 기본값으로 사용한다.
857    #[prost(string, tag="3")]
858    pub service_name: ::prost::alloc::string::String,
859    /// 새 balance 수량 (양수여야 함).
860    /// selling > new_balance 이면 FAILED_PRECONDITION 으로 거부된다.
861    #[prost(int64, tag="4")]
862    pub new_balance: i64,
863}
864/// ResizeSessionInventory 응답
865#[allow(clippy::derive_partial_eq_without_eq)]
866#[derive(Clone, PartialEq, ::prost::Message)]
867pub struct ResizeSessionInventoryResponse {
868    /// 변경 후 세션 상태
869    #[prost(message, optional, tag="1")]
870    pub session: ::core::option::Option<SessionInventory>,
871    /// 변경량 (양수=증가, 음수=감소)
872    #[prost(int64, tag="2")]
873    pub delta: i64,
874}
875/// 상품포지션구분 (PROD_PSTN_CLS_CODE)
876/// 042c/052a InBlock2.PROD_PSTN_CLS_CODE: 1=상품, 2=매도
877#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
878#[repr(i32)]
879pub enum ProductPositionType {
880    Unspecified = 0,
881    /// 상품유가증권 (1=상품)
882    Stock = 1,
883    /// 매도유가증권 (2=매도)
884    Sell = 2,
885}
886impl ProductPositionType {
887    /// String value of the enum field names used in the ProtoBuf definition.
888    ///
889    /// The values are not transformed in any way and thus are considered stable
890    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
891    pub fn as_str_name(&self) -> &'static str {
892        match self {
893            ProductPositionType::Unspecified => "PRODUCT_POSITION_TYPE_UNSPECIFIED",
894            ProductPositionType::Stock => "PRODUCT_POSITION_TYPE_STOCK",
895            ProductPositionType::Sell => "PRODUCT_POSITION_TYPE_SELL",
896        }
897    }
898    /// Creates an enum from field names used in the ProtoBuf definition.
899    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
900        match value {
901            "PRODUCT_POSITION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
902            "PRODUCT_POSITION_TYPE_STOCK" => Some(Self::Stock),
903            "PRODUCT_POSITION_TYPE_SELL" => Some(Self::Sell),
904            _ => None,
905        }
906    }
907}
908/// 대차상대처구분코드 (DBCR_CNOF_CLS_CODE)
909/// obfnp_loan_021r 조회 필터: 1=예탁원, 2=증권금융, 빈값=전체
910#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
911#[repr(i32)]
912pub enum DbcrCnofClsCode {
913    /// 전체 조회
914    Unspecified = 0,
915    /// 예탁원
916    Depository = 1,
917    /// 증권금융
918    SecuritiesFinance = 2,
919}
920impl DbcrCnofClsCode {
921    /// String value of the enum field names used in the ProtoBuf definition.
922    ///
923    /// The values are not transformed in any way and thus are considered stable
924    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
925    pub fn as_str_name(&self) -> &'static str {
926        match self {
927            DbcrCnofClsCode::Unspecified => "DBCR_CNOF_CLS_CODE_UNSPECIFIED",
928            DbcrCnofClsCode::Depository => "DBCR_CNOF_CLS_CODE_DEPOSITORY",
929            DbcrCnofClsCode::SecuritiesFinance => "DBCR_CNOF_CLS_CODE_SECURITIES_FINANCE",
930        }
931    }
932    /// Creates an enum from field names used in the ProtoBuf definition.
933    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
934        match value {
935            "DBCR_CNOF_CLS_CODE_UNSPECIFIED" => Some(Self::Unspecified),
936            "DBCR_CNOF_CLS_CODE_DEPOSITORY" => Some(Self::Depository),
937            "DBCR_CNOF_CLS_CODE_SECURITIES_FINANCE" => Some(Self::SecuritiesFinance),
938            _ => None,
939        }
940    }
941}
942/// 대차구분코드 (DBCR_CLS_CODE)
943/// obfnp_loan_021r 조회 필터: 1=대여, 2=차입, 빈값=전체
944#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
945#[repr(i32)]
946pub enum DbcrClsCode {
947    /// 전체 조회
948    Unspecified = 0,
949    /// 대여
950    Lend = 1,
951    /// 차입
952    Borrow = 2,
953}
954impl DbcrClsCode {
955    /// String value of the enum field names used in the ProtoBuf definition.
956    ///
957    /// The values are not transformed in any way and thus are considered stable
958    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
959    pub fn as_str_name(&self) -> &'static str {
960        match self {
961            DbcrClsCode::Unspecified => "DBCR_CLS_CODE_UNSPECIFIED",
962            DbcrClsCode::Lend => "DBCR_CLS_CODE_LEND",
963            DbcrClsCode::Borrow => "DBCR_CLS_CODE_BORROW",
964        }
965    }
966    /// Creates an enum from field names used in the ProtoBuf definition.
967    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
968        match value {
969            "DBCR_CLS_CODE_UNSPECIFIED" => Some(Self::Unspecified),
970            "DBCR_CLS_CODE_LEND" => Some(Self::Lend),
971            "DBCR_CLS_CODE_BORROW" => Some(Self::Borrow),
972            _ => None,
973        }
974    }
975}
976/// 처리구분 (PROS_CLS_CODE)
977/// 042c InBlock1.PROS_CLS_CODE: 1=상환, 2=대여
978#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
979#[repr(i32)]
980pub enum LoanTransactionType {
981    Unspecified = 0,
982    /// 상환
983    Repay = 1,
984    /// 대여
985    Lend = 2,
986}
987impl LoanTransactionType {
988    /// String value of the enum field names used in the ProtoBuf definition.
989    ///
990    /// The values are not transformed in any way and thus are considered stable
991    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
992    pub fn as_str_name(&self) -> &'static str {
993        match self {
994            LoanTransactionType::Unspecified => "LOAN_TRANSACTION_TYPE_UNSPECIFIED",
995            LoanTransactionType::Repay => "LOAN_TRANSACTION_TYPE_REPAY",
996            LoanTransactionType::Lend => "LOAN_TRANSACTION_TYPE_LEND",
997        }
998    }
999    /// Creates an enum from field names used in the ProtoBuf definition.
1000    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1001        match value {
1002            "LOAN_TRANSACTION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1003            "LOAN_TRANSACTION_TYPE_REPAY" => Some(Self::Repay),
1004            "LOAN_TRANSACTION_TYPE_LEND" => Some(Self::Lend),
1005            _ => None,
1006        }
1007    }
1008}
1009/// 재고 유형
1010#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1011#[repr(i32)]
1012pub enum InventoryType {
1013    Unspecified = 0,
1014    /// 주식
1015    Stock = 1,
1016    /// 파생상품
1017    Deriv = 2,
1018}
1019impl InventoryType {
1020    /// String value of the enum field names used in the ProtoBuf definition.
1021    ///
1022    /// The values are not transformed in any way and thus are considered stable
1023    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1024    pub fn as_str_name(&self) -> &'static str {
1025        match self {
1026            InventoryType::Unspecified => "INVENTORY_TYPE_UNSPECIFIED",
1027            InventoryType::Stock => "INVENTORY_TYPE_STOCK",
1028            InventoryType::Deriv => "INVENTORY_TYPE_DERIV",
1029        }
1030    }
1031    /// Creates an enum from field names used in the ProtoBuf definition.
1032    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1033        match value {
1034            "INVENTORY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1035            "INVENTORY_TYPE_STOCK" => Some(Self::Stock),
1036            "INVENTORY_TYPE_DERIV" => Some(Self::Deriv),
1037            _ => None,
1038        }
1039    }
1040}
1041include!("kdo.v1.inventory.tonic.rs");
1042include!("kdo.v1.inventory.serde.rs");
1043// @@protoc_insertion_point(module)