1#[derive(serde::Serialize, serde::Deserialize)]
3#[serde(default)]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct GtwEvent {
6 #[prost(int32, required, tag = "1")]
8 pub event_type: i32,
9 #[prost(string, required, tag = "2")]
11 pub desc: ::prost::alloc::string::String,
12}
13#[derive(serde::Serialize, serde::Deserialize)]
14#[serde(default)]
15#[derive(Clone, PartialEq, ::prost::Message)]
16pub struct ProgramStatus {
17 #[prost(message, required, tag = "1")]
19 pub program_status: super::common::ProgramStatus,
20}
21#[derive(serde::Serialize, serde::Deserialize)]
22#[serde(default)]
23#[derive(Clone, Copy, PartialEq, ::prost::Message)]
24pub struct ConnectStatus {
25 #[prost(bool, required, tag = "1")]
27 pub qot_logined: bool,
28 #[prost(bool, required, tag = "2")]
30 pub trd_logined: bool,
31}
32#[derive(serde::Serialize, serde::Deserialize)]
33#[serde(default)]
34#[derive(Clone, Copy, PartialEq, ::prost::Message)]
35pub struct QotRight {
36 #[prost(int32, required, tag = "4")]
38 pub hk_qot_right: i32,
39 #[prost(int32, required, tag = "5")]
41 pub us_qot_right: i32,
42 #[prost(int32, required, tag = "6")]
44 pub cn_qot_right: i32,
45 #[prost(int32, optional, tag = "7")]
47 pub hk_option_qot_right: ::core::option::Option<i32>,
48 #[prost(bool, optional, tag = "8")]
50 pub has_us_option_qot_right: ::core::option::Option<bool>,
51 #[prost(int32, optional, tag = "9")]
53 pub hk_future_qot_right: ::core::option::Option<i32>,
54 #[prost(int32, optional, tag = "10")]
56 pub us_future_qot_right: ::core::option::Option<i32>,
57 #[prost(int32, optional, tag = "11")]
59 pub us_option_qot_right: ::core::option::Option<i32>,
60 #[prost(int32, optional, tag = "12")]
62 pub us_index_qot_right: ::core::option::Option<i32>,
63 #[prost(int32, optional, tag = "13")]
65 pub us_otc_qot_right: ::core::option::Option<i32>,
66 #[prost(int32, optional, tag = "14")]
68 pub sg_future_qot_right: ::core::option::Option<i32>,
69 #[prost(int32, optional, tag = "15")]
71 pub jp_future_qot_right: ::core::option::Option<i32>,
72 #[prost(int32, optional, tag = "16")]
74 pub us_cme_future_qot_right: ::core::option::Option<i32>,
75 #[prost(int32, optional, tag = "17")]
77 pub us_cbot_future_qot_right: ::core::option::Option<i32>,
78 #[prost(int32, optional, tag = "18")]
80 pub us_nymex_future_qot_right: ::core::option::Option<i32>,
81 #[prost(int32, optional, tag = "19")]
83 pub us_comex_future_qot_right: ::core::option::Option<i32>,
84 #[prost(int32, optional, tag = "20")]
86 pub us_cboe_future_qot_right: ::core::option::Option<i32>,
87 #[prost(int32, optional, tag = "21")]
89 pub sh_qot_right: ::core::option::Option<i32>,
90 #[prost(int32, optional, tag = "22")]
92 pub sz_qot_right: ::core::option::Option<i32>,
93}
94#[derive(serde::Serialize, serde::Deserialize)]
95#[serde(default)]
96#[derive(Clone, PartialEq, ::prost::Message)]
97pub struct ApiLevel {
98 #[prost(string, required, tag = "3")]
100 pub api_level: ::prost::alloc::string::String,
101}
102#[derive(serde::Serialize, serde::Deserialize)]
103#[serde(default)]
104#[derive(Clone, Copy, PartialEq, ::prost::Message)]
105pub struct ApiQuota {
106 #[prost(int32, required, tag = "1")]
108 pub sub_quota: i32,
109 #[prost(int32, required, tag = "2")]
111 pub history_kl_quota: i32,
112}
113#[derive(serde::Serialize, serde::Deserialize)]
114#[serde(default)]
115#[derive(Clone, Copy, PartialEq, ::prost::Message)]
116pub struct UsedQuota {
117 #[prost(int32, optional, tag = "1")]
119 pub used_sub_quota: ::core::option::Option<i32>,
120 #[prost(int32, optional, tag = "2")]
122 pub used_k_line_quota: ::core::option::Option<i32>,
123}
124#[derive(serde::Serialize, serde::Deserialize)]
125#[serde(default)]
126#[derive(Clone, PartialEq, ::prost::Message)]
127pub struct S2c {
128 #[prost(int32, required, tag = "1")]
130 pub r#type: i32,
131 #[prost(message, optional, tag = "2")]
133 pub event: ::core::option::Option<GtwEvent>,
134 #[prost(message, optional, tag = "3")]
136 pub program_status: ::core::option::Option<ProgramStatus>,
137 #[prost(message, optional, tag = "4")]
139 pub connect_status: ::core::option::Option<ConnectStatus>,
140 #[prost(message, optional, tag = "5")]
142 pub qot_right: ::core::option::Option<QotRight>,
143 #[prost(message, optional, tag = "6")]
145 pub api_level: ::core::option::Option<ApiLevel>,
146 #[prost(message, optional, tag = "7")]
148 pub api_quota: ::core::option::Option<ApiQuota>,
149 #[prost(message, optional, tag = "8")]
151 pub used_quota: ::core::option::Option<UsedQuota>,
152}
153#[derive(serde::Serialize, serde::Deserialize)]
154#[serde(default)]
155#[derive(Clone, PartialEq, ::prost::Message)]
156pub struct Response {
157 #[prost(int32, required, tag = "1", default = "-400")]
159 pub ret_type: i32,
160 #[prost(string, optional, tag = "2")]
161 pub ret_msg: ::core::option::Option<::prost::alloc::string::String>,
162 #[prost(int32, optional, tag = "3")]
163 pub err_code: ::core::option::Option<i32>,
164 #[prost(message, optional, tag = "4")]
165 pub s2c: ::core::option::Option<S2c>,
166}
167#[derive(serde::Serialize, serde::Deserialize)]
168#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
169#[repr(i32)]
170pub enum NotifyType {
171 None = 0,
173 GtwEvent = 1,
175 ProgramStatus = 2,
177 ConnStatus = 3,
179 QotRight = 4,
181 ApiLevel = 5,
183 ApiQuota = 6,
185 UsedQuota = 7,
187}
188impl NotifyType {
189 pub fn as_str_name(&self) -> &'static str {
194 match self {
195 Self::None => "NotifyType_None",
196 Self::GtwEvent => "NotifyType_GtwEvent",
197 Self::ProgramStatus => "NotifyType_ProgramStatus",
198 Self::ConnStatus => "NotifyType_ConnStatus",
199 Self::QotRight => "NotifyType_QotRight",
200 Self::ApiLevel => "NotifyType_APILevel",
201 Self::ApiQuota => "NotifyType_APIQuota",
202 Self::UsedQuota => "NotifyType_UsedQuota",
203 }
204 }
205 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
207 match value {
208 "NotifyType_None" => Some(Self::None),
209 "NotifyType_GtwEvent" => Some(Self::GtwEvent),
210 "NotifyType_ProgramStatus" => Some(Self::ProgramStatus),
211 "NotifyType_ConnStatus" => Some(Self::ConnStatus),
212 "NotifyType_QotRight" => Some(Self::QotRight),
213 "NotifyType_APILevel" => Some(Self::ApiLevel),
214 "NotifyType_APIQuota" => Some(Self::ApiQuota),
215 "NotifyType_UsedQuota" => Some(Self::UsedQuota),
216 _ => None,
217 }
218 }
219}
220#[derive(serde::Serialize, serde::Deserialize)]
221#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
222#[repr(i32)]
223pub enum GtwEventType {
224 None = 0,
226 LocalCfgLoadFailed = 1,
228 ApiSvrRunFailed = 2,
230 ForceUpdate = 3,
232 LoginFailed = 4,
234 UnAgreeDisclaimer = 5,
236 NetCfgMissing = 6,
238 KickedOut = 7,
240 LoginPwdChanged = 8,
242 BanLogin = 9,
244 NeedPicVerifyCode = 10,
246 NeedPhoneVerifyCode = 11,
248 AppDataNotExist = 12,
250 NessaryDataMissing = 13,
252 TradePwdChanged = 14,
254 EnableDeviceLock = 15,
256}
257impl GtwEventType {
258 pub fn as_str_name(&self) -> &'static str {
263 match self {
264 Self::None => "GtwEventType_None",
265 Self::LocalCfgLoadFailed => "GtwEventType_LocalCfgLoadFailed",
266 Self::ApiSvrRunFailed => "GtwEventType_APISvrRunFailed",
267 Self::ForceUpdate => "GtwEventType_ForceUpdate",
268 Self::LoginFailed => "GtwEventType_LoginFailed",
269 Self::UnAgreeDisclaimer => "GtwEventType_UnAgreeDisclaimer",
270 Self::NetCfgMissing => "GtwEventType_NetCfgMissing",
271 Self::KickedOut => "GtwEventType_KickedOut",
272 Self::LoginPwdChanged => "GtwEventType_LoginPwdChanged",
273 Self::BanLogin => "GtwEventType_BanLogin",
274 Self::NeedPicVerifyCode => "GtwEventType_NeedPicVerifyCode",
275 Self::NeedPhoneVerifyCode => "GtwEventType_NeedPhoneVerifyCode",
276 Self::AppDataNotExist => "GtwEventType_AppDataNotExist",
277 Self::NessaryDataMissing => "GtwEventType_NessaryDataMissing",
278 Self::TradePwdChanged => "GtwEventType_TradePwdChanged",
279 Self::EnableDeviceLock => "GtwEventType_EnableDeviceLock",
280 }
281 }
282 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
284 match value {
285 "GtwEventType_None" => Some(Self::None),
286 "GtwEventType_LocalCfgLoadFailed" => Some(Self::LocalCfgLoadFailed),
287 "GtwEventType_APISvrRunFailed" => Some(Self::ApiSvrRunFailed),
288 "GtwEventType_ForceUpdate" => Some(Self::ForceUpdate),
289 "GtwEventType_LoginFailed" => Some(Self::LoginFailed),
290 "GtwEventType_UnAgreeDisclaimer" => Some(Self::UnAgreeDisclaimer),
291 "GtwEventType_NetCfgMissing" => Some(Self::NetCfgMissing),
292 "GtwEventType_KickedOut" => Some(Self::KickedOut),
293 "GtwEventType_LoginPwdChanged" => Some(Self::LoginPwdChanged),
294 "GtwEventType_BanLogin" => Some(Self::BanLogin),
295 "GtwEventType_NeedPicVerifyCode" => Some(Self::NeedPicVerifyCode),
296 "GtwEventType_NeedPhoneVerifyCode" => Some(Self::NeedPhoneVerifyCode),
297 "GtwEventType_AppDataNotExist" => Some(Self::AppDataNotExist),
298 "GtwEventType_NessaryDataMissing" => Some(Self::NessaryDataMissing),
299 "GtwEventType_TradePwdChanged" => Some(Self::TradePwdChanged),
300 "GtwEventType_EnableDeviceLock" => Some(Self::EnableDeviceLock),
301 _ => None,
302 }
303 }
304}