ydb_grpc/generated/
ydb.rs

1#[derive(serde::Serialize, serde::Deserialize)]
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct Limit {
4    #[prost(oneof = "limit::Kind", tags = "1, 2, 3, 4, 5, 6")]
5    pub kind: ::core::option::Option<limit::Kind>,
6}
7/// Nested message and enum types in `Limit`.
8pub mod limit {
9    #[derive(serde::Serialize, serde::Deserialize)]
10    #[derive(Clone, PartialEq, ::prost::Message)]
11    pub struct Range {
12        #[prost(uint32, tag = "1")]
13        pub min: u32,
14        #[prost(uint32, tag = "2")]
15        pub max: u32,
16    }
17    #[derive(serde::Serialize, serde::Deserialize)]
18    #[derive(Clone, PartialEq, ::prost::Oneof)]
19    pub enum Kind {
20        #[prost(message, tag = "1")]
21        Range(Range),
22        #[prost(uint32, tag = "2")]
23        Lt(u32),
24        #[prost(uint32, tag = "3")]
25        Le(u32),
26        #[prost(uint32, tag = "4")]
27        Eq(u32),
28        #[prost(uint32, tag = "5")]
29        Ge(u32),
30        #[prost(uint32, tag = "6")]
31        Gt(u32),
32    }
33}
34#[derive(serde::Serialize, serde::Deserialize)]
35#[derive(Clone, PartialEq, ::prost::Message)]
36pub struct MapKey {
37    #[prost(message, optional, tag = "1")]
38    pub length: ::core::option::Option<Limit>,
39    #[prost(string, tag = "2")]
40    pub value: ::prost::alloc::string::String,
41}
42#[derive(serde::Serialize, serde::Deserialize)]
43#[derive(Clone, PartialEq, ::prost::Message)]
44pub struct FeatureFlag {}
45/// Nested message and enum types in `FeatureFlag`.
46pub mod feature_flag {
47    #[derive(serde::Serialize, serde::Deserialize)]
48    #[derive(
49        Clone,
50        Copy,
51        Debug,
52        PartialEq,
53        Eq,
54        Hash,
55        PartialOrd,
56        Ord,
57        ::prost::Enumeration
58    )]
59    #[repr(i32)]
60    pub enum Status {
61        Unspecified = 0,
62        Enabled = 1,
63        Disabled = 2,
64    }
65    impl Status {
66        /// String value of the enum field names used in the ProtoBuf definition.
67        /// The values are not transformed in any way and thus are considered stable
68        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
69        pub fn as_str_name(&self) -> &'static str {
70            match self {
71                Status::Unspecified => "STATUS_UNSPECIFIED",
72                Status::Enabled => "ENABLED",
73                Status::Disabled => "DISABLED",
74            }
75        }
76    }
77}
78#[derive(serde::Serialize, serde::Deserialize)]
79#[derive(Clone, PartialEq, ::prost::Message)]
80pub struct CostInfo {
81    /// Total amount of request units (RU), consumed by the operation.
82    #[prost(double, tag = "1")]
83    pub consumed_units: f64,
84}
85#[derive(serde::Serialize, serde::Deserialize)]
86#[derive(Clone, PartialEq, ::prost::Message)]
87pub struct QuotaExceeded {
88    #[prost(bool, tag = "1")]
89    pub disk: bool,
90}
91/// Specifies a point in database time
92#[derive(serde::Serialize, serde::Deserialize)]
93#[derive(Clone, PartialEq, ::prost::Message)]
94pub struct VirtualTimestamp {
95    #[prost(uint64, tag = "1")]
96    pub plan_step: u64,
97    #[prost(uint64, tag = "2")]
98    pub tx_id: u64,
99}
100#[derive(serde::Serialize, serde::Deserialize)]
101#[derive(Clone, PartialEq, ::prost::Message)]
102pub struct StatusIds {}
103/// Nested message and enum types in `StatusIds`.
104pub mod status_ids {
105    /// reserved range [400000, 400999]
106    #[derive(serde::Serialize, serde::Deserialize)]
107    #[derive(
108        Clone,
109        Copy,
110        Debug,
111        PartialEq,
112        Eq,
113        Hash,
114        PartialOrd,
115        Ord,
116        ::prost::Enumeration
117    )]
118    #[repr(i32)]
119    pub enum StatusCode {
120        Unspecified = 0,
121        Success = 400000,
122        BadRequest = 400010,
123        Unauthorized = 400020,
124        InternalError = 400030,
125        Aborted = 400040,
126        Unavailable = 400050,
127        Overloaded = 400060,
128        SchemeError = 400070,
129        GenericError = 400080,
130        Timeout = 400090,
131        BadSession = 400100,
132        PreconditionFailed = 400120,
133        AlreadyExists = 400130,
134        NotFound = 400140,
135        SessionExpired = 400150,
136        Cancelled = 400160,
137        Undetermined = 400170,
138        Unsupported = 400180,
139        SessionBusy = 400190,
140        ExternalError = 400200,
141    }
142    impl StatusCode {
143        /// String value of the enum field names used in the ProtoBuf definition.
144        /// The values are not transformed in any way and thus are considered stable
145        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
146        pub fn as_str_name(&self) -> &'static str {
147            match self {
148                StatusCode::Unspecified => "STATUS_CODE_UNSPECIFIED",
149                StatusCode::Success => "SUCCESS",
150                StatusCode::BadRequest => "BAD_REQUEST",
151                StatusCode::Unauthorized => "UNAUTHORIZED",
152                StatusCode::InternalError => "INTERNAL_ERROR",
153                StatusCode::Aborted => "ABORTED",
154                StatusCode::Unavailable => "UNAVAILABLE",
155                StatusCode::Overloaded => "OVERLOADED",
156                StatusCode::SchemeError => "SCHEME_ERROR",
157                StatusCode::GenericError => "GENERIC_ERROR",
158                StatusCode::Timeout => "TIMEOUT",
159                StatusCode::BadSession => "BAD_SESSION",
160                StatusCode::PreconditionFailed => "PRECONDITION_FAILED",
161                StatusCode::AlreadyExists => "ALREADY_EXISTS",
162                StatusCode::NotFound => "NOT_FOUND",
163                StatusCode::SessionExpired => "SESSION_EXPIRED",
164                StatusCode::Cancelled => "CANCELLED",
165                StatusCode::Undetermined => "UNDETERMINED",
166                StatusCode::Unsupported => "UNSUPPORTED",
167                StatusCode::SessionBusy => "SESSION_BUSY",
168                StatusCode::ExternalError => "EXTERNAL_ERROR",
169            }
170        }
171    }
172}
173#[derive(serde::Serialize, serde::Deserialize)]
174#[derive(Clone, PartialEq, ::prost::Message)]
175pub struct DecimalType {
176    #[prost(uint32, tag = "1")]
177    pub precision: u32,
178    #[prost(uint32, tag = "2")]
179    pub scale: u32,
180}
181#[derive(serde::Serialize, serde::Deserialize)]
182#[derive(Clone, PartialEq, ::prost::Message)]
183pub struct OptionalType {
184    #[prost(message, optional, boxed, tag = "1")]
185    pub item: ::core::option::Option<::prost::alloc::boxed::Box<Type>>,
186}
187#[derive(serde::Serialize, serde::Deserialize)]
188#[derive(Clone, PartialEq, ::prost::Message)]
189pub struct ListType {
190    #[prost(message, optional, boxed, tag = "1")]
191    pub item: ::core::option::Option<::prost::alloc::boxed::Box<Type>>,
192}
193#[derive(serde::Serialize, serde::Deserialize)]
194#[derive(Clone, PartialEq, ::prost::Message)]
195pub struct VariantType {
196    #[prost(oneof = "variant_type::Type", tags = "1, 2")]
197    pub r#type: ::core::option::Option<variant_type::Type>,
198}
199/// Nested message and enum types in `VariantType`.
200pub mod variant_type {
201    #[derive(serde::Serialize, serde::Deserialize)]
202    #[derive(Clone, PartialEq, ::prost::Oneof)]
203    pub enum Type {
204        #[prost(message, tag = "1")]
205        TupleItems(super::TupleType),
206        #[prost(message, tag = "2")]
207        StructItems(super::StructType),
208    }
209}
210#[derive(serde::Serialize, serde::Deserialize)]
211#[derive(Clone, PartialEq, ::prost::Message)]
212pub struct TupleType {
213    #[prost(message, repeated, tag = "1")]
214    pub elements: ::prost::alloc::vec::Vec<Type>,
215}
216#[derive(serde::Serialize, serde::Deserialize)]
217#[derive(Clone, PartialEq, ::prost::Message)]
218pub struct StructMember {
219    #[prost(string, tag = "1")]
220    pub name: ::prost::alloc::string::String,
221    #[prost(message, optional, tag = "2")]
222    pub r#type: ::core::option::Option<Type>,
223}
224#[derive(serde::Serialize, serde::Deserialize)]
225#[derive(Clone, PartialEq, ::prost::Message)]
226pub struct StructType {
227    #[prost(message, repeated, tag = "1")]
228    pub members: ::prost::alloc::vec::Vec<StructMember>,
229}
230#[derive(serde::Serialize, serde::Deserialize)]
231#[derive(Clone, PartialEq, ::prost::Message)]
232pub struct DictType {
233    #[prost(message, optional, boxed, tag = "1")]
234    pub key: ::core::option::Option<::prost::alloc::boxed::Box<Type>>,
235    #[prost(message, optional, boxed, tag = "2")]
236    pub payload: ::core::option::Option<::prost::alloc::boxed::Box<Type>>,
237}
238#[derive(serde::Serialize, serde::Deserialize)]
239#[derive(Clone, PartialEq, ::prost::Message)]
240pub struct TaggedType {
241    #[prost(string, tag = "1")]
242    pub tag: ::prost::alloc::string::String,
243    #[prost(message, optional, boxed, tag = "2")]
244    pub r#type: ::core::option::Option<::prost::alloc::boxed::Box<Type>>,
245}
246#[derive(serde::Serialize, serde::Deserialize)]
247#[derive(Clone, PartialEq, ::prost::Message)]
248pub struct PgType {
249    #[prost(string, tag = "10")]
250    pub type_name: ::prost::alloc::string::String,
251    #[prost(string, tag = "11")]
252    pub type_modifier: ::prost::alloc::string::String,
253    /// pg object id of the type
254    /// full registry could be found here: <https://github.com/postgres/postgres/blob/master/src/include/catalog/pg_type.dat>
255    #[prost(uint32, tag = "1")]
256    pub oid: u32,
257    /// advanced type details useful for pg wire format proxying
258    #[prost(int32, tag = "2")]
259    pub typlen: i32,
260    #[prost(int32, tag = "3")]
261    pub typmod: i32,
262}
263#[derive(serde::Serialize, serde::Deserialize)]
264#[derive(Clone, PartialEq, ::prost::Message)]
265pub struct Type {
266    #[prost(
267        oneof = "r#type::Type",
268        tags = "1, 2, 101, 102, 103, 104, 105, 106, 107, 201, 202, 203, 204, 205"
269    )]
270    pub r#type: ::core::option::Option<r#type::Type>,
271}
272/// Nested message and enum types in `Type`.
273pub mod r#type {
274    #[derive(serde::Serialize, serde::Deserialize)]
275    #[derive(
276        Clone,
277        Copy,
278        Debug,
279        PartialEq,
280        Eq,
281        Hash,
282        PartialOrd,
283        Ord,
284        ::prost::Enumeration
285    )]
286    #[repr(i32)]
287    pub enum PrimitiveTypeId {
288        Unspecified = 0,
289        Bool = 6,
290        Int8 = 7,
291        Uint8 = 5,
292        Int16 = 8,
293        Uint16 = 9,
294        Int32 = 1,
295        Uint32 = 2,
296        Int64 = 3,
297        Uint64 = 4,
298        Float = 33,
299        Double = 32,
300        Date = 48,
301        Datetime = 49,
302        Timestamp = 50,
303        Interval = 51,
304        TzDate = 52,
305        TzDatetime = 53,
306        TzTimestamp = 54,
307        String = 4097,
308        Utf8 = 4608,
309        Yson = 4609,
310        Json = 4610,
311        Uuid = 4611,
312        JsonDocument = 4612,
313        Dynumber = 4866,
314    }
315    impl PrimitiveTypeId {
316        /// String value of the enum field names used in the ProtoBuf definition.
317        /// The values are not transformed in any way and thus are considered stable
318        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
319        pub fn as_str_name(&self) -> &'static str {
320            match self {
321                PrimitiveTypeId::Unspecified => "PRIMITIVE_TYPE_ID_UNSPECIFIED",
322                PrimitiveTypeId::Bool => "BOOL",
323                PrimitiveTypeId::Int8 => "INT8",
324                PrimitiveTypeId::Uint8 => "UINT8",
325                PrimitiveTypeId::Int16 => "INT16",
326                PrimitiveTypeId::Uint16 => "UINT16",
327                PrimitiveTypeId::Int32 => "INT32",
328                PrimitiveTypeId::Uint32 => "UINT32",
329                PrimitiveTypeId::Int64 => "INT64",
330                PrimitiveTypeId::Uint64 => "UINT64",
331                PrimitiveTypeId::Float => "FLOAT",
332                PrimitiveTypeId::Double => "DOUBLE",
333                PrimitiveTypeId::Date => "DATE",
334                PrimitiveTypeId::Datetime => "DATETIME",
335                PrimitiveTypeId::Timestamp => "TIMESTAMP",
336                PrimitiveTypeId::Interval => "INTERVAL",
337                PrimitiveTypeId::TzDate => "TZ_DATE",
338                PrimitiveTypeId::TzDatetime => "TZ_DATETIME",
339                PrimitiveTypeId::TzTimestamp => "TZ_TIMESTAMP",
340                PrimitiveTypeId::String => "STRING",
341                PrimitiveTypeId::Utf8 => "UTF8",
342                PrimitiveTypeId::Yson => "YSON",
343                PrimitiveTypeId::Json => "JSON",
344                PrimitiveTypeId::Uuid => "UUID",
345                PrimitiveTypeId::JsonDocument => "JSON_DOCUMENT",
346                PrimitiveTypeId::Dynumber => "DYNUMBER",
347            }
348        }
349    }
350    #[derive(serde::Serialize, serde::Deserialize)]
351    #[derive(Clone, PartialEq, ::prost::Oneof)]
352    pub enum Type {
353        /// Data types 
354        #[prost(enumeration = "PrimitiveTypeId", tag = "1")]
355        TypeId(i32),
356        #[prost(message, tag = "2")]
357        DecimalType(super::DecimalType),
358        /// Container types 
359        #[prost(message, tag = "101")]
360        OptionalType(::prost::alloc::boxed::Box<super::OptionalType>),
361        #[prost(message, tag = "102")]
362        ListType(::prost::alloc::boxed::Box<super::ListType>),
363        #[prost(message, tag = "103")]
364        TupleType(super::TupleType),
365        #[prost(message, tag = "104")]
366        StructType(super::StructType),
367        #[prost(message, tag = "105")]
368        DictType(::prost::alloc::boxed::Box<super::DictType>),
369        #[prost(message, tag = "106")]
370        VariantType(super::VariantType),
371        #[prost(message, tag = "107")]
372        TaggedType(::prost::alloc::boxed::Box<super::TaggedType>),
373        /// Special types 
374        #[prost(enumeration = "super::super::google::protobuf::NullValue", tag = "201")]
375        VoidType(i32),
376        #[prost(enumeration = "super::super::google::protobuf::NullValue", tag = "202")]
377        NullType(i32),
378        #[prost(enumeration = "super::super::google::protobuf::NullValue", tag = "203")]
379        EmptyListType(i32),
380        #[prost(enumeration = "super::super::google::protobuf::NullValue", tag = "204")]
381        EmptyDictType(i32),
382        #[prost(message, tag = "205")]
383        PgType(super::PgType),
384    }
385}
386#[derive(serde::Serialize, serde::Deserialize)]
387#[derive(Clone, PartialEq, ::prost::Message)]
388pub struct ValuePair {
389    #[prost(message, optional, tag = "1")]
390    pub key: ::core::option::Option<Value>,
391    #[prost(message, optional, tag = "2")]
392    pub payload: ::core::option::Option<Value>,
393}
394#[derive(serde::Serialize, serde::Deserialize)]
395#[derive(Clone, PartialEq, ::prost::Message)]
396pub struct Value {
397    /// Used for List, Tuple, Struct types
398    #[prost(message, repeated, tag = "12")]
399    pub items: ::prost::alloc::vec::Vec<Value>,
400    /// Used for Dict type
401    #[prost(message, repeated, tag = "13")]
402    pub pairs: ::prost::alloc::vec::Vec<ValuePair>,
403    /// Used for Variant type
404    #[prost(uint32, tag = "14")]
405    pub variant_index: u32,
406    #[prost(fixed64, tag = "16")]
407    pub high_128: u64,
408    #[prost(oneof = "value::Value", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15")]
409    pub value: ::core::option::Option<value::Value>,
410}
411/// Nested message and enum types in `Value`.
412pub mod value {
413    #[derive(serde::Serialize, serde::Deserialize)]
414    #[derive(Clone, PartialEq, ::prost::Oneof)]
415    pub enum Value {
416        #[prost(bool, tag = "1")]
417        BoolValue(bool),
418        #[prost(sfixed32, tag = "2")]
419        Int32Value(i32),
420        #[prost(fixed32, tag = "3")]
421        Uint32Value(u32),
422        #[prost(sfixed64, tag = "4")]
423        Int64Value(i64),
424        #[prost(fixed64, tag = "5")]
425        Uint64Value(u64),
426        #[prost(float, tag = "6")]
427        FloatValue(f32),
428        #[prost(double, tag = "7")]
429        DoubleValue(f64),
430        #[prost(bytes, tag = "8")]
431        BytesValue(::prost::alloc::vec::Vec<u8>),
432        #[prost(string, tag = "9")]
433        TextValue(::prost::alloc::string::String),
434        /// Set if current TValue is terminal Null
435        #[prost(enumeration = "super::super::google::protobuf::NullValue", tag = "10")]
436        NullFlagValue(i32),
437        /// Represents nested TValue for Optional<Optional<T>>(Null), or Variant<T> types
438        #[prost(message, tag = "11")]
439        NestedValue(::prost::alloc::boxed::Box<super::Value>),
440        #[prost(fixed64, tag = "15")]
441        Low128(u64),
442    }
443}
444#[derive(serde::Serialize, serde::Deserialize)]
445#[derive(Clone, PartialEq, ::prost::Message)]
446pub struct TypedValue {
447    #[prost(message, optional, tag = "1")]
448    pub r#type: ::core::option::Option<Type>,
449    #[prost(message, optional, tag = "2")]
450    pub value: ::core::option::Option<Value>,
451}
452#[derive(serde::Serialize, serde::Deserialize)]
453#[derive(Clone, PartialEq, ::prost::Message)]
454pub struct Column {
455    /// Name of column
456    #[prost(string, tag = "1")]
457    pub name: ::prost::alloc::string::String,
458    /// Type of column
459    #[prost(message, optional, tag = "2")]
460    pub r#type: ::core::option::Option<Type>,
461}
462/// Represents table-like structure with ordered set of rows and columns
463#[derive(serde::Serialize, serde::Deserialize)]
464#[derive(Clone, PartialEq, ::prost::Message)]
465pub struct ResultSet {
466    /// Metadata of columns
467    #[prost(message, repeated, tag = "1")]
468    pub columns: ::prost::alloc::vec::Vec<Column>,
469    /// Rows of table
470    #[prost(message, repeated, tag = "2")]
471    pub rows: ::prost::alloc::vec::Vec<Value>,
472    /// Flag indicates the result was truncated
473    #[prost(bool, tag = "3")]
474    pub truncated: bool,
475}