ydb-grpc 0.2.2

Crate contains generated low-level grpc code from YDB API protobuf, used as base for ydb crate
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
// This file is @generated by prost-build.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateSessionRequest {}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSessionResponse {
    #[prost(enumeration = "super::status_ids::StatusCode", tag = "1")]
    pub status: i32,
    #[prost(message, repeated, tag = "2")]
    pub issues: ::prost::alloc::vec::Vec<super::issue::IssueMessage>,
    /// Identifier of created session
    #[prost(string, tag = "3")]
    pub session_id: ::prost::alloc::string::String,
    /// Identifier node where session was created
    #[prost(int64, tag = "4")]
    pub node_id: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteSessionRequest {
    /// Identifier of session to delete (required)
    #[prost(string, tag = "1")]
    pub session_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteSessionResponse {
    #[prost(enumeration = "super::status_ids::StatusCode", tag = "1")]
    pub status: i32,
    #[prost(message, repeated, tag = "2")]
    pub issues: ::prost::alloc::vec::Vec<super::issue::IssueMessage>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AttachSessionRequest {
    /// Identifier of session to attach (required)
    #[prost(string, tag = "1")]
    pub session_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SessionShutdownHint {}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NodeShutdownHint {}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionState {
    #[prost(enumeration = "super::status_ids::StatusCode", tag = "1")]
    pub status: i32,
    #[prost(message, repeated, tag = "2")]
    pub issues: ::prost::alloc::vec::Vec<super::issue::IssueMessage>,
    /// The reason the session is ending, for SDK-side handling
    #[prost(oneof = "session_state::SessionHint", tags = "3, 4")]
    pub session_hint: ::core::option::Option<session_state::SessionHint>,
}
/// Nested message and enum types in `SessionState`.
pub mod session_state {
    /// The reason the session is ending, for SDK-side handling
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum SessionHint {
        #[prost(message, tag = "3")]
        SessionShutdown(super::SessionShutdownHint),
        #[prost(message, tag = "4")]
        NodeShutdown(super::NodeShutdownHint),
    }
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SerializableModeSettings {}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OnlineModeSettings {
    #[prost(bool, tag = "1")]
    pub allow_inconsistent_reads: bool,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StaleModeSettings {}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SnapshotModeSettings {}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SnapshotRwModeSettings {}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TransactionSettings {
    #[prost(oneof = "transaction_settings::TxMode", tags = "1, 2, 3, 4, 5")]
    pub tx_mode: ::core::option::Option<transaction_settings::TxMode>,
}
/// Nested message and enum types in `TransactionSettings`.
pub mod transaction_settings {
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum TxMode {
        #[prost(message, tag = "1")]
        SerializableReadWrite(super::SerializableModeSettings),
        #[prost(message, tag = "2")]
        OnlineReadOnly(super::OnlineModeSettings),
        #[prost(message, tag = "3")]
        StaleReadOnly(super::StaleModeSettings),
        #[prost(message, tag = "4")]
        SnapshotReadOnly(super::SnapshotModeSettings),
        #[prost(message, tag = "5")]
        SnapshotReadWrite(super::SnapshotRwModeSettings),
    }
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TransactionControl {
    #[prost(bool, tag = "10")]
    pub commit_tx: bool,
    #[prost(oneof = "transaction_control::TxSelector", tags = "1, 2")]
    pub tx_selector: ::core::option::Option<transaction_control::TxSelector>,
}
/// Nested message and enum types in `TransactionControl`.
pub mod transaction_control {
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum TxSelector {
        #[prost(string, tag = "1")]
        TxId(::prost::alloc::string::String),
        #[prost(message, tag = "2")]
        BeginTx(super::TransactionSettings),
    }
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BeginTransactionRequest {
    /// Session identifier (required)
    #[prost(string, tag = "1")]
    pub session_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub tx_settings: ::core::option::Option<TransactionSettings>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TransactionMeta {
    /// Transaction identifier
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BeginTransactionResponse {
    #[prost(enumeration = "super::status_ids::StatusCode", tag = "1")]
    pub status: i32,
    #[prost(message, repeated, tag = "2")]
    pub issues: ::prost::alloc::vec::Vec<super::issue::IssueMessage>,
    #[prost(message, optional, tag = "3")]
    pub tx_meta: ::core::option::Option<TransactionMeta>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CommitTransactionRequest {
    /// Session identifier (required)
    #[prost(string, tag = "1")]
    pub session_id: ::prost::alloc::string::String,
    /// Transaction identifier (required)
    #[prost(string, tag = "2")]
    pub tx_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommitTransactionResponse {
    #[prost(enumeration = "super::status_ids::StatusCode", tag = "1")]
    pub status: i32,
    #[prost(message, repeated, tag = "2")]
    pub issues: ::prost::alloc::vec::Vec<super::issue::IssueMessage>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RollbackTransactionRequest {
    /// Session identifier (required)
    #[prost(string, tag = "1")]
    pub session_id: ::prost::alloc::string::String,
    /// Transaction identifier (required)
    #[prost(string, tag = "2")]
    pub tx_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RollbackTransactionResponse {
    #[prost(enumeration = "super::status_ids::StatusCode", tag = "1")]
    pub status: i32,
    #[prost(message, repeated, tag = "2")]
    pub issues: ::prost::alloc::vec::Vec<super::issue::IssueMessage>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryContent {
    #[prost(enumeration = "Syntax", tag = "1")]
    pub syntax: i32,
    #[prost(string, tag = "2")]
    pub text: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteQueryRequest {
    /// Session identifier (required)
    #[prost(string, tag = "1")]
    pub session_id: ::prost::alloc::string::String,
    #[prost(enumeration = "ExecMode", tag = "2")]
    pub exec_mode: i32,
    #[prost(message, optional, tag = "3")]
    pub tx_control: ::core::option::Option<TransactionControl>,
    #[prost(map = "string, message", tag = "6")]
    pub parameters: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        super::TypedValue,
    >,
    #[prost(enumeration = "StatsMode", tag = "7")]
    pub stats_mode: i32,
    /// For queries with multiple result sets, some of them may be computed concurrently.
    /// If true, parts of different results sets may be interleaved in response stream.
    #[prost(bool, tag = "8")]
    pub concurrent_result_sets: bool,
    /// Allows to set size limitation (in bytes) for one result part
    #[prost(int64, tag = "9")]
    pub response_part_limit_bytes: i64,
    /// Workload manager pool id
    #[prost(string, tag = "10")]
    pub pool_id: ::prost::alloc::string::String,
    /// Time interval for sending periodical query statistics.
    /// When query statistics are enabled (stats_mode != STATS_MODE_NONE), by default statistics will be sent only once after query execution is finished.
    /// In case when stats_period_ms is specified and is non-zero, query statistics will be additionally sent every stats_period_ms milliseconds beginning from the start of query execution.
    #[prost(int64, tag = "11")]
    pub stats_period_ms: i64,
    /// Schema inclusion mode for the result sets.
    /// If is not specified, SchemaInclusionMode.SCHEMA_INCLUSION_MODE_ALWAYS is used.
    #[prost(enumeration = "SchemaInclusionMode", tag = "12")]
    pub schema_inclusion_mode: i32,
    /// Format of the result sets.
    /// If is not specified, Ydb.ResultSet.Format.FORMAT_VALUE is used.
    #[prost(enumeration = "super::result_set::Format", tag = "13")]
    pub result_set_format: i32,
    /// Format settings, only used for Ydb.ResultSet.Format.FORMAT_ARROW
    #[prost(message, optional, tag = "14")]
    pub arrow_format_settings: ::core::option::Option<
        super::formats::ArrowFormatSettings,
    >,
    #[prost(oneof = "execute_query_request::Query", tags = "4")]
    pub query: ::core::option::Option<execute_query_request::Query>,
}
/// Nested message and enum types in `ExecuteQueryRequest`.
pub mod execute_query_request {
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Query {
        #[prost(message, tag = "4")]
        QueryContent(super::QueryContent),
    }
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResultSetMeta {
    #[prost(message, repeated, tag = "1")]
    pub columns: ::prost::alloc::vec::Vec<super::Column>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteQueryResponsePart {
    #[prost(enumeration = "super::status_ids::StatusCode", tag = "1")]
    pub status: i32,
    #[prost(message, repeated, tag = "2")]
    pub issues: ::prost::alloc::vec::Vec<super::issue::IssueMessage>,
    /// Index of current result set
    #[prost(int64, tag = "3")]
    pub result_set_index: i64,
    /// Result set part
    #[prost(message, optional, tag = "4")]
    pub result_set: ::core::option::Option<super::ResultSet>,
    /// Execution statistics (last part only)
    #[prost(message, optional, tag = "5")]
    pub exec_stats: ::core::option::Option<super::table_stats::QueryStats>,
    #[prost(message, optional, tag = "6")]
    pub tx_meta: ::core::option::Option<TransactionMeta>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteScriptRequest {
    #[prost(message, optional, tag = "1")]
    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
    #[prost(enumeration = "ExecMode", tag = "2")]
    pub exec_mode: i32,
    #[prost(message, optional, tag = "3")]
    pub script_content: ::core::option::Option<QueryContent>,
    #[prost(map = "string, message", tag = "4")]
    pub parameters: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        super::TypedValue,
    >,
    #[prost(enumeration = "StatsMode", tag = "5")]
    pub stats_mode: i32,
    /// After script execution operation finishes, TTL will start counting.
    /// After this TTL the results will be removed from database.
    #[prost(message, optional, tag = "6")]
    pub results_ttl: ::core::option::Option<super::super::google::protobuf::Duration>,
    /// Workload manager pool id
    #[prost(string, tag = "7")]
    pub pool_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteScriptMetadata {
    #[prost(string, tag = "1")]
    pub execution_id: ::prost::alloc::string::String,
    #[prost(enumeration = "ExecStatus", tag = "2")]
    pub exec_status: i32,
    #[prost(message, optional, tag = "3")]
    pub script_content: ::core::option::Option<QueryContent>,
    #[prost(message, repeated, tag = "4")]
    pub result_sets_meta: ::prost::alloc::vec::Vec<ResultSetMeta>,
    #[prost(enumeration = "ExecMode", tag = "5")]
    pub exec_mode: i32,
    /// Execution statistics
    #[prost(message, optional, tag = "6")]
    pub exec_stats: ::core::option::Option<super::table_stats::QueryStats>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FetchScriptResultsRequest {
    #[prost(string, tag = "1")]
    pub operation_id: ::prost::alloc::string::String,
    #[prost(int64, tag = "2")]
    pub result_set_index: i64,
    #[prost(string, tag = "3")]
    pub fetch_token: ::prost::alloc::string::String,
    #[prost(int64, tag = "4")]
    pub rows_limit: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FetchScriptResultsResponse {
    #[prost(enumeration = "super::status_ids::StatusCode", tag = "1")]
    pub status: i32,
    #[prost(message, repeated, tag = "2")]
    pub issues: ::prost::alloc::vec::Vec<super::issue::IssueMessage>,
    #[prost(int64, tag = "3")]
    pub result_set_index: i64,
    #[prost(message, optional, tag = "4")]
    pub result_set: ::core::option::Option<super::ResultSet>,
    #[prost(string, tag = "5")]
    pub next_fetch_token: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Script {
    #[prost(message, optional, tag = "1")]
    pub script_content: ::core::option::Option<QueryContent>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Syntax {
    Unspecified = 0,
    /// YQL
    YqlV1 = 1,
    /// PostgresQL
    Pg = 2,
}
impl Syntax {
    /// String value of the enum field names used in the ProtoBuf definition.
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "SYNTAX_UNSPECIFIED",
            Self::YqlV1 => "SYNTAX_YQL_V1",
            Self::Pg => "SYNTAX_PG",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SYNTAX_UNSPECIFIED" => Some(Self::Unspecified),
            "SYNTAX_YQL_V1" => Some(Self::YqlV1),
            "SYNTAX_PG" => Some(Self::Pg),
            _ => None,
        }
    }
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ExecMode {
    Unspecified = 0,
    Parse = 10,
    Validate = 20,
    Explain = 30,
    Execute = 50,
}
impl ExecMode {
    /// String value of the enum field names used in the ProtoBuf definition.
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "EXEC_MODE_UNSPECIFIED",
            Self::Parse => "EXEC_MODE_PARSE",
            Self::Validate => "EXEC_MODE_VALIDATE",
            Self::Explain => "EXEC_MODE_EXPLAIN",
            Self::Execute => "EXEC_MODE_EXECUTE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "EXEC_MODE_UNSPECIFIED" => Some(Self::Unspecified),
            "EXEC_MODE_PARSE" => Some(Self::Parse),
            "EXEC_MODE_VALIDATE" => Some(Self::Validate),
            "EXEC_MODE_EXPLAIN" => Some(Self::Explain),
            "EXEC_MODE_EXECUTE" => Some(Self::Execute),
            _ => None,
        }
    }
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum StatsMode {
    Unspecified = 0,
    /// Stats collection is disabled
    None = 10,
    /// Aggregated stats of reads, updates and deletes per table
    Basic = 20,
    /// Add execution stats and plan on top of STATS_MODE_BASIC
    Full = 30,
    /// Detailed execution stats including stats for individual tasks and channels
    Profile = 40,
}
impl StatsMode {
    /// String value of the enum field names used in the ProtoBuf definition.
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "STATS_MODE_UNSPECIFIED",
            Self::None => "STATS_MODE_NONE",
            Self::Basic => "STATS_MODE_BASIC",
            Self::Full => "STATS_MODE_FULL",
            Self::Profile => "STATS_MODE_PROFILE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "STATS_MODE_UNSPECIFIED" => Some(Self::Unspecified),
            "STATS_MODE_NONE" => Some(Self::None),
            "STATS_MODE_BASIC" => Some(Self::Basic),
            "STATS_MODE_FULL" => Some(Self::Full),
            "STATS_MODE_PROFILE" => Some(Self::Profile),
            _ => None,
        }
    }
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SchemaInclusionMode {
    /// Unspecified mode, corresponds to SCHEMA_INCLUSION_MODE_ALWAYS.
    Unspecified = 0,
    /// Always include schema in every Ydb.ResultSet in the response stream.
    Always = 1,
    /// Include schema only in the first Ydb.ResultSet per result_set_index of the response stream.
    FirstOnly = 2,
}
impl SchemaInclusionMode {
    /// String value of the enum field names used in the ProtoBuf definition.
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "SCHEMA_INCLUSION_MODE_UNSPECIFIED",
            Self::Always => "SCHEMA_INCLUSION_MODE_ALWAYS",
            Self::FirstOnly => "SCHEMA_INCLUSION_MODE_FIRST_ONLY",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SCHEMA_INCLUSION_MODE_UNSPECIFIED" => Some(Self::Unspecified),
            "SCHEMA_INCLUSION_MODE_ALWAYS" => Some(Self::Always),
            "SCHEMA_INCLUSION_MODE_FIRST_ONLY" => Some(Self::FirstOnly),
            _ => None,
        }
    }
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ExecStatus {
    Unspecified = 0,
    Starting = 10,
    Aborted = 20,
    Cancelled = 30,
    Completed = 40,
    Failed = 50,
}
impl ExecStatus {
    /// String value of the enum field names used in the ProtoBuf definition.
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "EXEC_STATUS_UNSPECIFIED",
            Self::Starting => "EXEC_STATUS_STARTING",
            Self::Aborted => "EXEC_STATUS_ABORTED",
            Self::Cancelled => "EXEC_STATUS_CANCELLED",
            Self::Completed => "EXEC_STATUS_COMPLETED",
            Self::Failed => "EXEC_STATUS_FAILED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "EXEC_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "EXEC_STATUS_STARTING" => Some(Self::Starting),
            "EXEC_STATUS_ABORTED" => Some(Self::Aborted),
            "EXEC_STATUS_CANCELLED" => Some(Self::Cancelled),
            "EXEC_STATUS_COMPLETED" => Some(Self::Completed),
            "EXEC_STATUS_FAILED" => Some(Self::Failed),
            _ => None,
        }
    }
}