ids_apis/
log_sync.v1.pnl.rs1#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct PnlSummary {
7 #[prost(enumeration="PeriodType", tag="1")]
9 pub period_type: i32,
10 #[prost(string, tag="2")]
12 pub trade_date: ::prost::alloc::string::String,
13 #[prost(string, tag="5")]
15 pub total_pnl: ::prost::alloc::string::String,
16 #[prost(string, tag="6")]
18 pub total_volume: ::prost::alloc::string::String,
19 #[prost(int64, tag="7")]
21 pub total_transactions: i64,
22 #[prost(int64, tag="8")]
24 pub record_count: i64,
25}
26#[allow(clippy::derive_partial_eq_without_eq)]
28#[derive(Clone, PartialEq, ::prost::Message)]
29pub struct ListPnlSummariesRequest {
30 #[prost(string, tag="1")]
42 pub filter: ::prost::alloc::string::String,
43}
44#[allow(clippy::derive_partial_eq_without_eq)]
46#[derive(Clone, PartialEq, ::prost::Message)]
47pub struct ListPnlSummariesResponse {
48 #[prost(message, repeated, tag="1")]
50 pub summaries: ::prost::alloc::vec::Vec<PnlSummary>,
51}
52#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
53#[repr(i32)]
54pub enum PeriodType {
55 Unspecified = 0,
57 Daily = 1,
59 Weekly = 2,
61 Monthly = 3,
63 Yearly = 4,
65}
66impl PeriodType {
67 pub fn as_str_name(&self) -> &'static str {
72 match self {
73 PeriodType::Unspecified => "PERIOD_TYPE_UNSPECIFIED",
74 PeriodType::Daily => "PERIOD_TYPE_DAILY",
75 PeriodType::Weekly => "PERIOD_TYPE_WEEKLY",
76 PeriodType::Monthly => "PERIOD_TYPE_MONTHLY",
77 PeriodType::Yearly => "PERIOD_TYPE_YEARLY",
78 }
79 }
80 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
82 match value {
83 "PERIOD_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
84 "PERIOD_TYPE_DAILY" => Some(Self::Daily),
85 "PERIOD_TYPE_WEEKLY" => Some(Self::Weekly),
86 "PERIOD_TYPE_MONTHLY" => Some(Self::Monthly),
87 "PERIOD_TYPE_YEARLY" => Some(Self::Yearly),
88 _ => None,
89 }
90 }
91}
92include!("log_sync.v1.pnl.tonic.rs");
93include!("log_sync.v1.pnl.serde.rs");
94