futu_proto/Users/leaf/ai-lab/futu-opend-rs/target/debug/build/futu-proto-732001f670b3b167/out/
verification.rs

1// This file is @generated by prost-build.
2/// 图形验证码下载之后会将其存至固定路径,请到该路径下查看验证码
3/// Windows平台:%appdata%/com.futunn.FutuOpenD/F3CNN/PicVerifyCode.png
4/// 非Windows平台:~/.com.futunn.FutuOpenD/F3CNN/PicVerifyCode.png
5/// 注意:只有最后一次请求验证码会生效,重复请求只有最后一次的验证码有效
6#[derive(serde::Serialize, serde::Deserialize)]
7#[serde(default)]
8#[derive(Clone, PartialEq, ::prost::Message)]
9pub struct C2s {
10    /// 验证码类型, VerificationType
11    #[prost(int32, required, tag = "1")]
12    pub r#type: i32,
13    /// 操作, VerificationOp
14    #[prost(int32, required, tag = "2")]
15    pub op: i32,
16    /// 验证码,请求验证码时忽略该字段,输入时必填
17    #[prost(string, optional, tag = "3")]
18    pub code: ::core::option::Option<::prost::alloc::string::String>,
19}
20#[derive(serde::Serialize, serde::Deserialize)]
21#[serde(default)]
22#[derive(Clone, Copy, PartialEq, ::prost::Message)]
23pub struct S2c {}
24#[derive(serde::Serialize, serde::Deserialize)]
25#[serde(default)]
26#[derive(Clone, PartialEq, ::prost::Message)]
27pub struct Request {
28    #[prost(message, required, tag = "1")]
29    pub c2s: C2s,
30}
31#[derive(serde::Serialize, serde::Deserialize)]
32#[serde(default)]
33#[derive(Clone, PartialEq, ::prost::Message)]
34pub struct Response {
35    /// 返回结果,参见Common.RetType的枚举定义
36    #[prost(int32, required, tag = "1", default = "-400")]
37    pub ret_type: i32,
38    /// 返回结果描述
39    #[prost(string, optional, tag = "2")]
40    pub ret_msg: ::core::option::Option<::prost::alloc::string::String>,
41    /// 错误码,客户端一般通过retType和retMsg来判断结果和详情,errCode只做日志记录,仅在个别协议失败时对账用
42    #[prost(int32, optional, tag = "3")]
43    pub err_code: ::core::option::Option<i32>,
44    #[prost(message, optional, tag = "4")]
45    pub s2c: ::core::option::Option<S2c>,
46}
47#[derive(serde::Serialize, serde::Deserialize)]
48#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
49#[repr(i32)]
50pub enum VerificationType {
51    /// 未知操作
52    Unknow = 0,
53    /// 图形验证码
54    Picture = 1,
55    /// 手机验证码
56    Phone = 2,
57}
58impl VerificationType {
59    /// String value of the enum field names used in the ProtoBuf definition.
60    ///
61    /// The values are not transformed in any way and thus are considered stable
62    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
63    pub fn as_str_name(&self) -> &'static str {
64        match self {
65            Self::Unknow => "VerificationType_Unknow",
66            Self::Picture => "VerificationType_Picture",
67            Self::Phone => "VerificationType_Phone",
68        }
69    }
70    /// Creates an enum from field names used in the ProtoBuf definition.
71    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
72        match value {
73            "VerificationType_Unknow" => Some(Self::Unknow),
74            "VerificationType_Picture" => Some(Self::Picture),
75            "VerificationType_Phone" => Some(Self::Phone),
76            _ => None,
77        }
78    }
79}
80#[derive(serde::Serialize, serde::Deserialize)]
81#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
82#[repr(i32)]
83pub enum VerificationOp {
84    /// 未知操作
85    Unknow = 0,
86    /// 请求验证码
87    Request = 1,
88    /// 输入验证码并继续登录操作
89    InputAndLogin = 2,
90}
91impl VerificationOp {
92    /// String value of the enum field names used in the ProtoBuf definition.
93    ///
94    /// The values are not transformed in any way and thus are considered stable
95    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
96    pub fn as_str_name(&self) -> &'static str {
97        match self {
98            Self::Unknow => "VerificationOp_Unknow",
99            Self::Request => "VerificationOp_Request",
100            Self::InputAndLogin => "VerificationOp_InputAndLogin",
101        }
102    }
103    /// Creates an enum from field names used in the ProtoBuf definition.
104    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
105        match value {
106            "VerificationOp_Unknow" => Some(Self::Unknow),
107            "VerificationOp_Request" => Some(Self::Request),
108            "VerificationOp_InputAndLogin" => Some(Self::InputAndLogin),
109            _ => None,
110        }
111    }
112}