ydb_grpc/generated/
ydb.table.rs

1/// Create new session
2#[derive(serde::Serialize, serde::Deserialize)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct CreateSessionRequest {
5    #[prost(message, optional, tag = "1")]
6    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
7}
8/// Create new session
9#[derive(serde::Serialize, serde::Deserialize)]
10#[derive(Clone, PartialEq, ::prost::Message)]
11pub struct CreateSessionResponse {
12    /// Holds CreateSessionResult in case of CreateSessionResult
13    #[prost(message, optional, tag = "1")]
14    pub operation: ::core::option::Option<super::operations::Operation>,
15}
16#[derive(serde::Serialize, serde::Deserialize)]
17#[derive(Clone, PartialEq, ::prost::Message)]
18pub struct CreateSessionResult {
19    /// Session identifier
20    #[prost(string, tag = "1")]
21    pub session_id: ::prost::alloc::string::String,
22}
23/// Delete session with given id string
24#[derive(serde::Serialize, serde::Deserialize)]
25#[derive(Clone, PartialEq, ::prost::Message)]
26pub struct DeleteSessionRequest {
27    /// Session identifier
28    #[prost(string, tag = "1")]
29    pub session_id: ::prost::alloc::string::String,
30    #[prost(message, optional, tag = "2")]
31    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
32}
33#[derive(serde::Serialize, serde::Deserialize)]
34#[derive(Clone, PartialEq, ::prost::Message)]
35pub struct DeleteSessionResponse {
36    #[prost(message, optional, tag = "1")]
37    pub operation: ::core::option::Option<super::operations::Operation>,
38}
39#[derive(serde::Serialize, serde::Deserialize)]
40#[derive(Clone, PartialEq, ::prost::Message)]
41pub struct GlobalIndex {}
42#[derive(serde::Serialize, serde::Deserialize)]
43#[derive(Clone, PartialEq, ::prost::Message)]
44pub struct GlobalAsyncIndex {}
45#[derive(serde::Serialize, serde::Deserialize)]
46#[derive(Clone, PartialEq, ::prost::Message)]
47pub struct GlobalUniqueIndex {}
48/// Represent secondary index
49#[derive(serde::Serialize, serde::Deserialize)]
50#[derive(Clone, PartialEq, ::prost::Message)]
51pub struct TableIndex {
52    /// Name of index
53    #[prost(string, tag = "1")]
54    pub name: ::prost::alloc::string::String,
55    /// list of columns
56    #[prost(string, repeated, tag = "2")]
57    pub index_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
58    /// list of columns content to be copied in to index table
59    #[prost(string, repeated, tag = "5")]
60    pub data_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
61    /// Type of index
62    #[prost(oneof = "table_index::Type", tags = "3, 4, 6")]
63    pub r#type: ::core::option::Option<table_index::Type>,
64}
65/// Nested message and enum types in `TableIndex`.
66pub mod table_index {
67    /// Type of index
68    #[derive(serde::Serialize, serde::Deserialize)]
69    #[derive(Clone, PartialEq, ::prost::Oneof)]
70    pub enum Type {
71        #[prost(message, tag = "3")]
72        GlobalIndex(super::GlobalIndex),
73        #[prost(message, tag = "4")]
74        GlobalAsyncIndex(super::GlobalAsyncIndex),
75        #[prost(message, tag = "6")]
76        GlobalUniqueIndex(super::GlobalUniqueIndex),
77    }
78}
79/// Represent secondary index with index state
80#[derive(serde::Serialize, serde::Deserialize)]
81#[derive(Clone, PartialEq, ::prost::Message)]
82pub struct TableIndexDescription {
83    /// Name of index
84    #[prost(string, tag = "1")]
85    pub name: ::prost::alloc::string::String,
86    /// list of columns
87    #[prost(string, repeated, tag = "2")]
88    pub index_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
89    #[prost(enumeration = "table_index_description::Status", tag = "4")]
90    pub status: i32,
91    /// list of columns content to be copied in to index table
92    #[prost(string, repeated, tag = "6")]
93    pub data_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
94    /// Size of index data in bytes
95    #[prost(uint64, tag = "7")]
96    pub size_bytes: u64,
97    /// Type of index
98    #[prost(oneof = "table_index_description::Type", tags = "3, 5, 8")]
99    pub r#type: ::core::option::Option<table_index_description::Type>,
100}
101/// Nested message and enum types in `TableIndexDescription`.
102pub mod table_index_description {
103    #[derive(serde::Serialize, serde::Deserialize)]
104    #[derive(
105        Clone,
106        Copy,
107        Debug,
108        PartialEq,
109        Eq,
110        Hash,
111        PartialOrd,
112        Ord,
113        ::prost::Enumeration
114    )]
115    #[repr(i32)]
116    pub enum Status {
117        Unspecified = 0,
118        /// Index is ready to use
119        Ready = 1,
120        /// index is being built
121        Building = 2,
122    }
123    impl Status {
124        /// String value of the enum field names used in the ProtoBuf definition.
125        /// The values are not transformed in any way and thus are considered stable
126        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
127        pub fn as_str_name(&self) -> &'static str {
128            match self {
129                Status::Unspecified => "STATUS_UNSPECIFIED",
130                Status::Ready => "STATUS_READY",
131                Status::Building => "STATUS_BUILDING",
132            }
133        }
134    }
135    /// Type of index
136    #[derive(serde::Serialize, serde::Deserialize)]
137    #[derive(Clone, PartialEq, ::prost::Oneof)]
138    pub enum Type {
139        #[prost(message, tag = "3")]
140        GlobalIndex(super::GlobalIndex),
141        #[prost(message, tag = "5")]
142        GlobalAsyncIndex(super::GlobalAsyncIndex),
143        #[prost(message, tag = "8")]
144        GlobalUniqueIndex(super::GlobalUniqueIndex),
145    }
146}
147/// State of index building operation
148#[derive(serde::Serialize, serde::Deserialize)]
149#[derive(Clone, PartialEq, ::prost::Message)]
150pub struct IndexBuildState {}
151/// Nested message and enum types in `IndexBuildState`.
152pub mod index_build_state {
153    #[derive(serde::Serialize, serde::Deserialize)]
154    #[derive(
155        Clone,
156        Copy,
157        Debug,
158        PartialEq,
159        Eq,
160        Hash,
161        PartialOrd,
162        Ord,
163        ::prost::Enumeration
164    )]
165    #[repr(i32)]
166    pub enum State {
167        Unspecified = 0,
168        Preparing = 1,
169        TransferingData = 2,
170        Applying = 3,
171        Done = 4,
172        Cancellation = 5,
173        Cancelled = 6,
174        Rejection = 7,
175        Rejected = 8,
176    }
177    impl State {
178        /// String value of the enum field names used in the ProtoBuf definition.
179        /// The values are not transformed in any way and thus are considered stable
180        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
181        pub fn as_str_name(&self) -> &'static str {
182            match self {
183                State::Unspecified => "STATE_UNSPECIFIED",
184                State::Preparing => "STATE_PREPARING",
185                State::TransferingData => "STATE_TRANSFERING_DATA",
186                State::Applying => "STATE_APPLYING",
187                State::Done => "STATE_DONE",
188                State::Cancellation => "STATE_CANCELLATION",
189                State::Cancelled => "STATE_CANCELLED",
190                State::Rejection => "STATE_REJECTION",
191                State::Rejected => "STATE_REJECTED",
192            }
193        }
194    }
195}
196/// Description of index building operation
197#[derive(serde::Serialize, serde::Deserialize)]
198#[derive(Clone, PartialEq, ::prost::Message)]
199pub struct IndexBuildDescription {
200    #[prost(string, tag = "1")]
201    pub path: ::prost::alloc::string::String,
202    #[prost(message, optional, tag = "2")]
203    pub index: ::core::option::Option<TableIndex>,
204}
205#[derive(serde::Serialize, serde::Deserialize)]
206#[derive(Clone, PartialEq, ::prost::Message)]
207pub struct IndexBuildMetadata {
208    #[prost(message, optional, tag = "1")]
209    pub description: ::core::option::Option<IndexBuildDescription>,
210    #[prost(enumeration = "index_build_state::State", tag = "2")]
211    pub state: i32,
212    #[prost(float, tag = "3")]
213    pub progress: f32,
214}
215#[derive(serde::Serialize, serde::Deserialize)]
216#[derive(Clone, PartialEq, ::prost::Message)]
217pub struct ChangefeedMode {}
218/// Nested message and enum types in `ChangefeedMode`.
219pub mod changefeed_mode {
220    #[derive(serde::Serialize, serde::Deserialize)]
221    #[derive(
222        Clone,
223        Copy,
224        Debug,
225        PartialEq,
226        Eq,
227        Hash,
228        PartialOrd,
229        Ord,
230        ::prost::Enumeration
231    )]
232    #[repr(i32)]
233    pub enum Mode {
234        Unspecified = 0,
235        /// Only the key component of the modified row
236        KeysOnly = 1,
237        /// Updated columns
238        Updates = 2,
239        /// The entire row, as it appears after it was modified
240        NewImage = 3,
241        /// The entire row, as it appeared before it was modified
242        OldImage = 4,
243        /// Both new and old images of the row
244        NewAndOldImages = 5,
245    }
246    impl Mode {
247        /// String value of the enum field names used in the ProtoBuf definition.
248        /// The values are not transformed in any way and thus are considered stable
249        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
250        pub fn as_str_name(&self) -> &'static str {
251            match self {
252                Mode::Unspecified => "MODE_UNSPECIFIED",
253                Mode::KeysOnly => "MODE_KEYS_ONLY",
254                Mode::Updates => "MODE_UPDATES",
255                Mode::NewImage => "MODE_NEW_IMAGE",
256                Mode::OldImage => "MODE_OLD_IMAGE",
257                Mode::NewAndOldImages => "MODE_NEW_AND_OLD_IMAGES",
258            }
259        }
260    }
261}
262#[derive(serde::Serialize, serde::Deserialize)]
263#[derive(Clone, PartialEq, ::prost::Message)]
264pub struct ChangefeedFormat {}
265/// Nested message and enum types in `ChangefeedFormat`.
266pub mod changefeed_format {
267    #[derive(serde::Serialize, serde::Deserialize)]
268    #[derive(
269        Clone,
270        Copy,
271        Debug,
272        PartialEq,
273        Eq,
274        Hash,
275        PartialOrd,
276        Ord,
277        ::prost::Enumeration
278    )]
279    #[repr(i32)]
280    pub enum Format {
281        Unspecified = 0,
282        /// Change record in JSON format for common (row oriented) tables
283        Json = 1,
284        /// Change record in JSON format for document (DynamoDB-compatible) tables
285        DynamodbStreamsJson = 2,
286        /// Debezium-like change record JSON format for common (row oriented) tables
287        DebeziumJson = 3,
288    }
289    impl Format {
290        /// String value of the enum field names used in the ProtoBuf definition.
291        /// The values are not transformed in any way and thus are considered stable
292        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
293        pub fn as_str_name(&self) -> &'static str {
294            match self {
295                Format::Unspecified => "FORMAT_UNSPECIFIED",
296                Format::Json => "FORMAT_JSON",
297                Format::DynamodbStreamsJson => "FORMAT_DYNAMODB_STREAMS_JSON",
298                Format::DebeziumJson => "FORMAT_DEBEZIUM_JSON",
299            }
300        }
301    }
302}
303#[derive(serde::Serialize, serde::Deserialize)]
304#[derive(Clone, PartialEq, ::prost::Message)]
305pub struct Changefeed {
306    /// Name of the feed
307    #[prost(string, tag = "1")]
308    pub name: ::prost::alloc::string::String,
309    /// Mode specifies the information that will be written to the feed
310    #[prost(enumeration = "changefeed_mode::Mode", tag = "2")]
311    pub mode: i32,
312    /// Format of the data
313    #[prost(enumeration = "changefeed_format::Format", tag = "3")]
314    pub format: i32,
315    /// How long data in changefeed's underlying topic should be stored
316    #[prost(message, optional, tag = "4")]
317    pub retention_period: ::core::option::Option<
318        super::super::google::protobuf::Duration,
319    >,
320    /// Emit virtual timestamps of changes along with data or not
321    #[prost(bool, tag = "5")]
322    pub virtual_timestamps: bool,
323    /// Initial scan will output the current state of the table first
324    #[prost(bool, tag = "6")]
325    pub initial_scan: bool,
326    /// Attributes. Total size is limited to 10 KB.
327    #[prost(map = "string, string", tag = "7")]
328    pub attributes: ::std::collections::HashMap<
329        ::prost::alloc::string::String,
330        ::prost::alloc::string::String,
331    >,
332    /// Value that will be emitted in the `awsRegion` field of the record in DYNAMODB_STREAMS_JSON format
333    #[prost(string, tag = "8")]
334    pub aws_region: ::prost::alloc::string::String,
335    /// Periodically emit resolved timestamps. If unspecified, resolved timestamps are not emitted.
336    #[prost(message, optional, tag = "9")]
337    pub resolved_timestamps_interval: ::core::option::Option<
338        super::super::google::protobuf::Duration,
339    >,
340    /// Partitioning settings of underlying topic.
341    #[prost(message, optional, tag = "10")]
342    pub topic_partitioning_settings: ::core::option::Option<
343        super::topic::PartitioningSettings,
344    >,
345}
346#[derive(serde::Serialize, serde::Deserialize)]
347#[derive(Clone, PartialEq, ::prost::Message)]
348pub struct ChangefeedDescription {
349    /// Name of the feed
350    #[prost(string, tag = "1")]
351    pub name: ::prost::alloc::string::String,
352    /// Mode specifies the information that will be written to the feed
353    #[prost(enumeration = "changefeed_mode::Mode", tag = "2")]
354    pub mode: i32,
355    /// Format of the data
356    #[prost(enumeration = "changefeed_format::Format", tag = "3")]
357    pub format: i32,
358    /// State of the feed
359    #[prost(enumeration = "changefeed_description::State", tag = "4")]
360    pub state: i32,
361    /// State of emitting of virtual timestamps along with data
362    #[prost(bool, tag = "5")]
363    pub virtual_timestamps: bool,
364    /// Attributes
365    #[prost(map = "string, string", tag = "6")]
366    pub attributes: ::std::collections::HashMap<
367        ::prost::alloc::string::String,
368        ::prost::alloc::string::String,
369    >,
370    /// Value that will be emitted in the `awsRegion` field of the record in DYNAMODB_STREAMS_JSON format
371    #[prost(string, tag = "7")]
372    pub aws_region: ::prost::alloc::string::String,
373    /// Interval of emitting of resolved timestamps. If unspecified, resolved timestamps are not emitted.
374    #[prost(message, optional, tag = "8")]
375    pub resolved_timestamps_interval: ::core::option::Option<
376        super::super::google::protobuf::Duration,
377    >,
378}
379/// Nested message and enum types in `ChangefeedDescription`.
380pub mod changefeed_description {
381    #[derive(serde::Serialize, serde::Deserialize)]
382    #[derive(
383        Clone,
384        Copy,
385        Debug,
386        PartialEq,
387        Eq,
388        Hash,
389        PartialOrd,
390        Ord,
391        ::prost::Enumeration
392    )]
393    #[repr(i32)]
394    pub enum State {
395        Unspecified = 0,
396        /// Normal state, from this state changefeed can be disabled
397        Enabled = 1,
398        /// No new change records are generated, but the old ones remain available
399        /// From this state changefeed cannot be switched to any other state
400        Disabled = 2,
401        /// An initial scan is being performed.
402        /// After its completion changefeed will switch to the normal state
403        InitialScan = 3,
404    }
405    impl State {
406        /// String value of the enum field names used in the ProtoBuf definition.
407        /// The values are not transformed in any way and thus are considered stable
408        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
409        pub fn as_str_name(&self) -> &'static str {
410            match self {
411                State::Unspecified => "STATE_UNSPECIFIED",
412                State::Enabled => "STATE_ENABLED",
413                State::Disabled => "STATE_DISABLED",
414                State::InitialScan => "STATE_INITIAL_SCAN",
415            }
416        }
417    }
418}
419#[derive(serde::Serialize, serde::Deserialize)]
420#[derive(Clone, PartialEq, ::prost::Message)]
421pub struct StoragePool {
422    #[prost(string, tag = "1")]
423    pub media: ::prost::alloc::string::String,
424}
425#[derive(serde::Serialize, serde::Deserialize)]
426#[derive(Clone, PartialEq, ::prost::Message)]
427pub struct StoragePolicy {
428    #[prost(string, tag = "1")]
429    pub preset_name: ::prost::alloc::string::String,
430    #[prost(message, optional, tag = "2")]
431    pub syslog: ::core::option::Option<StoragePool>,
432    #[prost(message, optional, tag = "3")]
433    pub log: ::core::option::Option<StoragePool>,
434    #[prost(message, optional, tag = "4")]
435    pub data: ::core::option::Option<StoragePool>,
436    #[prost(message, optional, tag = "5")]
437    pub external: ::core::option::Option<StoragePool>,
438    #[prost(enumeration = "super::feature_flag::Status", tag = "6")]
439    pub keep_in_memory: i32,
440    #[prost(message, repeated, tag = "7")]
441    pub column_families: ::prost::alloc::vec::Vec<ColumnFamilyPolicy>,
442}
443#[derive(serde::Serialize, serde::Deserialize)]
444#[derive(Clone, PartialEq, ::prost::Message)]
445pub struct ColumnFamilyPolicy {
446    /// Name of the column family, the name "default" must be used for the
447    /// primary column family that contains as least primary key columns
448    #[prost(string, tag = "1")]
449    pub name: ::prost::alloc::string::String,
450    /// Storage settings for the column group (default to values in storage policy)
451    #[prost(message, optional, tag = "2")]
452    pub data: ::core::option::Option<StoragePool>,
453    #[prost(message, optional, tag = "3")]
454    pub external: ::core::option::Option<StoragePool>,
455    /// When enabled table data will be kept in memory
456    /// WARNING: DO NOT USE
457    #[prost(enumeration = "super::feature_flag::Status", tag = "4")]
458    pub keep_in_memory: i32,
459    /// Optionally specify whether data should be compressed
460    #[prost(enumeration = "column_family_policy::Compression", tag = "5")]
461    pub compression: i32,
462}
463/// Nested message and enum types in `ColumnFamilyPolicy`.
464pub mod column_family_policy {
465    #[derive(serde::Serialize, serde::Deserialize)]
466    #[derive(
467        Clone,
468        Copy,
469        Debug,
470        PartialEq,
471        Eq,
472        Hash,
473        PartialOrd,
474        Ord,
475        ::prost::Enumeration
476    )]
477    #[repr(i32)]
478    pub enum Compression {
479        Unspecified = 0,
480        Uncompressed = 1,
481        Compressed = 2,
482    }
483    impl Compression {
484        /// String value of the enum field names used in the ProtoBuf definition.
485        /// The values are not transformed in any way and thus are considered stable
486        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
487        pub fn as_str_name(&self) -> &'static str {
488            match self {
489                Compression::Unspecified => "COMPRESSION_UNSPECIFIED",
490                Compression::Uncompressed => "UNCOMPRESSED",
491                Compression::Compressed => "COMPRESSED",
492            }
493        }
494    }
495}
496#[derive(serde::Serialize, serde::Deserialize)]
497#[derive(Clone, PartialEq, ::prost::Message)]
498pub struct CompactionPolicy {
499    #[prost(string, tag = "1")]
500    pub preset_name: ::prost::alloc::string::String,
501}
502#[derive(serde::Serialize, serde::Deserialize)]
503#[derive(Clone, PartialEq, ::prost::Message)]
504pub struct ExplicitPartitions {
505    /// Specify key values used to split table into partitions.
506    /// Each value becomes the first key of a new partition.
507    /// Key values should go in ascending order.
508    /// Total number of created partitions is number of specified
509    /// keys + 1.
510    #[prost(message, repeated, tag = "1")]
511    pub split_points: ::prost::alloc::vec::Vec<super::TypedValue>,
512}
513#[derive(serde::Serialize, serde::Deserialize)]
514#[derive(Clone, PartialEq, ::prost::Message)]
515pub struct PartitionStats {
516    /// Approximate number of rows in shard
517    #[prost(uint64, tag = "1")]
518    pub rows_estimate: u64,
519    /// Approximate size of shard (bytes)
520    #[prost(uint64, tag = "2")]
521    pub store_size: u64,
522}
523#[derive(serde::Serialize, serde::Deserialize)]
524#[derive(Clone, PartialEq, ::prost::Message)]
525pub struct TableStats {
526    /// Stats for each partition
527    #[prost(message, repeated, tag = "1")]
528    pub partition_stats: ::prost::alloc::vec::Vec<PartitionStats>,
529    /// Approximate number of rows in table
530    #[prost(uint64, tag = "2")]
531    pub rows_estimate: u64,
532    /// Approximate size of table (bytes)
533    #[prost(uint64, tag = "3")]
534    pub store_size: u64,
535    /// Number of partitions in table
536    #[prost(uint64, tag = "4")]
537    pub partitions: u64,
538    /// Timestamp of table creation
539    #[prost(message, optional, tag = "5")]
540    pub creation_time: ::core::option::Option<super::super::google::protobuf::Timestamp>,
541    /// Timestamp of last modification
542    #[prost(message, optional, tag = "6")]
543    pub modification_time: ::core::option::Option<
544        super::super::google::protobuf::Timestamp,
545    >,
546}
547#[derive(serde::Serialize, serde::Deserialize)]
548#[derive(Clone, PartialEq, ::prost::Message)]
549pub struct PartitioningPolicy {
550    #[prost(string, tag = "1")]
551    pub preset_name: ::prost::alloc::string::String,
552    #[prost(enumeration = "partitioning_policy::AutoPartitioningPolicy", tag = "2")]
553    pub auto_partitioning: i32,
554    #[prost(oneof = "partitioning_policy::Partitions", tags = "3, 4")]
555    pub partitions: ::core::option::Option<partitioning_policy::Partitions>,
556}
557/// Nested message and enum types in `PartitioningPolicy`.
558pub mod partitioning_policy {
559    #[derive(serde::Serialize, serde::Deserialize)]
560    #[derive(
561        Clone,
562        Copy,
563        Debug,
564        PartialEq,
565        Eq,
566        Hash,
567        PartialOrd,
568        Ord,
569        ::prost::Enumeration
570    )]
571    #[repr(i32)]
572    pub enum AutoPartitioningPolicy {
573        Unspecified = 0,
574        Disabled = 1,
575        AutoSplit = 2,
576        AutoSplitMerge = 3,
577    }
578    impl AutoPartitioningPolicy {
579        /// String value of the enum field names used in the ProtoBuf definition.
580        /// The values are not transformed in any way and thus are considered stable
581        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
582        pub fn as_str_name(&self) -> &'static str {
583            match self {
584                AutoPartitioningPolicy::Unspecified => {
585                    "AUTO_PARTITIONING_POLICY_UNSPECIFIED"
586                }
587                AutoPartitioningPolicy::Disabled => "DISABLED",
588                AutoPartitioningPolicy::AutoSplit => "AUTO_SPLIT",
589                AutoPartitioningPolicy::AutoSplitMerge => "AUTO_SPLIT_MERGE",
590            }
591        }
592    }
593    #[derive(serde::Serialize, serde::Deserialize)]
594    #[derive(Clone, PartialEq, ::prost::Oneof)]
595    pub enum Partitions {
596        /// Allows to enable uniform sharding using given shards number.
597        /// The first components of primary key must have Uint32/Uint64 type.
598        #[prost(uint64, tag = "3")]
599        UniformPartitions(u64),
600        /// Explicitly specify key values which are used as borders for
601        /// created partitions.
602        #[prost(message, tag = "4")]
603        ExplicitPartitions(super::ExplicitPartitions),
604    }
605}
606#[derive(serde::Serialize, serde::Deserialize)]
607#[derive(Clone, PartialEq, ::prost::Message)]
608pub struct ExecutionPolicy {
609    #[prost(string, tag = "1")]
610    pub preset_name: ::prost::alloc::string::String,
611}
612#[derive(serde::Serialize, serde::Deserialize)]
613#[derive(Clone, PartialEq, ::prost::Message)]
614pub struct ReplicationPolicy {
615    #[prost(string, tag = "1")]
616    pub preset_name: ::prost::alloc::string::String,
617    /// If value is non-zero then it specifies a number of read-only
618    /// replicas to create for a table. Zero value means preset
619    /// setting usage.
620    #[prost(uint32, tag = "2")]
621    pub replicas_count: u32,
622    /// If this feature in enabled then requested number of replicas
623    /// will be created in each availability zone.
624    #[prost(enumeration = "super::feature_flag::Status", tag = "3")]
625    pub create_per_availability_zone: i32,
626    /// If this feature in enabled then read-only replicas can be promoted
627    /// to leader.
628    #[prost(enumeration = "super::feature_flag::Status", tag = "4")]
629    pub allow_promotion: i32,
630}
631#[derive(serde::Serialize, serde::Deserialize)]
632#[derive(Clone, PartialEq, ::prost::Message)]
633pub struct CachingPolicy {
634    #[prost(string, tag = "1")]
635    pub preset_name: ::prost::alloc::string::String,
636}
637#[derive(serde::Serialize, serde::Deserialize)]
638#[derive(Clone, PartialEq, ::prost::Message)]
639pub struct TableProfile {
640    #[prost(string, tag = "1")]
641    pub preset_name: ::prost::alloc::string::String,
642    #[prost(message, optional, tag = "2")]
643    pub storage_policy: ::core::option::Option<StoragePolicy>,
644    #[prost(message, optional, tag = "3")]
645    pub compaction_policy: ::core::option::Option<CompactionPolicy>,
646    #[prost(message, optional, tag = "4")]
647    pub partitioning_policy: ::core::option::Option<PartitioningPolicy>,
648    #[prost(message, optional, tag = "5")]
649    pub execution_policy: ::core::option::Option<ExecutionPolicy>,
650    #[prost(message, optional, tag = "6")]
651    pub replication_policy: ::core::option::Option<ReplicationPolicy>,
652    #[prost(message, optional, tag = "7")]
653    pub caching_policy: ::core::option::Option<CachingPolicy>,
654}
655#[derive(serde::Serialize, serde::Deserialize)]
656#[derive(Clone, PartialEq, ::prost::Message)]
657pub struct SequenceDescription {
658    /// mandatorys
659    #[prost(string, optional, tag = "1")]
660    pub name: ::core::option::Option<::prost::alloc::string::String>,
661    /// minimum value, defaults to 1 or Min<i64>
662    #[prost(sint64, optional, tag = "2")]
663    pub min_value: ::core::option::Option<i64>,
664    /// maximum value, defaults to Max<i64> or -1
665    #[prost(sint64, optional, tag = "3")]
666    pub max_value: ::core::option::Option<i64>,
667    /// start value, defaults to min_value
668    #[prost(sint64, optional, tag = "4")]
669    pub start_value: ::core::option::Option<i64>,
670    /// number of items to cache, defaults to 1
671    #[prost(uint64, optional, tag = "5")]
672    pub cache: ::core::option::Option<u64>,
673    /// increment at each call, defaults to 1
674    #[prost(sint64, optional, tag = "6")]
675    pub increment: ::core::option::Option<i64>,
676    /// true when cycle on overflow is allowed
677    #[prost(bool, optional, tag = "7")]
678    pub cycle: ::core::option::Option<bool>,
679    /// set_val(next_value, next_used) is executed atomically when creating
680    #[prost(message, optional, tag = "8")]
681    pub set_val: ::core::option::Option<sequence_description::SetVal>,
682}
683/// Nested message and enum types in `SequenceDescription`.
684pub mod sequence_description {
685    #[derive(serde::Serialize, serde::Deserialize)]
686    #[derive(Clone, PartialEq, ::prost::Message)]
687    pub struct SetVal {
688        #[prost(sint64, optional, tag = "1")]
689        pub next_value: ::core::option::Option<i64>,
690        #[prost(bool, optional, tag = "2")]
691        pub next_used: ::core::option::Option<bool>,
692    }
693}
694#[derive(serde::Serialize, serde::Deserialize)]
695#[derive(Clone, PartialEq, ::prost::Message)]
696pub struct ColumnMeta {
697    /// Name of column
698    #[prost(string, tag = "1")]
699    pub name: ::prost::alloc::string::String,
700    /// Type of column
701    #[prost(message, optional, tag = "2")]
702    pub r#type: ::core::option::Option<super::Type>,
703    /// Column family name of the column
704    #[prost(string, tag = "3")]
705    pub family: ::prost::alloc::string::String,
706    /// Column nullability
707    #[prost(bool, optional, tag = "4")]
708    pub not_null: ::core::option::Option<bool>,
709    /// Column default value option
710    #[prost(oneof = "column_meta::DefaultValue", tags = "5, 6")]
711    pub default_value: ::core::option::Option<column_meta::DefaultValue>,
712}
713/// Nested message and enum types in `ColumnMeta`.
714pub mod column_meta {
715    /// Column default value option
716    #[derive(serde::Serialize, serde::Deserialize)]
717    #[derive(Clone, PartialEq, ::prost::Oneof)]
718    pub enum DefaultValue {
719        #[prost(message, tag = "5")]
720        FromLiteral(super::super::TypedValue),
721        #[prost(message, tag = "6")]
722        FromSequence(super::SequenceDescription),
723    }
724}
725/// The row will be considered as expired at the moment of time, when the value
726/// stored in <column_name> is less than or equal to the current time (in epoch
727/// time format), and <expire_after_seconds> has passed since that moment;
728/// i.e. the expiration threshold is the value of <column_name> plus <expire_after_seconds>.
729#[derive(serde::Serialize, serde::Deserialize)]
730#[derive(Clone, PartialEq, ::prost::Message)]
731pub struct DateTypeColumnModeSettings {
732    /// The column type must be a date type
733    #[prost(string, tag = "1")]
734    pub column_name: ::prost::alloc::string::String,
735    #[prost(uint32, tag = "2")]
736    pub expire_after_seconds: u32,
737}
738/// Same as DateTypeColumnModeSettings (above), but useful when type of the
739/// value stored in <column_name> is not a date type.
740#[derive(serde::Serialize, serde::Deserialize)]
741#[derive(Clone, PartialEq, ::prost::Message)]
742pub struct ValueSinceUnixEpochModeSettings {
743    /// The column type must be one of:
744    /// - Uint32
745    /// - Uint64
746    /// - DyNumber
747    #[prost(string, tag = "1")]
748    pub column_name: ::prost::alloc::string::String,
749    /// Interpretation of the value stored in <column_name>
750    #[prost(enumeration = "value_since_unix_epoch_mode_settings::Unit", tag = "2")]
751    pub column_unit: i32,
752    /// This option is always interpreted as seconds regardless of the
753    /// <column_unit> value.
754    #[prost(uint32, tag = "3")]
755    pub expire_after_seconds: u32,
756}
757/// Nested message and enum types in `ValueSinceUnixEpochModeSettings`.
758pub mod value_since_unix_epoch_mode_settings {
759    #[derive(serde::Serialize, serde::Deserialize)]
760    #[derive(
761        Clone,
762        Copy,
763        Debug,
764        PartialEq,
765        Eq,
766        Hash,
767        PartialOrd,
768        Ord,
769        ::prost::Enumeration
770    )]
771    #[repr(i32)]
772    pub enum Unit {
773        Unspecified = 0,
774        Seconds = 1,
775        Milliseconds = 2,
776        Microseconds = 3,
777        Nanoseconds = 4,
778    }
779    impl Unit {
780        /// String value of the enum field names used in the ProtoBuf definition.
781        /// The values are not transformed in any way and thus are considered stable
782        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
783        pub fn as_str_name(&self) -> &'static str {
784            match self {
785                Unit::Unspecified => "UNIT_UNSPECIFIED",
786                Unit::Seconds => "UNIT_SECONDS",
787                Unit::Milliseconds => "UNIT_MILLISECONDS",
788                Unit::Microseconds => "UNIT_MICROSECONDS",
789                Unit::Nanoseconds => "UNIT_NANOSECONDS",
790            }
791        }
792    }
793}
794#[derive(serde::Serialize, serde::Deserialize)]
795#[derive(Clone, PartialEq, ::prost::Message)]
796pub struct TtlSettings {
797    /// How often to run BRO on the same partition.
798    /// BRO will not be started more often, but may be started less often.
799    #[prost(uint32, tag = "3")]
800    pub run_interval_seconds: u32,
801    #[prost(oneof = "ttl_settings::Mode", tags = "1, 2")]
802    pub mode: ::core::option::Option<ttl_settings::Mode>,
803}
804/// Nested message and enum types in `TtlSettings`.
805pub mod ttl_settings {
806    #[derive(serde::Serialize, serde::Deserialize)]
807    #[derive(Clone, PartialEq, ::prost::Oneof)]
808    pub enum Mode {
809        #[prost(message, tag = "1")]
810        DateTypeColumn(super::DateTypeColumnModeSettings),
811        #[prost(message, tag = "2")]
812        ValueSinceUnixEpoch(super::ValueSinceUnixEpochModeSettings),
813    }
814}
815#[derive(serde::Serialize, serde::Deserialize)]
816#[derive(Clone, PartialEq, ::prost::Message)]
817pub struct StorageSettings {
818    /// This specifies internal channel 0 commit log storage pool
819    /// Fastest available storage recommended, negligible amounts of short-lived data
820    #[prost(message, optional, tag = "1")]
821    pub tablet_commit_log0: ::core::option::Option<StoragePool>,
822    /// This specifies internal channel 1 commit log storage pool
823    /// Fastest available storage recommended, small amounts of short-lived data
824    #[prost(message, optional, tag = "2")]
825    pub tablet_commit_log1: ::core::option::Option<StoragePool>,
826    /// This specifies external blobs storage pool
827    #[prost(message, optional, tag = "4")]
828    pub external: ::core::option::Option<StoragePool>,
829    /// Optionally store large values in "external blobs"
830    /// WARNING: DO NOT USE
831    /// This feature is experimental and should not be used, restrictions apply:
832    /// * Table cannot split/merge when this is enabled
833    /// * Table cannot be copied or backed up when this is enabled
834    /// * This feature cannot be disabled once enabled for a table
835    #[prost(enumeration = "super::feature_flag::Status", tag = "5")]
836    pub store_external_blobs: i32,
837}
838#[derive(serde::Serialize, serde::Deserialize)]
839#[derive(Clone, PartialEq, ::prost::Message)]
840pub struct ColumnFamily {
841    /// Name of the column family, the name "default" must be used for the
842    /// primary column family that contains at least primary key columns
843    #[prost(string, tag = "1")]
844    pub name: ::prost::alloc::string::String,
845    /// This specifies data storage settings for column family
846    #[prost(message, optional, tag = "2")]
847    pub data: ::core::option::Option<StoragePool>,
848    /// Optionally specify how data should be compressed
849    #[prost(enumeration = "column_family::Compression", tag = "3")]
850    pub compression: i32,
851    /// When enabled table data will be kept in memory
852    /// WARNING: DO NOT USE
853    #[prost(enumeration = "super::feature_flag::Status", tag = "4")]
854    pub keep_in_memory: i32,
855}
856/// Nested message and enum types in `ColumnFamily`.
857pub mod column_family {
858    #[derive(serde::Serialize, serde::Deserialize)]
859    #[derive(
860        Clone,
861        Copy,
862        Debug,
863        PartialEq,
864        Eq,
865        Hash,
866        PartialOrd,
867        Ord,
868        ::prost::Enumeration
869    )]
870    #[repr(i32)]
871    pub enum Compression {
872        Unspecified = 0,
873        None = 1,
874        Lz4 = 2,
875    }
876    impl Compression {
877        /// String value of the enum field names used in the ProtoBuf definition.
878        /// The values are not transformed in any way and thus are considered stable
879        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
880        pub fn as_str_name(&self) -> &'static str {
881            match self {
882                Compression::Unspecified => "COMPRESSION_UNSPECIFIED",
883                Compression::None => "COMPRESSION_NONE",
884                Compression::Lz4 => "COMPRESSION_LZ4",
885            }
886        }
887    }
888}
889#[derive(serde::Serialize, serde::Deserialize)]
890#[derive(Clone, PartialEq, ::prost::Message)]
891pub struct PartitioningSettings {
892    /// List of columns to partition by
893    #[prost(string, repeated, tag = "1")]
894    pub partition_by: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
895    /// Enable auto partitioning on reaching upper or lower partition size bound
896    #[prost(enumeration = "super::feature_flag::Status", tag = "2")]
897    pub partitioning_by_size: i32,
898    /// Preferred partition size for auto partitioning by size, Mb
899    #[prost(uint64, tag = "3")]
900    pub partition_size_mb: u64,
901    /// Enable auto partitioning based on load on each partition
902    #[prost(enumeration = "super::feature_flag::Status", tag = "4")]
903    pub partitioning_by_load: i32,
904    /// Minimum partitions count auto merge would stop working at
905    #[prost(uint64, tag = "6")]
906    pub min_partitions_count: u64,
907    /// Maximum partitions count auto split would stop working at
908    #[prost(uint64, tag = "7")]
909    pub max_partitions_count: u64,
910}
911#[derive(serde::Serialize, serde::Deserialize)]
912#[derive(Clone, PartialEq, ::prost::Message)]
913pub struct AzReadReplicasSettings {
914    /// AZ name
915    #[prost(string, tag = "1")]
916    pub name: ::prost::alloc::string::String,
917    /// Read replicas count in this AZ
918    #[prost(uint64, tag = "2")]
919    pub read_replicas_count: u64,
920}
921#[derive(serde::Serialize, serde::Deserialize)]
922#[derive(Clone, PartialEq, ::prost::Message)]
923pub struct ClusterReplicasSettings {
924    /// List of read replicas settings for each AZ
925    #[prost(message, repeated, tag = "2")]
926    pub az_read_replicas_settings: ::prost::alloc::vec::Vec<AzReadReplicasSettings>,
927}
928#[derive(serde::Serialize, serde::Deserialize)]
929#[derive(Clone, PartialEq, ::prost::Message)]
930pub struct ReadReplicasSettings {
931    #[prost(oneof = "read_replicas_settings::Settings", tags = "1, 2")]
932    pub settings: ::core::option::Option<read_replicas_settings::Settings>,
933}
934/// Nested message and enum types in `ReadReplicasSettings`.
935pub mod read_replicas_settings {
936    #[derive(serde::Serialize, serde::Deserialize)]
937    #[derive(Clone, PartialEq, ::prost::Oneof)]
938    pub enum Settings {
939        /// Set equal read replicas count for every AZ
940        #[prost(uint64, tag = "1")]
941        PerAzReadReplicasCount(u64),
942        /// Set total replicas count between all AZs
943        #[prost(uint64, tag = "2")]
944        AnyAzReadReplicasCount(u64),
945    }
946}
947#[derive(serde::Serialize, serde::Deserialize)]
948#[derive(Clone, PartialEq, ::prost::Message)]
949pub struct CreateTableRequest {
950    /// Session identifier
951    #[prost(string, tag = "1")]
952    pub session_id: ::prost::alloc::string::String,
953    /// Full path
954    #[prost(string, tag = "2")]
955    pub path: ::prost::alloc::string::String,
956    /// Columns (name, type)
957    #[prost(message, repeated, tag = "3")]
958    pub columns: ::prost::alloc::vec::Vec<ColumnMeta>,
959    /// List of columns used as primary key
960    #[prost(string, repeated, tag = "4")]
961    pub primary_key: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
962    /// Table profile
963    #[prost(message, optional, tag = "5")]
964    pub profile: ::core::option::Option<TableProfile>,
965    #[prost(message, optional, tag = "6")]
966    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
967    /// List of secondary indexes
968    #[prost(message, repeated, tag = "7")]
969    pub indexes: ::prost::alloc::vec::Vec<TableIndex>,
970    /// Table rows time to live settings
971    #[prost(message, optional, tag = "8")]
972    pub ttl_settings: ::core::option::Option<TtlSettings>,
973    /// Storage settings for table
974    #[prost(message, optional, tag = "9")]
975    pub storage_settings: ::core::option::Option<StorageSettings>,
976    /// Column families
977    #[prost(message, repeated, tag = "10")]
978    pub column_families: ::prost::alloc::vec::Vec<ColumnFamily>,
979    /// Attributes. Total size is limited to 10 KB.
980    #[prost(map = "string, string", tag = "11")]
981    pub attributes: ::std::collections::HashMap<
982        ::prost::alloc::string::String,
983        ::prost::alloc::string::String,
984    >,
985    /// Predefined named set of settings for table compaction ["default", "small_table", "log_table"].
986    #[prost(string, tag = "12")]
987    pub compaction_policy: ::prost::alloc::string::String,
988    /// Partitioning settings for table
989    #[prost(message, optional, tag = "15")]
990    pub partitioning_settings: ::core::option::Option<PartitioningSettings>,
991    /// Bloom filter by key
992    #[prost(enumeration = "super::feature_flag::Status", tag = "16")]
993    pub key_bloom_filter: i32,
994    /// Read replicas settings for table
995    #[prost(message, optional, tag = "17")]
996    pub read_replicas_settings: ::core::option::Option<ReadReplicasSettings>,
997    /// Tiering rules name. It specifies how data migrates from one tier (logical storage) to another.
998    #[prost(string, tag = "18")]
999    pub tiering: ::prost::alloc::string::String,
1000    /// Is temporary table
1001    #[prost(bool, tag = "19")]
1002    pub temporary: bool,
1003    /// Is table column or row oriented
1004    #[prost(enumeration = "StoreType", tag = "20")]
1005    pub store_type: i32,
1006    /// Either one of the following partitions options can be specified
1007    #[prost(oneof = "create_table_request::Partitions", tags = "13, 14")]
1008    pub partitions: ::core::option::Option<create_table_request::Partitions>,
1009}
1010/// Nested message and enum types in `CreateTableRequest`.
1011pub mod create_table_request {
1012    /// Either one of the following partitions options can be specified
1013    #[derive(serde::Serialize, serde::Deserialize)]
1014    #[derive(Clone, PartialEq, ::prost::Oneof)]
1015    pub enum Partitions {
1016        /// Enable uniform partitioning using given partitions count.
1017        /// The first components of primary key must have Uint32/Uint64 type.
1018        #[prost(uint64, tag = "13")]
1019        UniformPartitions(u64),
1020        /// Explicitly specify key values which are used as borders for created partitions.
1021        #[prost(message, tag = "14")]
1022        PartitionAtKeys(super::ExplicitPartitions),
1023    }
1024}
1025#[derive(serde::Serialize, serde::Deserialize)]
1026#[derive(Clone, PartialEq, ::prost::Message)]
1027pub struct CreateTableResponse {
1028    #[prost(message, optional, tag = "1")]
1029    pub operation: ::core::option::Option<super::operations::Operation>,
1030}
1031/// Drop table with given path
1032#[derive(serde::Serialize, serde::Deserialize)]
1033#[derive(Clone, PartialEq, ::prost::Message)]
1034pub struct DropTableRequest {
1035    /// Session identifier
1036    #[prost(string, tag = "1")]
1037    pub session_id: ::prost::alloc::string::String,
1038    /// Full path
1039    #[prost(string, tag = "2")]
1040    pub path: ::prost::alloc::string::String,
1041    #[prost(message, optional, tag = "4")]
1042    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
1043}
1044#[derive(serde::Serialize, serde::Deserialize)]
1045#[derive(Clone, PartialEq, ::prost::Message)]
1046pub struct DropTableResponse {
1047    #[prost(message, optional, tag = "1")]
1048    pub operation: ::core::option::Option<super::operations::Operation>,
1049}
1050#[derive(serde::Serialize, serde::Deserialize)]
1051#[derive(Clone, PartialEq, ::prost::Message)]
1052pub struct RenameIndexItem {
1053    /// Index name to rename
1054    #[prost(string, tag = "1")]
1055    pub source_name: ::prost::alloc::string::String,
1056    /// Target index name
1057    #[prost(string, tag = "2")]
1058    pub destination_name: ::prost::alloc::string::String,
1059    /// Move options
1060    #[prost(bool, tag = "3")]
1061    pub replace_destination: bool,
1062}
1063/// Alter table with given path
1064#[derive(serde::Serialize, serde::Deserialize)]
1065#[derive(Clone, PartialEq, ::prost::Message)]
1066pub struct AlterTableRequest {
1067    /// Session identifier
1068    #[prost(string, tag = "1")]
1069    pub session_id: ::prost::alloc::string::String,
1070    /// Full path
1071    #[prost(string, tag = "2")]
1072    pub path: ::prost::alloc::string::String,
1073    /// Columns (name, type) to add
1074    #[prost(message, repeated, tag = "3")]
1075    pub add_columns: ::prost::alloc::vec::Vec<ColumnMeta>,
1076    /// Columns to remove
1077    #[prost(string, repeated, tag = "4")]
1078    pub drop_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1079    #[prost(message, optional, tag = "5")]
1080    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
1081    /// Columns to alter
1082    #[prost(message, repeated, tag = "6")]
1083    pub alter_columns: ::prost::alloc::vec::Vec<ColumnMeta>,
1084    /// Add secondary indexes
1085    #[prost(message, repeated, tag = "9")]
1086    pub add_indexes: ::prost::alloc::vec::Vec<TableIndex>,
1087    /// Remove secondary indexes
1088    #[prost(string, repeated, tag = "10")]
1089    pub drop_indexes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1090    /// Change table storage settings
1091    #[prost(message, optional, tag = "11")]
1092    pub alter_storage_settings: ::core::option::Option<StorageSettings>,
1093    /// Add/alter column families
1094    #[prost(message, repeated, tag = "12")]
1095    pub add_column_families: ::prost::alloc::vec::Vec<ColumnFamily>,
1096    #[prost(message, repeated, tag = "13")]
1097    pub alter_column_families: ::prost::alloc::vec::Vec<ColumnFamily>,
1098    /// Alter attributes. Leave the value blank to drop an attribute.
1099    /// Cannot be used in combination with other fields (except session_id and path) at the moment.
1100    #[prost(map = "string, string", tag = "14")]
1101    pub alter_attributes: ::std::collections::HashMap<
1102        ::prost::alloc::string::String,
1103        ::prost::alloc::string::String,
1104    >,
1105    /// Set predefined named set of settings for table compaction ["default", "small_table", "log_table"].
1106    /// Set "default" to use default preset.
1107    #[prost(string, tag = "15")]
1108    pub set_compaction_policy: ::prost::alloc::string::String,
1109    /// Change table partitioning settings
1110    #[prost(message, optional, tag = "16")]
1111    pub alter_partitioning_settings: ::core::option::Option<PartitioningSettings>,
1112    /// Enable/disable bloom filter by key
1113    #[prost(enumeration = "super::feature_flag::Status", tag = "17")]
1114    pub set_key_bloom_filter: i32,
1115    /// Set read replicas settings for table
1116    #[prost(message, optional, tag = "18")]
1117    pub set_read_replicas_settings: ::core::option::Option<ReadReplicasSettings>,
1118    /// Add change feeds
1119    #[prost(message, repeated, tag = "19")]
1120    pub add_changefeeds: ::prost::alloc::vec::Vec<Changefeed>,
1121    /// Remove change feeds (by its names)
1122    #[prost(string, repeated, tag = "20")]
1123    pub drop_changefeeds: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1124    /// Rename existed index
1125    #[prost(message, repeated, tag = "21")]
1126    pub rename_indexes: ::prost::alloc::vec::Vec<RenameIndexItem>,
1127    /// Setup or remove time to live settings
1128    #[prost(oneof = "alter_table_request::TtlAction", tags = "7, 8")]
1129    pub ttl_action: ::core::option::Option<alter_table_request::TtlAction>,
1130    /// Setup or remove tiering
1131    #[prost(oneof = "alter_table_request::TieringAction", tags = "22, 23")]
1132    pub tiering_action: ::core::option::Option<alter_table_request::TieringAction>,
1133}
1134/// Nested message and enum types in `AlterTableRequest`.
1135pub mod alter_table_request {
1136    /// Setup or remove time to live settings
1137    #[derive(serde::Serialize, serde::Deserialize)]
1138    #[derive(Clone, PartialEq, ::prost::Oneof)]
1139    pub enum TtlAction {
1140        #[prost(message, tag = "7")]
1141        SetTtlSettings(super::TtlSettings),
1142        #[prost(message, tag = "8")]
1143        DropTtlSettings(super::super::super::google::protobuf::Empty),
1144    }
1145    /// Setup or remove tiering
1146    #[derive(serde::Serialize, serde::Deserialize)]
1147    #[derive(Clone, PartialEq, ::prost::Oneof)]
1148    pub enum TieringAction {
1149        #[prost(string, tag = "22")]
1150        SetTiering(::prost::alloc::string::String),
1151        #[prost(message, tag = "23")]
1152        DropTiering(super::super::super::google::protobuf::Empty),
1153    }
1154}
1155#[derive(serde::Serialize, serde::Deserialize)]
1156#[derive(Clone, PartialEq, ::prost::Message)]
1157pub struct AlterTableResponse {
1158    #[prost(message, optional, tag = "1")]
1159    pub operation: ::core::option::Option<super::operations::Operation>,
1160}
1161/// Copy table with given path
1162#[derive(serde::Serialize, serde::Deserialize)]
1163#[derive(Clone, PartialEq, ::prost::Message)]
1164pub struct CopyTableRequest {
1165    /// Session identifier
1166    #[prost(string, tag = "1")]
1167    pub session_id: ::prost::alloc::string::String,
1168    /// Copy from path
1169    #[prost(string, tag = "2")]
1170    pub source_path: ::prost::alloc::string::String,
1171    /// Copy to path
1172    #[prost(string, tag = "3")]
1173    pub destination_path: ::prost::alloc::string::String,
1174    #[prost(message, optional, tag = "4")]
1175    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
1176}
1177#[derive(serde::Serialize, serde::Deserialize)]
1178#[derive(Clone, PartialEq, ::prost::Message)]
1179pub struct CopyTableResponse {
1180    #[prost(message, optional, tag = "1")]
1181    pub operation: ::core::option::Option<super::operations::Operation>,
1182}
1183#[derive(serde::Serialize, serde::Deserialize)]
1184#[derive(Clone, PartialEq, ::prost::Message)]
1185pub struct CopyTableItem {
1186    /// Copy from path
1187    #[prost(string, tag = "1")]
1188    pub source_path: ::prost::alloc::string::String,
1189    /// Copy to path
1190    #[prost(string, tag = "2")]
1191    pub destination_path: ::prost::alloc::string::String,
1192    /// Copy options
1193    #[prost(bool, tag = "3")]
1194    pub omit_indexes: bool,
1195}
1196/// Creates consistent copy of given tables.
1197#[derive(serde::Serialize, serde::Deserialize)]
1198#[derive(Clone, PartialEq, ::prost::Message)]
1199pub struct CopyTablesRequest {
1200    #[prost(message, optional, tag = "1")]
1201    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
1202    /// Session identifier
1203    #[prost(string, tag = "2")]
1204    pub session_id: ::prost::alloc::string::String,
1205    /// Source and destination paths which describe copies
1206    #[prost(message, repeated, tag = "3")]
1207    pub tables: ::prost::alloc::vec::Vec<CopyTableItem>,
1208}
1209#[derive(serde::Serialize, serde::Deserialize)]
1210#[derive(Clone, PartialEq, ::prost::Message)]
1211pub struct CopyTablesResponse {
1212    #[prost(message, optional, tag = "1")]
1213    pub operation: ::core::option::Option<super::operations::Operation>,
1214}
1215#[derive(serde::Serialize, serde::Deserialize)]
1216#[derive(Clone, PartialEq, ::prost::Message)]
1217pub struct RenameTableItem {
1218    /// Full path
1219    #[prost(string, tag = "1")]
1220    pub source_path: ::prost::alloc::string::String,
1221    /// Full path
1222    #[prost(string, tag = "2")]
1223    pub destination_path: ::prost::alloc::string::String,
1224    /// Move options
1225    #[prost(bool, tag = "3")]
1226    pub replace_destination: bool,
1227}
1228/// Moves given tables
1229#[derive(serde::Serialize, serde::Deserialize)]
1230#[derive(Clone, PartialEq, ::prost::Message)]
1231pub struct RenameTablesRequest {
1232    #[prost(message, optional, tag = "1")]
1233    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
1234    /// Session identifier
1235    #[prost(string, tag = "2")]
1236    pub session_id: ::prost::alloc::string::String,
1237    /// Source and destination paths inside RenameTableItem describe rename actions
1238    #[prost(message, repeated, tag = "3")]
1239    pub tables: ::prost::alloc::vec::Vec<RenameTableItem>,
1240}
1241#[derive(serde::Serialize, serde::Deserialize)]
1242#[derive(Clone, PartialEq, ::prost::Message)]
1243pub struct RenameTablesResponse {
1244    #[prost(message, optional, tag = "1")]
1245    pub operation: ::core::option::Option<super::operations::Operation>,
1246}
1247/// Describe table with given path
1248#[derive(serde::Serialize, serde::Deserialize)]
1249#[derive(Clone, PartialEq, ::prost::Message)]
1250pub struct DescribeTableRequest {
1251    /// Session identifier
1252    #[prost(string, tag = "1")]
1253    pub session_id: ::prost::alloc::string::String,
1254    /// Full path
1255    #[prost(string, tag = "2")]
1256    pub path: ::prost::alloc::string::String,
1257    #[prost(message, optional, tag = "4")]
1258    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
1259    /// Includes shard key distribution info
1260    #[prost(bool, tag = "5")]
1261    pub include_shard_key_bounds: bool,
1262    /// Includes table statistics
1263    #[prost(bool, tag = "6")]
1264    pub include_table_stats: bool,
1265    /// Includes partition statistics (required include_table_statistics)
1266    #[prost(bool, tag = "7")]
1267    pub include_partition_stats: bool,
1268}
1269#[derive(serde::Serialize, serde::Deserialize)]
1270#[derive(Clone, PartialEq, ::prost::Message)]
1271pub struct DescribeTableResponse {
1272    /// Holds DescribeTableResult in case of successful call
1273    #[prost(message, optional, tag = "1")]
1274    pub operation: ::core::option::Option<super::operations::Operation>,
1275}
1276#[derive(serde::Serialize, serde::Deserialize)]
1277#[derive(Clone, PartialEq, ::prost::Message)]
1278pub struct DescribeTableResult {
1279    /// Description of scheme object
1280    #[prost(message, optional, tag = "1")]
1281    pub self_: ::core::option::Option<super::scheme::Entry>,
1282    /// List of columns
1283    #[prost(message, repeated, tag = "2")]
1284    pub columns: ::prost::alloc::vec::Vec<ColumnMeta>,
1285    /// List of primary key columns
1286    #[prost(string, repeated, tag = "3")]
1287    pub primary_key: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1288    /// List of key ranges for shard
1289    #[prost(message, repeated, tag = "4")]
1290    pub shard_key_bounds: ::prost::alloc::vec::Vec<super::TypedValue>,
1291    /// List of indexes
1292    #[prost(message, repeated, tag = "5")]
1293    pub indexes: ::prost::alloc::vec::Vec<TableIndexDescription>,
1294    /// Statistics of table
1295    #[prost(message, optional, tag = "6")]
1296    pub table_stats: ::core::option::Option<TableStats>,
1297    /// TTL params
1298    #[prost(message, optional, tag = "7")]
1299    pub ttl_settings: ::core::option::Option<TtlSettings>,
1300    /// Storage settings for table
1301    #[prost(message, optional, tag = "8")]
1302    pub storage_settings: ::core::option::Option<StorageSettings>,
1303    /// Column families
1304    #[prost(message, repeated, tag = "9")]
1305    pub column_families: ::prost::alloc::vec::Vec<ColumnFamily>,
1306    /// Attributes
1307    #[prost(map = "string, string", tag = "10")]
1308    pub attributes: ::std::collections::HashMap<
1309        ::prost::alloc::string::String,
1310        ::prost::alloc::string::String,
1311    >,
1312    /// Partitioning settings for table
1313    #[prost(message, optional, tag = "12")]
1314    pub partitioning_settings: ::core::option::Option<PartitioningSettings>,
1315    /// Bloom filter by key
1316    #[prost(enumeration = "super::feature_flag::Status", tag = "13")]
1317    pub key_bloom_filter: i32,
1318    /// Read replicas settings for table
1319    #[prost(message, optional, tag = "14")]
1320    pub read_replicas_settings: ::core::option::Option<ReadReplicasSettings>,
1321    /// List of changefeeds
1322    #[prost(message, repeated, tag = "15")]
1323    pub changefeeds: ::prost::alloc::vec::Vec<ChangefeedDescription>,
1324    /// Tiering rules name
1325    #[prost(string, tag = "16")]
1326    pub tiering: ::prost::alloc::string::String,
1327    /// Is temporary table
1328    #[prost(bool, tag = "17")]
1329    pub temporary: bool,
1330    /// Is table column or row oriented
1331    #[prost(enumeration = "StoreType", tag = "18")]
1332    pub store_type: i32,
1333}
1334#[derive(serde::Serialize, serde::Deserialize)]
1335#[derive(Clone, PartialEq, ::prost::Message)]
1336pub struct Query {
1337    /// Text of query or id prepared query
1338    #[prost(oneof = "query::Query", tags = "1, 2")]
1339    pub query: ::core::option::Option<query::Query>,
1340}
1341/// Nested message and enum types in `Query`.
1342pub mod query {
1343    /// Text of query or id prepared query
1344    #[derive(serde::Serialize, serde::Deserialize)]
1345    #[derive(Clone, PartialEq, ::prost::Oneof)]
1346    pub enum Query {
1347        /// SQL program
1348        #[prost(string, tag = "1")]
1349        YqlText(::prost::alloc::string::String),
1350        /// Prepared query id
1351        #[prost(string, tag = "2")]
1352        Id(::prost::alloc::string::String),
1353    }
1354}
1355#[derive(serde::Serialize, serde::Deserialize)]
1356#[derive(Clone, PartialEq, ::prost::Message)]
1357pub struct SerializableModeSettings {}
1358#[derive(serde::Serialize, serde::Deserialize)]
1359#[derive(Clone, PartialEq, ::prost::Message)]
1360pub struct OnlineModeSettings {
1361    #[prost(bool, tag = "1")]
1362    pub allow_inconsistent_reads: bool,
1363}
1364#[derive(serde::Serialize, serde::Deserialize)]
1365#[derive(Clone, PartialEq, ::prost::Message)]
1366pub struct StaleModeSettings {}
1367#[derive(serde::Serialize, serde::Deserialize)]
1368#[derive(Clone, PartialEq, ::prost::Message)]
1369pub struct SnapshotModeSettings {}
1370#[derive(serde::Serialize, serde::Deserialize)]
1371#[derive(Clone, PartialEq, ::prost::Message)]
1372pub struct TransactionSettings {
1373    #[prost(oneof = "transaction_settings::TxMode", tags = "1, 2, 3, 4")]
1374    pub tx_mode: ::core::option::Option<transaction_settings::TxMode>,
1375}
1376/// Nested message and enum types in `TransactionSettings`.
1377pub mod transaction_settings {
1378    #[derive(serde::Serialize, serde::Deserialize)]
1379    #[derive(Clone, PartialEq, ::prost::Oneof)]
1380    pub enum TxMode {
1381        #[prost(message, tag = "1")]
1382        SerializableReadWrite(super::SerializableModeSettings),
1383        #[prost(message, tag = "2")]
1384        OnlineReadOnly(super::OnlineModeSettings),
1385        #[prost(message, tag = "3")]
1386        StaleReadOnly(super::StaleModeSettings),
1387        #[prost(message, tag = "4")]
1388        SnapshotReadOnly(super::SnapshotModeSettings),
1389    }
1390}
1391#[derive(serde::Serialize, serde::Deserialize)]
1392#[derive(Clone, PartialEq, ::prost::Message)]
1393pub struct TransactionControl {
1394    #[prost(bool, tag = "10")]
1395    pub commit_tx: bool,
1396    #[prost(oneof = "transaction_control::TxSelector", tags = "1, 2")]
1397    pub tx_selector: ::core::option::Option<transaction_control::TxSelector>,
1398}
1399/// Nested message and enum types in `TransactionControl`.
1400pub mod transaction_control {
1401    #[derive(serde::Serialize, serde::Deserialize)]
1402    #[derive(Clone, PartialEq, ::prost::Oneof)]
1403    pub enum TxSelector {
1404        #[prost(string, tag = "1")]
1405        TxId(::prost::alloc::string::String),
1406        #[prost(message, tag = "2")]
1407        BeginTx(super::TransactionSettings),
1408    }
1409}
1410#[derive(serde::Serialize, serde::Deserialize)]
1411#[derive(Clone, PartialEq, ::prost::Message)]
1412pub struct QueryCachePolicy {
1413    #[prost(bool, tag = "1")]
1414    pub keep_in_cache: bool,
1415}
1416/// Collect and return query execution stats
1417#[derive(serde::Serialize, serde::Deserialize)]
1418#[derive(Clone, PartialEq, ::prost::Message)]
1419pub struct QueryStatsCollection {}
1420/// Nested message and enum types in `QueryStatsCollection`.
1421pub mod query_stats_collection {
1422    #[derive(serde::Serialize, serde::Deserialize)]
1423    #[derive(
1424        Clone,
1425        Copy,
1426        Debug,
1427        PartialEq,
1428        Eq,
1429        Hash,
1430        PartialOrd,
1431        Ord,
1432        ::prost::Enumeration
1433    )]
1434    #[repr(i32)]
1435    pub enum Mode {
1436        StatsCollectionUnspecified = 0,
1437        /// Stats collection is disabled
1438        StatsCollectionNone = 1,
1439        /// Aggregated stats of reads, updates and deletes per table
1440        StatsCollectionBasic = 2,
1441        /// Add execution stats and plan on top of STATS_COLLECTION_BASIC
1442        StatsCollectionFull = 3,
1443        /// Detailed execution stats including stats for individual tasks and channels
1444        StatsCollectionProfile = 4,
1445    }
1446    impl Mode {
1447        /// String value of the enum field names used in the ProtoBuf definition.
1448        /// The values are not transformed in any way and thus are considered stable
1449        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1450        pub fn as_str_name(&self) -> &'static str {
1451            match self {
1452                Mode::StatsCollectionUnspecified => "STATS_COLLECTION_UNSPECIFIED",
1453                Mode::StatsCollectionNone => "STATS_COLLECTION_NONE",
1454                Mode::StatsCollectionBasic => "STATS_COLLECTION_BASIC",
1455                Mode::StatsCollectionFull => "STATS_COLLECTION_FULL",
1456                Mode::StatsCollectionProfile => "STATS_COLLECTION_PROFILE",
1457            }
1458        }
1459    }
1460}
1461#[derive(serde::Serialize, serde::Deserialize)]
1462#[derive(Clone, PartialEq, ::prost::Message)]
1463pub struct ExecuteDataQueryRequest {
1464    /// Session identifier
1465    #[prost(string, tag = "1")]
1466    pub session_id: ::prost::alloc::string::String,
1467    #[prost(message, optional, tag = "2")]
1468    pub tx_control: ::core::option::Option<TransactionControl>,
1469    #[prost(message, optional, tag = "3")]
1470    pub query: ::core::option::Option<Query>,
1471    /// Map of query parameters (optional)
1472    #[prost(map = "string, message", tag = "4")]
1473    pub parameters: ::std::collections::HashMap<
1474        ::prost::alloc::string::String,
1475        super::TypedValue,
1476    >,
1477    #[prost(message, optional, tag = "5")]
1478    pub query_cache_policy: ::core::option::Option<QueryCachePolicy>,
1479    #[prost(message, optional, tag = "6")]
1480    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
1481    #[prost(enumeration = "query_stats_collection::Mode", tag = "7")]
1482    pub collect_stats: i32,
1483}
1484#[derive(serde::Serialize, serde::Deserialize)]
1485#[derive(Clone, PartialEq, ::prost::Message)]
1486pub struct ExecuteDataQueryResponse {
1487    #[prost(message, optional, tag = "1")]
1488    pub operation: ::core::option::Option<super::operations::Operation>,
1489}
1490#[derive(serde::Serialize, serde::Deserialize)]
1491#[derive(Clone, PartialEq, ::prost::Message)]
1492pub struct ExecuteSchemeQueryRequest {
1493    /// Session identifier
1494    #[prost(string, tag = "1")]
1495    pub session_id: ::prost::alloc::string::String,
1496    /// SQL text
1497    #[prost(string, tag = "2")]
1498    pub yql_text: ::prost::alloc::string::String,
1499    #[prost(message, optional, tag = "3")]
1500    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
1501}
1502#[derive(serde::Serialize, serde::Deserialize)]
1503#[derive(Clone, PartialEq, ::prost::Message)]
1504pub struct ExecuteSchemeQueryResponse {
1505    #[prost(message, optional, tag = "1")]
1506    pub operation: ::core::option::Option<super::operations::Operation>,
1507}
1508/// Holds transaction id
1509#[derive(serde::Serialize, serde::Deserialize)]
1510#[derive(Clone, PartialEq, ::prost::Message)]
1511pub struct TransactionMeta {
1512    /// Transaction identifier
1513    #[prost(string, tag = "1")]
1514    pub id: ::prost::alloc::string::String,
1515}
1516/// Holds query id and type of parameters
1517#[derive(serde::Serialize, serde::Deserialize)]
1518#[derive(Clone, PartialEq, ::prost::Message)]
1519pub struct QueryMeta {
1520    /// Query identifier
1521    #[prost(string, tag = "1")]
1522    pub id: ::prost::alloc::string::String,
1523    /// Type of parameters
1524    #[prost(map = "string, message", tag = "2")]
1525    pub parameters_types: ::std::collections::HashMap<
1526        ::prost::alloc::string::String,
1527        super::Type,
1528    >,
1529}
1530/// One QueryResult can contain multiple tables
1531#[derive(serde::Serialize, serde::Deserialize)]
1532#[derive(Clone, PartialEq, ::prost::Message)]
1533pub struct ExecuteQueryResult {
1534    /// Result rets (for each table)
1535    #[prost(message, repeated, tag = "1")]
1536    pub result_sets: ::prost::alloc::vec::Vec<super::ResultSet>,
1537    /// Transaction metadata
1538    #[prost(message, optional, tag = "2")]
1539    pub tx_meta: ::core::option::Option<TransactionMeta>,
1540    /// Query metadata
1541    #[prost(message, optional, tag = "3")]
1542    pub query_meta: ::core::option::Option<QueryMeta>,
1543    /// Query execution statistics
1544    #[prost(message, optional, tag = "4")]
1545    pub query_stats: ::core::option::Option<super::table_stats::QueryStats>,
1546}
1547/// Explain data query
1548#[derive(serde::Serialize, serde::Deserialize)]
1549#[derive(Clone, PartialEq, ::prost::Message)]
1550pub struct ExplainDataQueryRequest {
1551    /// Session identifier
1552    #[prost(string, tag = "1")]
1553    pub session_id: ::prost::alloc::string::String,
1554    /// SQL text to explain
1555    #[prost(string, tag = "2")]
1556    pub yql_text: ::prost::alloc::string::String,
1557    #[prost(message, optional, tag = "3")]
1558    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
1559    #[prost(bool, tag = "4")]
1560    pub collect_full_diagnostics: bool,
1561}
1562#[derive(serde::Serialize, serde::Deserialize)]
1563#[derive(Clone, PartialEq, ::prost::Message)]
1564pub struct ExplainDataQueryResponse {
1565    /// Holds ExplainQueryResult in case of successful call
1566    #[prost(message, optional, tag = "1")]
1567    pub operation: ::core::option::Option<super::operations::Operation>,
1568}
1569#[derive(serde::Serialize, serde::Deserialize)]
1570#[derive(Clone, PartialEq, ::prost::Message)]
1571pub struct ExplainQueryResult {
1572    #[prost(string, tag = "1")]
1573    pub query_ast: ::prost::alloc::string::String,
1574    #[prost(string, tag = "2")]
1575    pub query_plan: ::prost::alloc::string::String,
1576    #[prost(string, tag = "3")]
1577    pub query_full_diagnostics: ::prost::alloc::string::String,
1578}
1579/// Prepare given program to execute
1580#[derive(serde::Serialize, serde::Deserialize)]
1581#[derive(Clone, PartialEq, ::prost::Message)]
1582pub struct PrepareDataQueryRequest {
1583    /// Session identifier
1584    #[prost(string, tag = "1")]
1585    pub session_id: ::prost::alloc::string::String,
1586    /// SQL text
1587    #[prost(string, tag = "2")]
1588    pub yql_text: ::prost::alloc::string::String,
1589    #[prost(message, optional, tag = "3")]
1590    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
1591}
1592#[derive(serde::Serialize, serde::Deserialize)]
1593#[derive(Clone, PartialEq, ::prost::Message)]
1594pub struct PrepareDataQueryResponse {
1595    /// Holds PrepareQueryResult in case of successful call
1596    #[prost(message, optional, tag = "1")]
1597    pub operation: ::core::option::Option<super::operations::Operation>,
1598}
1599#[derive(serde::Serialize, serde::Deserialize)]
1600#[derive(Clone, PartialEq, ::prost::Message)]
1601pub struct PrepareQueryResult {
1602    /// Query id, used to perform ExecuteDataQuery
1603    #[prost(string, tag = "1")]
1604    pub query_id: ::prost::alloc::string::String,
1605    /// Parameters type, used to fill in parameter values
1606    #[prost(map = "string, message", tag = "2")]
1607    pub parameters_types: ::std::collections::HashMap<
1608        ::prost::alloc::string::String,
1609        super::Type,
1610    >,
1611}
1612/// Keep session alive
1613#[derive(serde::Serialize, serde::Deserialize)]
1614#[derive(Clone, PartialEq, ::prost::Message)]
1615pub struct KeepAliveRequest {
1616    /// Session identifier
1617    #[prost(string, tag = "1")]
1618    pub session_id: ::prost::alloc::string::String,
1619    #[prost(message, optional, tag = "2")]
1620    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
1621}
1622#[derive(serde::Serialize, serde::Deserialize)]
1623#[derive(Clone, PartialEq, ::prost::Message)]
1624pub struct KeepAliveResponse {
1625    #[prost(message, optional, tag = "1")]
1626    pub operation: ::core::option::Option<super::operations::Operation>,
1627}
1628#[derive(serde::Serialize, serde::Deserialize)]
1629#[derive(Clone, PartialEq, ::prost::Message)]
1630pub struct KeepAliveResult {
1631    #[prost(enumeration = "keep_alive_result::SessionStatus", tag = "1")]
1632    pub session_status: i32,
1633}
1634/// Nested message and enum types in `KeepAliveResult`.
1635pub mod keep_alive_result {
1636    #[derive(serde::Serialize, serde::Deserialize)]
1637    #[derive(
1638        Clone,
1639        Copy,
1640        Debug,
1641        PartialEq,
1642        Eq,
1643        Hash,
1644        PartialOrd,
1645        Ord,
1646        ::prost::Enumeration
1647    )]
1648    #[repr(i32)]
1649    pub enum SessionStatus {
1650        Unspecified = 0,
1651        Ready = 1,
1652        Busy = 2,
1653    }
1654    impl SessionStatus {
1655        /// String value of the enum field names used in the ProtoBuf definition.
1656        /// The values are not transformed in any way and thus are considered stable
1657        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1658        pub fn as_str_name(&self) -> &'static str {
1659            match self {
1660                SessionStatus::Unspecified => "SESSION_STATUS_UNSPECIFIED",
1661                SessionStatus::Ready => "SESSION_STATUS_READY",
1662                SessionStatus::Busy => "SESSION_STATUS_BUSY",
1663            }
1664        }
1665    }
1666}
1667/// Begin transaction on given session with given settings
1668#[derive(serde::Serialize, serde::Deserialize)]
1669#[derive(Clone, PartialEq, ::prost::Message)]
1670pub struct BeginTransactionRequest {
1671    /// Session identifier
1672    #[prost(string, tag = "1")]
1673    pub session_id: ::prost::alloc::string::String,
1674    #[prost(message, optional, tag = "2")]
1675    pub tx_settings: ::core::option::Option<TransactionSettings>,
1676    #[prost(message, optional, tag = "3")]
1677    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
1678}
1679#[derive(serde::Serialize, serde::Deserialize)]
1680#[derive(Clone, PartialEq, ::prost::Message)]
1681pub struct BeginTransactionResponse {
1682    /// Holds BeginTransactionResult in case of successful call
1683    #[prost(message, optional, tag = "1")]
1684    pub operation: ::core::option::Option<super::operations::Operation>,
1685}
1686#[derive(serde::Serialize, serde::Deserialize)]
1687#[derive(Clone, PartialEq, ::prost::Message)]
1688pub struct BeginTransactionResult {
1689    #[prost(message, optional, tag = "1")]
1690    pub tx_meta: ::core::option::Option<TransactionMeta>,
1691}
1692/// Commit transaction with given session and tx id
1693#[derive(serde::Serialize, serde::Deserialize)]
1694#[derive(Clone, PartialEq, ::prost::Message)]
1695pub struct CommitTransactionRequest {
1696    /// Session identifier
1697    #[prost(string, tag = "1")]
1698    pub session_id: ::prost::alloc::string::String,
1699    /// Transaction identifier
1700    #[prost(string, tag = "2")]
1701    pub tx_id: ::prost::alloc::string::String,
1702    #[prost(message, optional, tag = "3")]
1703    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
1704    #[prost(enumeration = "query_stats_collection::Mode", tag = "4")]
1705    pub collect_stats: i32,
1706}
1707#[derive(serde::Serialize, serde::Deserialize)]
1708#[derive(Clone, PartialEq, ::prost::Message)]
1709pub struct CommitTransactionResponse {
1710    #[prost(message, optional, tag = "1")]
1711    pub operation: ::core::option::Option<super::operations::Operation>,
1712}
1713#[derive(serde::Serialize, serde::Deserialize)]
1714#[derive(Clone, PartialEq, ::prost::Message)]
1715pub struct CommitTransactionResult {
1716    #[prost(message, optional, tag = "1")]
1717    pub query_stats: ::core::option::Option<super::table_stats::QueryStats>,
1718}
1719/// Rollback transaction with given session and tx id
1720#[derive(serde::Serialize, serde::Deserialize)]
1721#[derive(Clone, PartialEq, ::prost::Message)]
1722pub struct RollbackTransactionRequest {
1723    /// Session identifier
1724    #[prost(string, tag = "1")]
1725    pub session_id: ::prost::alloc::string::String,
1726    /// Transaction identifier
1727    #[prost(string, tag = "2")]
1728    pub tx_id: ::prost::alloc::string::String,
1729    #[prost(message, optional, tag = "3")]
1730    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
1731}
1732#[derive(serde::Serialize, serde::Deserialize)]
1733#[derive(Clone, PartialEq, ::prost::Message)]
1734pub struct RollbackTransactionResponse {
1735    #[prost(message, optional, tag = "1")]
1736    pub operation: ::core::option::Option<super::operations::Operation>,
1737}
1738#[derive(serde::Serialize, serde::Deserialize)]
1739#[derive(Clone, PartialEq, ::prost::Message)]
1740pub struct StoragePolicyDescription {
1741    #[prost(string, tag = "1")]
1742    pub name: ::prost::alloc::string::String,
1743    #[prost(map = "string, string", tag = "2")]
1744    pub labels: ::std::collections::HashMap<
1745        ::prost::alloc::string::String,
1746        ::prost::alloc::string::String,
1747    >,
1748}
1749#[derive(serde::Serialize, serde::Deserialize)]
1750#[derive(Clone, PartialEq, ::prost::Message)]
1751pub struct CompactionPolicyDescription {
1752    #[prost(string, tag = "1")]
1753    pub name: ::prost::alloc::string::String,
1754    #[prost(map = "string, string", tag = "2")]
1755    pub labels: ::std::collections::HashMap<
1756        ::prost::alloc::string::String,
1757        ::prost::alloc::string::String,
1758    >,
1759}
1760#[derive(serde::Serialize, serde::Deserialize)]
1761#[derive(Clone, PartialEq, ::prost::Message)]
1762pub struct PartitioningPolicyDescription {
1763    #[prost(string, tag = "1")]
1764    pub name: ::prost::alloc::string::String,
1765    #[prost(map = "string, string", tag = "2")]
1766    pub labels: ::std::collections::HashMap<
1767        ::prost::alloc::string::String,
1768        ::prost::alloc::string::String,
1769    >,
1770}
1771#[derive(serde::Serialize, serde::Deserialize)]
1772#[derive(Clone, PartialEq, ::prost::Message)]
1773pub struct ExecutionPolicyDescription {
1774    #[prost(string, tag = "1")]
1775    pub name: ::prost::alloc::string::String,
1776    #[prost(map = "string, string", tag = "2")]
1777    pub labels: ::std::collections::HashMap<
1778        ::prost::alloc::string::String,
1779        ::prost::alloc::string::String,
1780    >,
1781}
1782#[derive(serde::Serialize, serde::Deserialize)]
1783#[derive(Clone, PartialEq, ::prost::Message)]
1784pub struct ReplicationPolicyDescription {
1785    #[prost(string, tag = "1")]
1786    pub name: ::prost::alloc::string::String,
1787    #[prost(map = "string, string", tag = "2")]
1788    pub labels: ::std::collections::HashMap<
1789        ::prost::alloc::string::String,
1790        ::prost::alloc::string::String,
1791    >,
1792}
1793#[derive(serde::Serialize, serde::Deserialize)]
1794#[derive(Clone, PartialEq, ::prost::Message)]
1795pub struct CachingPolicyDescription {
1796    #[prost(string, tag = "1")]
1797    pub name: ::prost::alloc::string::String,
1798    #[prost(map = "string, string", tag = "2")]
1799    pub labels: ::std::collections::HashMap<
1800        ::prost::alloc::string::String,
1801        ::prost::alloc::string::String,
1802    >,
1803}
1804#[derive(serde::Serialize, serde::Deserialize)]
1805#[derive(Clone, PartialEq, ::prost::Message)]
1806pub struct TableProfileDescription {
1807    #[prost(string, tag = "1")]
1808    pub name: ::prost::alloc::string::String,
1809    #[prost(map = "string, string", tag = "2")]
1810    pub labels: ::std::collections::HashMap<
1811        ::prost::alloc::string::String,
1812        ::prost::alloc::string::String,
1813    >,
1814    #[prost(string, tag = "3")]
1815    pub default_storage_policy: ::prost::alloc::string::String,
1816    #[prost(string, repeated, tag = "4")]
1817    pub allowed_storage_policies: ::prost::alloc::vec::Vec<
1818        ::prost::alloc::string::String,
1819    >,
1820    #[prost(string, tag = "5")]
1821    pub default_compaction_policy: ::prost::alloc::string::String,
1822    #[prost(string, repeated, tag = "6")]
1823    pub allowed_compaction_policies: ::prost::alloc::vec::Vec<
1824        ::prost::alloc::string::String,
1825    >,
1826    #[prost(string, tag = "7")]
1827    pub default_partitioning_policy: ::prost::alloc::string::String,
1828    #[prost(string, repeated, tag = "8")]
1829    pub allowed_partitioning_policies: ::prost::alloc::vec::Vec<
1830        ::prost::alloc::string::String,
1831    >,
1832    #[prost(string, tag = "9")]
1833    pub default_execution_policy: ::prost::alloc::string::String,
1834    #[prost(string, repeated, tag = "10")]
1835    pub allowed_execution_policies: ::prost::alloc::vec::Vec<
1836        ::prost::alloc::string::String,
1837    >,
1838    #[prost(string, tag = "11")]
1839    pub default_replication_policy: ::prost::alloc::string::String,
1840    #[prost(string, repeated, tag = "12")]
1841    pub allowed_replication_policies: ::prost::alloc::vec::Vec<
1842        ::prost::alloc::string::String,
1843    >,
1844    #[prost(string, tag = "13")]
1845    pub default_caching_policy: ::prost::alloc::string::String,
1846    #[prost(string, repeated, tag = "14")]
1847    pub allowed_caching_policies: ::prost::alloc::vec::Vec<
1848        ::prost::alloc::string::String,
1849    >,
1850}
1851#[derive(serde::Serialize, serde::Deserialize)]
1852#[derive(Clone, PartialEq, ::prost::Message)]
1853pub struct DescribeTableOptionsRequest {
1854    #[prost(message, optional, tag = "1")]
1855    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
1856}
1857#[derive(serde::Serialize, serde::Deserialize)]
1858#[derive(Clone, PartialEq, ::prost::Message)]
1859pub struct DescribeTableOptionsResponse {
1860    /// operation.result holds ListTableParametersResult
1861    #[prost(message, optional, tag = "1")]
1862    pub operation: ::core::option::Option<super::operations::Operation>,
1863}
1864#[derive(serde::Serialize, serde::Deserialize)]
1865#[derive(Clone, PartialEq, ::prost::Message)]
1866pub struct DescribeTableOptionsResult {
1867    #[prost(message, repeated, tag = "1")]
1868    pub table_profile_presets: ::prost::alloc::vec::Vec<TableProfileDescription>,
1869    #[prost(message, repeated, tag = "2")]
1870    pub storage_policy_presets: ::prost::alloc::vec::Vec<StoragePolicyDescription>,
1871    #[prost(message, repeated, tag = "3")]
1872    pub compaction_policy_presets: ::prost::alloc::vec::Vec<CompactionPolicyDescription>,
1873    #[prost(message, repeated, tag = "4")]
1874    pub partitioning_policy_presets: ::prost::alloc::vec::Vec<
1875        PartitioningPolicyDescription,
1876    >,
1877    #[prost(message, repeated, tag = "5")]
1878    pub execution_policy_presets: ::prost::alloc::vec::Vec<ExecutionPolicyDescription>,
1879    #[prost(message, repeated, tag = "6")]
1880    pub replication_policy_presets: ::prost::alloc::vec::Vec<
1881        ReplicationPolicyDescription,
1882    >,
1883    #[prost(message, repeated, tag = "7")]
1884    pub caching_policy_presets: ::prost::alloc::vec::Vec<CachingPolicyDescription>,
1885}
1886#[derive(serde::Serialize, serde::Deserialize)]
1887#[derive(Clone, PartialEq, ::prost::Message)]
1888pub struct KeyRange {
1889    /// Left border
1890    #[prost(oneof = "key_range::FromBound", tags = "1, 2")]
1891    pub from_bound: ::core::option::Option<key_range::FromBound>,
1892    /// Right border
1893    #[prost(oneof = "key_range::ToBound", tags = "3, 4")]
1894    pub to_bound: ::core::option::Option<key_range::ToBound>,
1895}
1896/// Nested message and enum types in `KeyRange`.
1897pub mod key_range {
1898    /// Left border
1899    #[derive(serde::Serialize, serde::Deserialize)]
1900    #[derive(Clone, PartialEq, ::prost::Oneof)]
1901    pub enum FromBound {
1902        /// Specify if we don't want to include given key
1903        #[prost(message, tag = "1")]
1904        Greater(super::super::TypedValue),
1905        /// Specify if we want to include given key
1906        #[prost(message, tag = "2")]
1907        GreaterOrEqual(super::super::TypedValue),
1908    }
1909    /// Right border
1910    #[derive(serde::Serialize, serde::Deserialize)]
1911    #[derive(Clone, PartialEq, ::prost::Oneof)]
1912    pub enum ToBound {
1913        /// Specify if we don't want to include given key
1914        #[prost(message, tag = "3")]
1915        Less(super::super::TypedValue),
1916        /// Specify if we want to include given key
1917        #[prost(message, tag = "4")]
1918        LessOrEqual(super::super::TypedValue),
1919    }
1920}
1921/// Request to read table (without SQL)
1922#[derive(serde::Serialize, serde::Deserialize)]
1923#[derive(Clone, PartialEq, ::prost::Message)]
1924pub struct ReadTableRequest {
1925    /// Session identifier
1926    #[prost(string, tag = "1")]
1927    pub session_id: ::prost::alloc::string::String,
1928    /// Path to table to read
1929    #[prost(string, tag = "2")]
1930    pub path: ::prost::alloc::string::String,
1931    /// Primary key range to read
1932    #[prost(message, optional, tag = "3")]
1933    pub key_range: ::core::option::Option<KeyRange>,
1934    /// Output columns
1935    #[prost(string, repeated, tag = "4")]
1936    pub columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1937    /// Require ordered reading
1938    #[prost(bool, tag = "5")]
1939    pub ordered: bool,
1940    /// Limits row count to read
1941    #[prost(uint64, tag = "6")]
1942    pub row_limit: u64,
1943    /// Use a server-side snapshot
1944    #[prost(enumeration = "super::feature_flag::Status", tag = "7")]
1945    pub use_snapshot: i32,
1946    /// Server-side best-effort policy. Can be used as a hint to limit the size
1947    /// of batches sent from a server. If both are specified, the server chooses
1948    /// the smaller one. The limits are not strict, so batch size can be slightly
1949    /// greater than any of the limits
1950    #[prost(uint64, tag = "8")]
1951    pub batch_limit_bytes: u64,
1952    #[prost(uint64, tag = "9")]
1953    pub batch_limit_rows: u64,
1954    #[prost(enumeration = "super::feature_flag::Status", tag = "10")]
1955    pub return_not_null_data_as_optional: i32,
1956}
1957/// ReadTable doesn't use Operation, returns result directly
1958#[derive(serde::Serialize, serde::Deserialize)]
1959#[derive(Clone, PartialEq, ::prost::Message)]
1960pub struct ReadTableResponse {
1961    /// Status of request (same as other statuses)
1962    #[prost(enumeration = "super::status_ids::StatusCode", tag = "1")]
1963    pub status: i32,
1964    /// Issues
1965    #[prost(message, repeated, tag = "2")]
1966    pub issues: ::prost::alloc::vec::Vec<super::issue::IssueMessage>,
1967    /// Optional snapshot that corresponds to the returned data
1968    #[prost(message, optional, tag = "4")]
1969    pub snapshot: ::core::option::Option<super::VirtualTimestamp>,
1970    /// Read table result
1971    #[prost(message, optional, tag = "3")]
1972    pub result: ::core::option::Option<ReadTableResult>,
1973}
1974/// Result of read table request
1975#[derive(serde::Serialize, serde::Deserialize)]
1976#[derive(Clone, PartialEq, ::prost::Message)]
1977pub struct ReadTableResult {
1978    /// Result set (same as result of sql request)
1979    #[prost(message, optional, tag = "1")]
1980    pub result_set: ::core::option::Option<super::ResultSet>,
1981}
1982#[derive(serde::Serialize, serde::Deserialize)]
1983#[derive(Clone, PartialEq, ::prost::Message)]
1984pub struct ReadRowsRequest {
1985    /// Session identifier
1986    #[prost(string, tag = "1")]
1987    pub session_id: ::prost::alloc::string::String,
1988    /// Path to table to read
1989    #[prost(string, tag = "2")]
1990    pub path: ::prost::alloc::string::String,
1991    /// Keys to read. Must be a list of structs where each stuct is a key
1992    /// for one requested row and should contain all key columns
1993    #[prost(message, optional, tag = "3")]
1994    pub keys: ::core::option::Option<super::TypedValue>,
1995    /// Output columns. If empty all columns will be requested
1996    #[prost(string, repeated, tag = "4")]
1997    pub columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1998}
1999#[derive(serde::Serialize, serde::Deserialize)]
2000#[derive(Clone, PartialEq, ::prost::Message)]
2001pub struct ReadRowsResponse {
2002    /// Status of request (same as other statuses)
2003    #[prost(enumeration = "super::status_ids::StatusCode", tag = "1")]
2004    pub status: i32,
2005    /// Issues
2006    #[prost(message, repeated, tag = "2")]
2007    pub issues: ::prost::alloc::vec::Vec<super::issue::IssueMessage>,
2008    /// Result set (same as result of sql request)
2009    #[prost(message, optional, tag = "3")]
2010    pub result_set: ::core::option::Option<super::ResultSet>,
2011}
2012#[derive(serde::Serialize, serde::Deserialize)]
2013#[derive(Clone, PartialEq, ::prost::Message)]
2014pub struct BulkUpsertRequest {
2015    #[prost(string, tag = "1")]
2016    pub table: ::prost::alloc::string::String,
2017    /// "rows" parameter must be a list of structs where each stuct represents one row.
2018    /// It must contain all key columns but not necessarily all non-key columns.
2019    /// Similar to UPSERT statement only values of specified columns will be updated.
2020    #[prost(message, optional, tag = "2")]
2021    pub rows: ::core::option::Option<super::TypedValue>,
2022    #[prost(message, optional, tag = "3")]
2023    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
2024    /// It's last in the definition to help with sidecar patterns
2025    #[prost(bytes = "vec", tag = "1000")]
2026    pub data: ::prost::alloc::vec::Vec<u8>,
2027    /// You may set data_format + data instead of rows to insert data in serialized formats.
2028    #[prost(oneof = "bulk_upsert_request::DataFormat", tags = "7, 8")]
2029    pub data_format: ::core::option::Option<bulk_upsert_request::DataFormat>,
2030}
2031/// Nested message and enum types in `BulkUpsertRequest`.
2032pub mod bulk_upsert_request {
2033    /// You may set data_format + data instead of rows to insert data in serialized formats.
2034    #[derive(serde::Serialize, serde::Deserialize)]
2035    #[derive(Clone, PartialEq, ::prost::Oneof)]
2036    pub enum DataFormat {
2037        #[prost(message, tag = "7")]
2038        ArrowBatchSettings(super::super::formats::ArrowBatchSettings),
2039        #[prost(message, tag = "8")]
2040        CsvSettings(super::super::formats::CsvSettings),
2041    }
2042}
2043#[derive(serde::Serialize, serde::Deserialize)]
2044#[derive(Clone, PartialEq, ::prost::Message)]
2045pub struct BulkUpsertResponse {
2046    #[prost(message, optional, tag = "1")]
2047    pub operation: ::core::option::Option<super::operations::Operation>,
2048}
2049#[derive(serde::Serialize, serde::Deserialize)]
2050#[derive(Clone, PartialEq, ::prost::Message)]
2051pub struct BulkUpsertResult {}
2052#[derive(serde::Serialize, serde::Deserialize)]
2053#[derive(Clone, PartialEq, ::prost::Message)]
2054pub struct ExecuteScanQueryRequest {
2055    #[prost(message, optional, tag = "3")]
2056    pub query: ::core::option::Option<Query>,
2057    #[prost(map = "string, message", tag = "4")]
2058    pub parameters: ::std::collections::HashMap<
2059        ::prost::alloc::string::String,
2060        super::TypedValue,
2061    >,
2062    #[prost(enumeration = "execute_scan_query_request::Mode", tag = "6")]
2063    pub mode: i32,
2064    #[prost(enumeration = "query_stats_collection::Mode", tag = "8")]
2065    pub collect_stats: i32,
2066    /// works only in mode: MODE_EXPLAIN,
2067    /// collects additional diagnostics about query compilation, including query plan and scheme
2068    #[prost(bool, tag = "9")]
2069    pub collect_full_diagnostics: bool,
2070}
2071/// Nested message and enum types in `ExecuteScanQueryRequest`.
2072pub mod execute_scan_query_request {
2073    #[derive(serde::Serialize, serde::Deserialize)]
2074    #[derive(
2075        Clone,
2076        Copy,
2077        Debug,
2078        PartialEq,
2079        Eq,
2080        Hash,
2081        PartialOrd,
2082        Ord,
2083        ::prost::Enumeration
2084    )]
2085    #[repr(i32)]
2086    pub enum Mode {
2087        Unspecified = 0,
2088        Explain = 1,
2089        /// MODE_PREPARE = 2;
2090        Exec = 3,
2091    }
2092    impl Mode {
2093        /// String value of the enum field names used in the ProtoBuf definition.
2094        /// The values are not transformed in any way and thus are considered stable
2095        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2096        pub fn as_str_name(&self) -> &'static str {
2097            match self {
2098                Mode::Unspecified => "MODE_UNSPECIFIED",
2099                Mode::Explain => "MODE_EXPLAIN",
2100                Mode::Exec => "MODE_EXEC",
2101            }
2102        }
2103    }
2104}
2105#[derive(serde::Serialize, serde::Deserialize)]
2106#[derive(Clone, PartialEq, ::prost::Message)]
2107pub struct ExecuteScanQueryPartialResponse {
2108    #[prost(enumeration = "super::status_ids::StatusCode", tag = "1")]
2109    pub status: i32,
2110    #[prost(message, repeated, tag = "2")]
2111    pub issues: ::prost::alloc::vec::Vec<super::issue::IssueMessage>,
2112    #[prost(message, optional, tag = "3")]
2113    pub result: ::core::option::Option<ExecuteScanQueryPartialResult>,
2114}
2115#[derive(serde::Serialize, serde::Deserialize)]
2116#[derive(Clone, PartialEq, ::prost::Message)]
2117pub struct ExecuteScanQueryPartialResult {
2118    #[prost(message, optional, tag = "1")]
2119    pub result_set: ::core::option::Option<super::ResultSet>,
2120    #[prost(message, optional, tag = "6")]
2121    pub query_stats: ::core::option::Option<super::table_stats::QueryStats>,
2122    /// works only in mode: MODE_EXPLAIN,
2123    /// collects additional diagnostics about query compilation, including query plan and scheme
2124    #[prost(string, tag = "7")]
2125    pub query_full_diagnostics: ::prost::alloc::string::String,
2126}
2127#[derive(serde::Serialize, serde::Deserialize)]
2128#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2129#[repr(i32)]
2130pub enum StoreType {
2131    Unspecified = 0,
2132    Row = 1,
2133    Column = 2,
2134}
2135impl StoreType {
2136    /// String value of the enum field names used in the ProtoBuf definition.
2137    /// The values are not transformed in any way and thus are considered stable
2138    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2139    pub fn as_str_name(&self) -> &'static str {
2140        match self {
2141            StoreType::Unspecified => "STORE_TYPE_UNSPECIFIED",
2142            StoreType::Row => "STORE_TYPE_ROW",
2143            StoreType::Column => "STORE_TYPE_COLUMN",
2144        }
2145    }
2146}