ids_apis/
log_sync.v1.pnl.rs

1// @generated
2// This file is @generated by prost-build.
3/// PnL 요약 구조체
4#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct PnlSummary {
7    /// 기간 유형
8    #[prost(enumeration="PeriodType", tag="1")]
9    pub period_type: i32,
10    /// 기준 날짜 (RFC3339 형식)
11    #[prost(string, tag="2")]
12    pub trade_date: ::prost::alloc::string::String,
13    /// 총 손익 (문자열로 표현된 decimal)
14    #[prost(string, tag="5")]
15    pub total_pnl: ::prost::alloc::string::String,
16    /// 총 거래량 (문자열로 표현된 decimal)
17    #[prost(string, tag="6")]
18    pub total_volume: ::prost::alloc::string::String,
19    /// 총 거래 횟수
20    #[prost(int64, tag="7")]
21    pub total_transactions: i64,
22    /// 레코드 수
23    #[prost(int64, tag="8")]
24    pub record_count: i64,
25}
26/// ListPnlSummariesRequest payload
27#[allow(clippy::derive_partial_eq_without_eq)]
28#[derive(Clone, PartialEq, ::prost::Message)]
29pub struct ListPnlSummariesRequest {
30    /// The maximum number of pnl summaries to return. The service may return fewer than
31    /// this value.
32    /// If unspecified, at most 50 rows will be returned.
33    /// The maximum value is 1024; values above 1024 will be coerced to 1024.
34    #[prost(int32, tag="1")]
35    pub page_size: i32,
36    /// Token of the page to retrieve. If not specified, the first
37    /// page of results will be returned. Use the value obtained from
38    /// `next_page_token` in the previous response to request
39    /// the next page of results.
40    ///
41    /// When paginating, all other parameters provided to `ListPnlSummaries` must match
42    /// the call that provided the page token.
43    #[prost(string, tag="2")]
44    pub page_token: ::prost::alloc::string::String,
45    /// Available Sequence and Operator
46    /// * start_date
47    ///    * `>`, `>=`, `=`, `<=`, `<`
48    /// * end_date
49    ///    * `>`, `>=`, `=`, `<=`, `<`
50    /// * period_type
51    ///    * `equal`
52    ///
53    /// Examples
54    /// * filter=start_date>"2025-01-01T00" AND end_date<"2025-01-31T23" 
55    /// * filter=period_type=PERIOD_TYPE_MONTHLY
56    #[prost(string, tag="3")]
57    pub filter: ::prost::alloc::string::String,
58}
59/// ListPnlSummariesResponse response
60#[allow(clippy::derive_partial_eq_without_eq)]
61#[derive(Clone, PartialEq, ::prost::Message)]
62pub struct ListPnlSummariesResponse {
63    /// The list of rows that matched the query.
64    #[prost(message, repeated, tag="1")]
65    pub summaries: ::prost::alloc::vec::Vec<PnlSummary>,
66    /// Pagination token used to retrieve the next page of results.
67    /// Pass the content of this string as the `page_token` attribute of
68    /// the next request. `next_page_token` is not returned for the last
69    /// page.
70    #[prost(string, tag="2")]
71    pub next_page_token: ::prost::alloc::string::String,
72}
73#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
74#[repr(i32)]
75pub enum PeriodType {
76    /// Unspecified period type
77    Unspecified = 0,
78    /// Daily period
79    Daily = 1,
80    /// Weekly period
81    Weekly = 2,
82    /// Monthly period
83    Monthly = 3,
84    /// Yearly period
85    Yearly = 4,
86}
87impl PeriodType {
88    /// String value of the enum field names used in the ProtoBuf definition.
89    ///
90    /// The values are not transformed in any way and thus are considered stable
91    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
92    pub fn as_str_name(&self) -> &'static str {
93        match self {
94            PeriodType::Unspecified => "PERIOD_TYPE_UNSPECIFIED",
95            PeriodType::Daily => "PERIOD_TYPE_DAILY",
96            PeriodType::Weekly => "PERIOD_TYPE_WEEKLY",
97            PeriodType::Monthly => "PERIOD_TYPE_MONTHLY",
98            PeriodType::Yearly => "PERIOD_TYPE_YEARLY",
99        }
100    }
101    /// Creates an enum from field names used in the ProtoBuf definition.
102    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
103        match value {
104            "PERIOD_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
105            "PERIOD_TYPE_DAILY" => Some(Self::Daily),
106            "PERIOD_TYPE_WEEKLY" => Some(Self::Weekly),
107            "PERIOD_TYPE_MONTHLY" => Some(Self::Monthly),
108            "PERIOD_TYPE_YEARLY" => Some(Self::Yearly),
109            _ => None,
110        }
111    }
112}
113include!("log_sync.v1.pnl.tonic.rs");
114include!("log_sync.v1.pnl.serde.rs");
115// @@protoc_insertion_point(module)