typ_p/pb/
typ_p.rs

1// This file is @generated by prost-build.
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4pub struct DateTime {
5    #[prost(int32, tag = "1")]
6    pub year: i32,
7    #[prost(int32, tag = "2")]
8    pub month: i32,
9    #[prost(int32, tag = "3")]
10    pub day: i32,
11    #[prost(int32, tag = "4")]
12    pub hour: i32,
13    #[prost(int32, tag = "5")]
14    pub minute: i32,
15    #[prost(int32, tag = "6")]
16    pub second: i32,
17}
18#[allow(clippy::derive_partial_eq_without_eq)]
19#[derive(Clone, Copy, PartialEq, ::prost::Message)]
20pub struct DateDelta {
21    #[prost(int32, tag = "1")]
22    pub year: i32,
23    #[prost(int32, tag = "2")]
24    pub month: i32,
25    #[prost(int32, tag = "3")]
26    pub week: i32,
27    #[prost(int32, tag = "4")]
28    pub day: i32,
29}
30/// 22bit // 13 + 4 + 5
31#[allow(clippy::derive_partial_eq_without_eq)]
32#[derive(Clone, Copy, PartialEq, ::prost::Message)]
33pub struct Date {
34    #[prost(fixed32, tag = "1")]
35    pub value: u32,
36}
37#[allow(clippy::derive_partial_eq_without_eq)]
38#[derive(Clone, Copy, PartialEq, ::prost::Message)]
39pub struct DateRange {
40    #[prost(message, optional, tag = "1")]
41    pub date_from: ::core::option::Option<Date>,
42    #[prost(message, optional, tag = "2")]
43    pub date_to: ::core::option::Option<Date>,
44}
45#[allow(clippy::derive_partial_eq_without_eq)]
46#[derive(Clone, Copy, PartialEq, ::prost::Message)]
47pub struct Number {
48    #[prost(oneof = "number::ValueOf", tags = "1, 2, 3, 4")]
49    pub value_of: ::core::option::Option<number::ValueOf>,
50}
51/// Nested message and enum types in `number`.
52pub mod number {
53    #[allow(clippy::derive_partial_eq_without_eq)]
54    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
55    pub enum ValueOf {
56        #[prost(int32, tag = "1")]
57        Int32Value(i32),
58        #[prost(int64, tag = "2")]
59        Int64Value(i64),
60        #[prost(float, tag = "3")]
61        FloatValue(f32),
62        #[prost(double, tag = "4")]
63        DoubleValue(f64),
64    }
65}
66#[allow(clippy::derive_partial_eq_without_eq)]
67#[derive(Clone, PartialEq, ::prost::Message)]
68pub struct Uuid {
69    #[prost(bytes = "vec", tag = "1")]
70    pub uuid_value: ::prost::alloc::vec::Vec<u8>,
71}
72#[allow(clippy::derive_partial_eq_without_eq)]
73#[derive(Clone, PartialEq, ::prost::Message)]
74pub struct Value {
75    #[prost(oneof = "value::ValueOf", tags = "1, 2, 3, 4, 5, 8, 9, 10, 11")]
76    pub value_of: ::core::option::Option<value::ValueOf>,
77}
78/// Nested message and enum types in `value`.
79pub mod value {
80    #[allow(clippy::derive_partial_eq_without_eq)]
81    #[derive(Clone, PartialEq, ::prost::Oneof)]
82    pub enum ValueOf {
83        #[prost(bool, tag = "1")]
84        BoolValue(bool),
85        #[prost(string, tag = "2")]
86        StringValue(::prost::alloc::string::String),
87        /// byte
88        #[prost(bytes, tag = "3")]
89        BytesValue(::prost::alloc::vec::Vec<u8>),
90        /// uuid
91        #[prost(message, tag = "4")]
92        UuidValue(super::Uuid),
93        #[prost(message, tag = "5")]
94        NumberValue(super::Number),
95        #[prost(message, tag = "8")]
96        DateTimeValue(super::DateTime),
97        #[prost(message, tag = "9")]
98        DateValue(super::Date),
99        #[prost(message, tag = "10")]
100        DateRangeValue(super::DateRange),
101        #[prost(message, tag = "11")]
102        ArrayValues(super::ArrayValue),
103    }
104}
105#[allow(clippy::derive_partial_eq_without_eq)]
106#[derive(Clone, PartialEq, ::prost::Message)]
107pub struct ArrayValue {
108    #[prost(message, repeated, tag = "1")]
109    pub values: ::prost::alloc::vec::Vec<Value>,
110}
111#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
112#[repr(i32)]
113pub enum ValueType {
114    Unknown = 0,
115    Bool = 1,
116    String = 2,
117    Bytes = 3,
118    Uuid = 4,
119    Number = 5,
120    Datetime = 6,
121    Date = 7,
122    DateRange = 8,
123    ArrayValues = 10,
124}
125impl ValueType {
126    /// String value of the enum field names used in the ProtoBuf definition.
127    ///
128    /// The values are not transformed in any way and thus are considered stable
129    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
130    pub fn as_str_name(&self) -> &'static str {
131        match self {
132            ValueType::Unknown => "VALUE_TYPE_UNKNOWN",
133            ValueType::Bool => "VALUE_TYPE_BOOL",
134            ValueType::String => "VALUE_TYPE_STRING",
135            ValueType::Bytes => "VALUE_TYPE_BYTES",
136            ValueType::Uuid => "VALUE_TYPE_UUID",
137            ValueType::Number => "VALUE_TYPE_NUMBER",
138            ValueType::Datetime => "VALUE_TYPE_DATETIME",
139            ValueType::Date => "VALUE_TYPE_DATE",
140            ValueType::DateRange => "VALUE_TYPE_DATE_RANGE",
141            ValueType::ArrayValues => "VALUE_TYPE_ARRAY_VALUES",
142        }
143    }
144    /// Creates an enum from field names used in the ProtoBuf definition.
145    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
146        match value {
147            "VALUE_TYPE_UNKNOWN" => Some(Self::Unknown),
148            "VALUE_TYPE_BOOL" => Some(Self::Bool),
149            "VALUE_TYPE_STRING" => Some(Self::String),
150            "VALUE_TYPE_BYTES" => Some(Self::Bytes),
151            "VALUE_TYPE_UUID" => Some(Self::Uuid),
152            "VALUE_TYPE_NUMBER" => Some(Self::Number),
153            "VALUE_TYPE_DATETIME" => Some(Self::Datetime),
154            "VALUE_TYPE_DATE" => Some(Self::Date),
155            "VALUE_TYPE_DATE_RANGE" => Some(Self::DateRange),
156            "VALUE_TYPE_ARRAY_VALUES" => Some(Self::ArrayValues),
157            _ => None,
158        }
159    }
160}