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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
/// Checks if this service is ready
///
/// No arguments
#[derive(Eq, Copy)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadyRequest {}
/// Indicates if this service is ready
#[derive(Eq, Copy)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadyResponse {
    /// True if ready
    #[prost(bool, tag = "1")]
    pub ready: bool,
}
/// Id type for passing id only requests
#[derive(Eq)]
#[derive(Serialize, Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Id {
    /// id
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
}
/// repeated FieldValue representing id fields and their corresponding value
#[derive(Serialize, Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Ids {
    /// List of id field / value pairs
    #[prost(message, repeated, tag = "1")]
    pub ids: ::prost::alloc::vec::Vec<FieldValue>,
}
/// IdList type for passing a list of id strings
#[derive(Serialize, Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdList {
    /// ids
    #[prost(string, repeated, tag = "1")]
    pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Generic field/ value pair definition
#[derive(Serialize, Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FieldValue {
    /// field name as string
    #[prost(string, tag = "1")]
    pub field: ::prost::alloc::string::String,
    /// field value as string
    #[prost(string, tag = "2")]
    pub value: ::prost::alloc::string::String,
}
/// Filter option which can be used for the \[`AdvancedSearchFilter`\]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FilterOption {
    /// search_field
    #[prost(string, tag = "1")]
    pub search_field: ::prost::alloc::string::String,
    /// search_value, can be multiple for BETWEEN searches
    #[prost(string, repeated, tag = "2")]
    pub search_value: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// the predicate to be used
    #[prost(enumeration = "PredicateOperator", tag = "3")]
    pub predicate_operator: i32,
    /// optional operator used to compare next FilterOption with
    #[prost(enumeration = "ComparisonOperator", optional, tag = "4")]
    pub comparison_operator: ::core::option::Option<i32>,
}
/// Sort option which can be used for \[`AdvancedSearchFilter`\]
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SortOption {
    /// column name used to sort on
    #[prost(string, tag = "1")]
    pub sort_field: ::prost::alloc::string::String,
    /// sort operation
    #[prost(enumeration = "SortOrder", tag = "2")]
    pub sort_order: i32,
}
/// Advanced search filter object providing options for multiple search columns, sorted output and paged results
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdvancedSearchFilter {
    /// one or more filters to be used for search select
    #[prost(message, repeated, tag = "1")]
    pub filters: ::prost::alloc::vec::Vec<FilterOption>,
    /// page_number
    #[prost(int32, tag = "2")]
    pub page_number: i32,
    /// number of results to return per page.
    #[prost(int32, tag = "3")]
    pub results_per_page: i32,
    /// list of column / operator pairs to be used for sorting
    #[prost(message, repeated, tag = "5")]
    pub order_by: ::prost::alloc::vec::Vec<SortOption>,
}
/// Field name and error message
#[derive(Serialize, Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidationError {
    /// validated field
    #[prost(string, tag = "1")]
    pub field: ::prost::alloc::string::String,
    /// error message
    #[prost(string, tag = "2")]
    pub error: ::prost::alloc::string::String,
}
/// Returns a \[`bool`\] success status and list of \[`ValidationError`\]
#[derive(Serialize, Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidationResult {
    /// success
    #[prost(bool, tag = "1")]
    pub success: bool,
    /// list of ValidationErrors
    #[prost(message, repeated, tag = "2")]
    pub errors: ::prost::alloc::vec::Vec<ValidationError>,
}
/// Predicate operators which can be used for the \[`FilterOption`\]
#[derive(num_derive::FromPrimitive)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PredicateOperator {
    /// indicates a search query with \<col\> = \<value\> filter
    Equals = 0,
    /// indicates a search query with \<col\> \<\> \<value\> filter
    NotEquals = 1,
    /// indicates a search query with NOT IN (..) filter
    In = 2,
    /// indicates a search query with IN (..) filter
    NotIn = 3,
    /// indicates a search query with BETWEEN \<min\> AND \<max\> filter
    Between = 4,
    /// indicates a search query with \<col\> IS NULL filter
    IsNull = 5,
    /// indicates a search query with \<col\> IS NOT NULL filter
    IsNotNull = 6,
    /// indicates a search query with \<col\> ILIKE \<value\> filter
    Ilike = 7,
    /// indicates a search query with \<col\> LIKE \<value\> filter
    Like = 8,
    /// indicates a search query with \<col\> > \<value\> filter
    Greater = 9,
    /// indicates a search query with \<col\> >= \<value\> filter
    GreaterOrEqual = 10,
    /// indicates a search query with \<col\> \< \<value\> filter
    Less = 11,
    /// indicates a search query with \<col\> \<= \<value\> filter
    LessOrEqual = 12,
    /// indicates a geographic search query with \<col\> ST_Intersect filter
    GeoIntersect = 13,
    /// indicates a geographic search query with \<col\> ST_Within filter
    GeoWithin = 14,
    /// indicates a geographic search query with \<col\> IS NOT ST_Disjoint filter
    GeoDisjoint = 15,
}
impl PredicateOperator {
    /// 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 {
            PredicateOperator::Equals => "EQUALS",
            PredicateOperator::NotEquals => "NOT_EQUALS",
            PredicateOperator::In => "IN",
            PredicateOperator::NotIn => "NOT_IN",
            PredicateOperator::Between => "BETWEEN",
            PredicateOperator::IsNull => "IS_NULL",
            PredicateOperator::IsNotNull => "IS_NOT_NULL",
            PredicateOperator::Ilike => "ILIKE",
            PredicateOperator::Like => "LIKE",
            PredicateOperator::Greater => "GREATER",
            PredicateOperator::GreaterOrEqual => "GREATER_OR_EQUAL",
            PredicateOperator::Less => "LESS",
            PredicateOperator::LessOrEqual => "LESS_OR_EQUAL",
            PredicateOperator::GeoIntersect => "GEO_INTERSECT",
            PredicateOperator::GeoWithin => "GEO_WITHIN",
            PredicateOperator::GeoDisjoint => "GEO_DISJOINT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "EQUALS" => Some(Self::Equals),
            "NOT_EQUALS" => Some(Self::NotEquals),
            "IN" => Some(Self::In),
            "NOT_IN" => Some(Self::NotIn),
            "BETWEEN" => Some(Self::Between),
            "IS_NULL" => Some(Self::IsNull),
            "IS_NOT_NULL" => Some(Self::IsNotNull),
            "ILIKE" => Some(Self::Ilike),
            "LIKE" => Some(Self::Like),
            "GREATER" => Some(Self::Greater),
            "GREATER_OR_EQUAL" => Some(Self::GreaterOrEqual),
            "LESS" => Some(Self::Less),
            "LESS_OR_EQUAL" => Some(Self::LessOrEqual),
            "GEO_INTERSECT" => Some(Self::GeoIntersect),
            "GEO_WITHIN" => Some(Self::GeoWithin),
            "GEO_DISJOINT" => Some(Self::GeoDisjoint),
            _ => None,
        }
    }
}
/// Comparison operators which can be used for the \[`FilterOption`\]
#[derive(num_derive::FromPrimitive)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ComparisonOperator {
    /// indicates a search query with AND operator
    And = 0,
    /// indicates a search query with OR operator
    Or = 1,
}
impl ComparisonOperator {
    /// 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 {
            ComparisonOperator::And => "AND",
            ComparisonOperator::Or => "OR",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "AND" => Some(Self::And),
            "OR" => Some(Self::Or),
            _ => None,
        }
    }
}
/// Sort order which can be used for \[`SortOption`\]
#[derive(num_derive::FromPrimitive)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SortOrder {
    /// indicates an ascending sort order
    Asc = 0,
    /// indicates a descending sort order
    Desc = 1,
}
impl SortOrder {
    /// 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 {
            SortOrder::Asc => "ASC",
            SortOrder::Desc => "DESC",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ASC" => Some(Self::Asc),
            "DESC" => Some(Self::Desc),
            _ => None,
        }
    }
}