1#[derive(serde::Serialize, serde::Deserialize)]
4#[serde(default)]
5#[derive(Clone, Copy, PartialEq, ::prost::Message)]
6pub struct PacketId {
7 #[prost(uint64, required, tag = "1")]
9 pub conn_id: u64,
10 #[prost(uint32, required, tag = "2")]
12 pub serial_no: u32,
13}
14#[derive(serde::Serialize, serde::Deserialize)]
15#[serde(default)]
16#[derive(Clone, PartialEq, ::prost::Message)]
17pub struct ProgramStatus {
18 #[prost(enumeration = "ProgramStatusType", required, tag = "1")]
20 pub r#type: i32,
21 #[prost(string, optional, tag = "2")]
23 pub str_ext_desc: ::core::option::Option<::prost::alloc::string::String>,
24}
25#[derive(serde::Serialize, serde::Deserialize)]
27#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
28#[repr(i32)]
29pub enum RetType {
30 Succeed = 0,
32 Failed = -1,
34 TimeOut = -100,
36 DisConnect = -200,
38 Unknown = -400,
40 Invalid = -500,
42}
43impl RetType {
44 pub fn as_str_name(&self) -> &'static str {
49 match self {
50 Self::Succeed => "RetType_Succeed",
51 Self::Failed => "RetType_Failed",
52 Self::TimeOut => "RetType_TimeOut",
53 Self::DisConnect => "RetType_DisConnect",
54 Self::Unknown => "RetType_Unknown",
55 Self::Invalid => "RetType_Invalid",
56 }
57 }
58 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
60 match value {
61 "RetType_Succeed" => Some(Self::Succeed),
62 "RetType_Failed" => Some(Self::Failed),
63 "RetType_TimeOut" => Some(Self::TimeOut),
64 "RetType_DisConnect" => Some(Self::DisConnect),
65 "RetType_Unknown" => Some(Self::Unknown),
66 "RetType_Invalid" => Some(Self::Invalid),
67 _ => None,
68 }
69 }
70}
71#[derive(serde::Serialize, serde::Deserialize)]
73#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
74#[repr(i32)]
75pub enum PacketEncAlgo {
76 FtaesEcb = 0,
78 None = -1,
80 AesEcb = 1,
82 AesCbc = 2,
84}
85impl PacketEncAlgo {
86 pub fn as_str_name(&self) -> &'static str {
91 match self {
92 Self::FtaesEcb => "PacketEncAlgo_FTAES_ECB",
93 Self::None => "PacketEncAlgo_None",
94 Self::AesEcb => "PacketEncAlgo_AES_ECB",
95 Self::AesCbc => "PacketEncAlgo_AES_CBC",
96 }
97 }
98 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
100 match value {
101 "PacketEncAlgo_FTAES_ECB" => Some(Self::FtaesEcb),
102 "PacketEncAlgo_None" => Some(Self::None),
103 "PacketEncAlgo_AES_ECB" => Some(Self::AesEcb),
104 "PacketEncAlgo_AES_CBC" => Some(Self::AesCbc),
105 _ => None,
106 }
107 }
108}
109#[derive(serde::Serialize, serde::Deserialize)]
111#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
112#[repr(i32)]
113pub enum ProtoFmt {
114 Protobuf = 0,
116 Json = 1,
118}
119impl ProtoFmt {
120 pub fn as_str_name(&self) -> &'static str {
125 match self {
126 Self::Protobuf => "ProtoFmt_Protobuf",
127 Self::Json => "ProtoFmt_Json",
128 }
129 }
130 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
132 match value {
133 "ProtoFmt_Protobuf" => Some(Self::Protobuf),
134 "ProtoFmt_Json" => Some(Self::Json),
135 _ => None,
136 }
137 }
138}
139#[derive(serde::Serialize, serde::Deserialize)]
141#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
142#[repr(i32)]
143pub enum UserAttribution {
144 Unknown = 0,
146 Nn = 1,
148 Mm = 2,
150 Sg = 3,
152 Au = 4,
154 Jp = 5,
156 Hk = 6,
158}
159impl UserAttribution {
160 pub fn as_str_name(&self) -> &'static str {
165 match self {
166 Self::Unknown => "UserAttribution_Unknown",
167 Self::Nn => "UserAttribution_NN",
168 Self::Mm => "UserAttribution_MM",
169 Self::Sg => "UserAttribution_SG",
170 Self::Au => "UserAttribution_AU",
171 Self::Jp => "UserAttribution_JP",
172 Self::Hk => "UserAttribution_HK",
173 }
174 }
175 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
177 match value {
178 "UserAttribution_Unknown" => Some(Self::Unknown),
179 "UserAttribution_NN" => Some(Self::Nn),
180 "UserAttribution_MM" => Some(Self::Mm),
181 "UserAttribution_SG" => Some(Self::Sg),
182 "UserAttribution_AU" => Some(Self::Au),
183 "UserAttribution_JP" => Some(Self::Jp),
184 "UserAttribution_HK" => Some(Self::Hk),
185 _ => None,
186 }
187 }
188}
189#[derive(serde::Serialize, serde::Deserialize)]
190#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
191#[repr(i32)]
192pub enum ProgramStatusType {
193 None = 0,
194 Loaded = 1,
196 Loging = 2,
198 NeedPicVerifyCode = 3,
200 NeedPhoneVerifyCode = 4,
202 LoginFailed = 5,
204 ForceUpdate = 6,
206 NessaryDataPreparing = 7,
208 NessaryDataMissing = 8,
210 UnAgreeDisclaimer = 9,
212 Ready = 10,
214 ForceLogout = 11,
218 DisclaimerPullFailed = 12,
220}
221impl ProgramStatusType {
222 pub fn as_str_name(&self) -> &'static str {
227 match self {
228 Self::None => "ProgramStatusType_None",
229 Self::Loaded => "ProgramStatusType_Loaded",
230 Self::Loging => "ProgramStatusType_Loging",
231 Self::NeedPicVerifyCode => "ProgramStatusType_NeedPicVerifyCode",
232 Self::NeedPhoneVerifyCode => "ProgramStatusType_NeedPhoneVerifyCode",
233 Self::LoginFailed => "ProgramStatusType_LoginFailed",
234 Self::ForceUpdate => "ProgramStatusType_ForceUpdate",
235 Self::NessaryDataPreparing => "ProgramStatusType_NessaryDataPreparing",
236 Self::NessaryDataMissing => "ProgramStatusType_NessaryDataMissing",
237 Self::UnAgreeDisclaimer => "ProgramStatusType_UnAgreeDisclaimer",
238 Self::Ready => "ProgramStatusType_Ready",
239 Self::ForceLogout => "ProgramStatusType_ForceLogout",
240 Self::DisclaimerPullFailed => "ProgramStatusType_DisclaimerPullFailed",
241 }
242 }
243 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
245 match value {
246 "ProgramStatusType_None" => Some(Self::None),
247 "ProgramStatusType_Loaded" => Some(Self::Loaded),
248 "ProgramStatusType_Loging" => Some(Self::Loging),
249 "ProgramStatusType_NeedPicVerifyCode" => Some(Self::NeedPicVerifyCode),
250 "ProgramStatusType_NeedPhoneVerifyCode" => Some(Self::NeedPhoneVerifyCode),
251 "ProgramStatusType_LoginFailed" => Some(Self::LoginFailed),
252 "ProgramStatusType_ForceUpdate" => Some(Self::ForceUpdate),
253 "ProgramStatusType_NessaryDataPreparing" => Some(Self::NessaryDataPreparing),
254 "ProgramStatusType_NessaryDataMissing" => Some(Self::NessaryDataMissing),
255 "ProgramStatusType_UnAgreeDisclaimer" => Some(Self::UnAgreeDisclaimer),
256 "ProgramStatusType_Ready" => Some(Self::Ready),
257 "ProgramStatusType_ForceLogout" => Some(Self::ForceLogout),
258 "ProgramStatusType_DisclaimerPullFailed" => Some(Self::DisclaimerPullFailed),
259 _ => None,
260 }
261 }
262}
263#[derive(serde::Serialize, serde::Deserialize)]
264#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
265#[repr(i32)]
266pub enum Session {
267 None = 0,
268 Rth = 1,
269 Eth = 2,
270 All = 3,
271 Overnight = 4,
272}
273impl Session {
274 pub fn as_str_name(&self) -> &'static str {
279 match self {
280 Self::None => "Session_NONE",
281 Self::Rth => "Session_RTH",
282 Self::Eth => "Session_ETH",
283 Self::All => "Session_ALL",
284 Self::Overnight => "Session_OVERNIGHT",
285 }
286 }
287 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
289 match value {
290 "Session_NONE" => Some(Self::None),
291 "Session_RTH" => Some(Self::Rth),
292 "Session_ETH" => Some(Self::Eth),
293 "Session_ALL" => Some(Self::All),
294 "Session_OVERNIGHT" => Some(Self::Overnight),
295 _ => None,
296 }
297 }
298}