#[derive(Eq, Copy)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadyRequest {}
#[derive(Eq, Copy)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadyResponse {
#[prost(bool, tag = "1")]
pub ready: bool,
}
#[derive(Eq)]
#[derive(Serialize, Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Id {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[derive(Serialize, Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Ids {
#[prost(message, repeated, tag = "1")]
pub ids: ::prost::alloc::vec::Vec<FieldValue>,
}
#[derive(Serialize, Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdList {
#[prost(string, repeated, tag = "1")]
pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Serialize, Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FieldValue {
#[prost(string, tag = "1")]
pub field: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
}
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FilterOption {
#[prost(string, tag = "1")]
pub search_field: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub search_value: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "PredicateOperator", tag = "3")]
pub predicate_operator: i32,
#[prost(enumeration = "ComparisonOperator", optional, tag = "4")]
pub comparison_operator: ::core::option::Option<i32>,
}
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SortOption {
#[prost(string, tag = "1")]
pub sort_field: ::prost::alloc::string::String,
#[prost(enumeration = "SortOrder", tag = "2")]
pub sort_order: i32,
}
#[derive(Eq)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdvancedSearchFilter {
#[prost(message, repeated, tag = "1")]
pub filters: ::prost::alloc::vec::Vec<FilterOption>,
#[prost(int32, tag = "2")]
pub page_number: i32,
#[prost(int32, tag = "3")]
pub results_per_page: i32,
#[prost(message, repeated, tag = "5")]
pub order_by: ::prost::alloc::vec::Vec<SortOption>,
}
#[derive(Serialize, Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidationError {
#[prost(string, tag = "1")]
pub field: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
}
#[derive(Serialize, Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidationResult {
#[prost(bool, tag = "1")]
pub success: bool,
#[prost(message, repeated, tag = "2")]
pub errors: ::prost::alloc::vec::Vec<ValidationError>,
}
#[derive(num_derive::FromPrimitive)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PredicateOperator {
Equals = 0,
NotEquals = 1,
In = 2,
NotIn = 3,
Between = 4,
IsNull = 5,
IsNotNull = 6,
Ilike = 7,
Like = 8,
Greater = 9,
GreaterOrEqual = 10,
Less = 11,
LessOrEqual = 12,
GeoIntersect = 13,
GeoWithin = 14,
GeoDisjoint = 15,
}
impl PredicateOperator {
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",
}
}
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,
}
}
}
#[derive(num_derive::FromPrimitive)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ComparisonOperator {
And = 0,
Or = 1,
}
impl ComparisonOperator {
pub fn as_str_name(&self) -> &'static str {
match self {
ComparisonOperator::And => "AND",
ComparisonOperator::Or => "OR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"AND" => Some(Self::And),
"OR" => Some(Self::Or),
_ => None,
}
}
}
#[derive(num_derive::FromPrimitive)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SortOrder {
Asc = 0,
Desc = 1,
}
impl SortOrder {
pub fn as_str_name(&self) -> &'static str {
match self {
SortOrder::Asc => "ASC",
SortOrder::Desc => "DESC",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ASC" => Some(Self::Asc),
"DESC" => Some(Self::Desc),
_ => None,
}
}
}