1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
// @generated
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUserRequest {
/// The name of the user to retrieve.
/// Format: users/{id}
/// Alias "users/me" is supported.
#[prost(string, tag="1")]
pub user: ::prost::alloc::string::String,
}
/// ListUsersRequest payload
/// (-- api-linter: core::0158::request-page-token-field=disabled
/// aip.dev/not-precedent: We need to do this because reasons. --)
/// (-- api-linter: core::0132::request-unknown-fields=disabled
/// aip.dev/not-precedent: We really need this field because reasons. --)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListUsersRequest {
/// The maximum number of users to return. The service may return fewer than
/// this value.
/// If unspecified, at most 50 rows will be returned.
/// The maximum value is 1024; values above 1024 will be coerced to 1024.
#[prost(int32, tag="1")]
pub page_size: i32,
/// Token of the page to retrieve. If not specified, the first
/// page of results will be returned. Use the value obtained from
/// `next_page_token` in the previous response in order to request
/// the next page of results.
///
/// When paginating, all other parameters provided to `ListUsers` must match
/// the call that provided the page token.
#[prost(string, tag="2")]
pub page_token: ::prost::alloc::string::String,
/// Available Sequence and Operator
/// * name
/// * `Equal`
/// * address
/// * Equal`
/// * display_name
/// * Equal`
///
/// Examples
/// * name="users/FZ4MT1HYJHd9GK8D5mJ9f3r7irLaDL5NxBNLjGqrLqs9"
/// * address="FZ4MT1HYJHd9GK8D5mJ9f3r7irLaDL5NxBNLjGqrLqs9"
/// * display_name="Alice"
#[prost(string, tag="3")]
pub filter: ::prost::alloc::string::String,
}
/// ListUsersResponse
/// (-- api-linter: core::0158::response-next-page-token-field=disabled
/// aip.dev/not-precedent: We need to do this because reasons. --)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListUsersResponse {
/// The list of rows that matched the query.
#[prost(message, repeated, tag="1")]
pub users: ::prost::alloc::vec::Vec<User>,
/// Pagination token used to retrieve the next page of results.
/// Pass the content of this string as the `page_token` attribute of
/// the next request. `next_page_token` is not returned for the last
/// page.
#[prost(string, tag="2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct User {
/// The resource name of the User.
/// Format: users/{id}
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
/// The Auth ID of User. (generated by Privy or Web3Auth)
#[prost(string, tag="2")]
pub id: ::prost::alloc::string::String,
/// The display name of User.
#[prost(string, tag="3")]
pub display_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub employee_id: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub ip: ::prost::alloc::string::String,
/// The trading role assigned to the user.
#[prost(enumeration="Role", tag="6")]
pub role: i32,
}
/// Role represents the trading role assigned to a user.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Role {
Unspecified = 0,
Lp = 1,
Arbitrage = 2,
Brokerage = 3,
Loan = 4,
}
impl Role {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Role::Unspecified => "ROLE_UNSPECIFIED",
Role::Lp => "ROLE_LP",
Role::Arbitrage => "ROLE_ARBITRAGE",
Role::Brokerage => "ROLE_BROKERAGE",
Role::Loan => "ROLE_LOAN",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ROLE_UNSPECIFIED" => Some(Self::Unspecified),
"ROLE_LP" => Some(Self::Lp),
"ROLE_ARBITRAGE" => Some(Self::Arbitrage),
"ROLE_BROKERAGE" => Some(Self::Brokerage),
"ROLE_LOAN" => Some(Self::Loan),
_ => None,
}
}
}
include!("kdo.v1.user.tonic.rs");
include!("kdo.v1.user.serde.rs");
// @@protoc_insertion_point(module)