ydb_grpc_bindings/generated/
ydb.rs

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