Skip to main content

ydb_grpc/generated/
ydb.query.rs

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