Skip to main content

yandex_cloud/
yandex.cloud.serverless.workflows.v1.rs

1#[allow(clippy::derive_partial_eq_without_eq)]
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct Execution {
4    /// ID of the Workflow execution. Generated at creation time.
5    #[prost(string, tag = "1")]
6    pub id: ::prost::alloc::string::String,
7    /// ID of the Workflow.
8    #[prost(string, tag = "2")]
9    pub workflow_id: ::prost::alloc::string::String,
10    /// Input data for the Workflow execution.
11    #[prost(message, optional, tag = "4")]
12    pub input: ::core::option::Option<ExecutionInput>,
13    /// Result of the Workflow execution.
14    #[prost(message, optional, tag = "5")]
15    pub result: ::core::option::Option<ExecutionResult>,
16    /// Error details, in case Workflow execution failed.
17    #[prost(message, optional, tag = "6")]
18    pub error: ::core::option::Option<ExecutionError>,
19    /// Status of the Workflow execution
20    #[prost(enumeration = "execution::Status", tag = "7")]
21    pub status: i32,
22    /// Start timestamp for the Workflow execution.
23    #[prost(message, optional, tag = "8")]
24    pub started_at: ::core::option::Option<::prost_types::Timestamp>,
25    /// Duration of the Workflow execution.
26    #[prost(message, optional, tag = "9")]
27    pub duration: ::core::option::Option<::prost_types::Duration>,
28}
29/// Nested message and enum types in `Execution`.
30pub mod execution {
31    #[derive(
32        Clone,
33        Copy,
34        Debug,
35        PartialEq,
36        Eq,
37        Hash,
38        PartialOrd,
39        Ord,
40        ::prost::Enumeration
41    )]
42    #[repr(i32)]
43    pub enum Status {
44        Unspecified = 0,
45        /// Workflow execution is being queued.
46        Queued = 1,
47        /// Workflow execution is running.
48        Running = 2,
49        /// Workflow execution is being paused.
50        Paused = 3,
51        /// Workflow execution is stopped.
52        Stopped = 4,
53        /// Workflow execution is failed.
54        Failed = 5,
55        /// Workflow execution is finished.
56        Finished = 6,
57    }
58    impl Status {
59        /// String value of the enum field names used in the ProtoBuf definition.
60        ///
61        /// The values are not transformed in any way and thus are considered stable
62        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
63        pub fn as_str_name(&self) -> &'static str {
64            match self {
65                Status::Unspecified => "STATUS_UNSPECIFIED",
66                Status::Queued => "QUEUED",
67                Status::Running => "RUNNING",
68                Status::Paused => "PAUSED",
69                Status::Stopped => "STOPPED",
70                Status::Failed => "FAILED",
71                Status::Finished => "FINISHED",
72            }
73        }
74        /// Creates an enum from field names used in the ProtoBuf definition.
75        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
76            match value {
77                "STATUS_UNSPECIFIED" => Some(Self::Unspecified),
78                "QUEUED" => Some(Self::Queued),
79                "RUNNING" => Some(Self::Running),
80                "PAUSED" => Some(Self::Paused),
81                "STOPPED" => Some(Self::Stopped),
82                "FAILED" => Some(Self::Failed),
83                "FINISHED" => Some(Self::Finished),
84                _ => None,
85            }
86        }
87    }
88}
89#[allow(clippy::derive_partial_eq_without_eq)]
90#[derive(Clone, PartialEq, ::prost::Message)]
91pub struct ExecutionPreview {
92    /// ID of the Workflow execution. Generated at creation time.
93    #[prost(string, tag = "1")]
94    pub id: ::prost::alloc::string::String,
95    /// ID of the Workflow.
96    #[prost(string, tag = "2")]
97    pub workflow_id: ::prost::alloc::string::String,
98    /// Status of the Workflow execution
99    #[prost(enumeration = "execution::Status", tag = "4")]
100    pub status: i32,
101    /// Start timestamp for the Workflow execution.
102    #[prost(message, optional, tag = "5")]
103    pub started_at: ::core::option::Option<::prost_types::Timestamp>,
104    /// Duration of the Workflow execution.
105    #[prost(message, optional, tag = "6")]
106    pub duration: ::core::option::Option<::prost_types::Duration>,
107}
108#[allow(clippy::derive_partial_eq_without_eq)]
109#[derive(Clone, PartialEq, ::prost::Message)]
110pub struct ExecutionInput {
111    #[prost(oneof = "execution_input::Input", tags = "1")]
112    pub input: ::core::option::Option<execution_input::Input>,
113}
114/// Nested message and enum types in `ExecutionInput`.
115pub mod execution_input {
116    #[allow(clippy::derive_partial_eq_without_eq)]
117    #[derive(Clone, PartialEq, ::prost::Oneof)]
118    pub enum Input {
119        /// JSON input data for the Workflow execution.
120        #[prost(string, tag = "1")]
121        InputJson(::prost::alloc::string::String),
122    }
123}
124#[allow(clippy::derive_partial_eq_without_eq)]
125#[derive(Clone, PartialEq, ::prost::Message)]
126pub struct ExecutionResult {
127    #[prost(oneof = "execution_result::Result", tags = "1")]
128    pub result: ::core::option::Option<execution_result::Result>,
129}
130/// Nested message and enum types in `ExecutionResult`.
131pub mod execution_result {
132    #[allow(clippy::derive_partial_eq_without_eq)]
133    #[derive(Clone, PartialEq, ::prost::Oneof)]
134    pub enum Result {
135        /// JSON result of the Workflow execution.
136        #[prost(string, tag = "1")]
137        ResultJson(::prost::alloc::string::String),
138    }
139}
140#[allow(clippy::derive_partial_eq_without_eq)]
141#[derive(Clone, PartialEq, ::prost::Message)]
142pub struct ExecutionError {
143    /// Error message of the Workflow execution.
144    #[prost(string, tag = "1")]
145    pub message: ::prost::alloc::string::String,
146    /// Error code of the Workflow execution.
147    #[prost(string, tag = "2")]
148    pub error_code: ::prost::alloc::string::String,
149}
150#[allow(clippy::derive_partial_eq_without_eq)]
151#[derive(Clone, PartialEq, ::prost::Message)]
152pub struct HistoryEntry {
153    /// ID of the Workflow step.
154    #[prost(string, tag = "1")]
155    pub id: ::prost::alloc::string::String,
156    /// Title of the Workflow step.
157    #[prost(string, tag = "2")]
158    pub title: ::prost::alloc::string::String,
159    /// Description of the Workflow step.
160    #[prost(string, tag = "3")]
161    pub description: ::prost::alloc::string::String,
162    /// Start timestamp for the Workflow step.
163    #[prost(message, optional, tag = "4")]
164    pub started_at: ::core::option::Option<::prost_types::Timestamp>,
165    /// Duration of the Workflow step.
166    #[prost(message, optional, tag = "5")]
167    pub duration: ::core::option::Option<::prost_types::Duration>,
168    /// Input data for the Workflow step.
169    #[prost(message, optional, tag = "6")]
170    pub input: ::core::option::Option<HistoryEntryInput>,
171    /// Result of the Workflow step.
172    #[prost(message, optional, tag = "7")]
173    pub output: ::core::option::Option<HistoryEntryOutput>,
174    /// Error details, in case Workflow step failed.
175    #[prost(message, optional, tag = "8")]
176    pub error: ::core::option::Option<HistoryEntryError>,
177    /// Status of the Workflow step.
178    #[prost(enumeration = "history_entry::Status", tag = "9")]
179    pub status: i32,
180    /// Type of the Workflow step (for example, FunctionCall or HttpCall).
181    #[prost(string, tag = "10")]
182    pub r#type: ::prost::alloc::string::String,
183    /// Number of attempts (including all retries of unsuccessful attempts). Value "1" means there were no retries.
184    #[prost(int64, tag = "12")]
185    pub attempts: i64,
186    /// Last received error details in case of retries.
187    #[prost(message, optional, tag = "13")]
188    pub last_error: ::core::option::Option<HistoryEntryError>,
189}
190/// Nested message and enum types in `HistoryEntry`.
191pub mod history_entry {
192    #[allow(clippy::derive_partial_eq_without_eq)]
193    #[derive(Clone, PartialEq, ::prost::Message)]
194    pub struct FailedAttempt {
195        /// Start timestamp for the attempt.
196        #[prost(message, optional, tag = "1")]
197        pub started_at: ::core::option::Option<::prost_types::Timestamp>,
198        /// Duration of the attempt.
199        #[prost(message, optional, tag = "2")]
200        pub duration: ::core::option::Option<::prost_types::Duration>,
201        /// Error details.
202        #[prost(message, optional, tag = "3")]
203        pub error: ::core::option::Option<super::HistoryEntryError>,
204    }
205    #[derive(
206        Clone,
207        Copy,
208        Debug,
209        PartialEq,
210        Eq,
211        Hash,
212        PartialOrd,
213        Ord,
214        ::prost::Enumeration
215    )]
216    #[repr(i32)]
217    pub enum Status {
218        Unspecified = 0,
219        /// Step execution is being scheduled.
220        Scheduled = 1,
221        /// Step execution is started.
222        Started = 2,
223        /// Step execution is completed.
224        Completed = 3,
225        /// Step execution is failed.
226        Failed = 4,
227        /// Step execution is requested to be cancelled.
228        CancelRequested = 5,
229        /// Step execution is canceled.
230        Cancelled = 6,
231    }
232    impl Status {
233        /// String value of the enum field names used in the ProtoBuf definition.
234        ///
235        /// The values are not transformed in any way and thus are considered stable
236        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
237        pub fn as_str_name(&self) -> &'static str {
238            match self {
239                Status::Unspecified => "STATUS_UNSPECIFIED",
240                Status::Scheduled => "SCHEDULED",
241                Status::Started => "STARTED",
242                Status::Completed => "COMPLETED",
243                Status::Failed => "FAILED",
244                Status::CancelRequested => "CANCEL_REQUESTED",
245                Status::Cancelled => "CANCELLED",
246            }
247        }
248        /// Creates an enum from field names used in the ProtoBuf definition.
249        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
250            match value {
251                "STATUS_UNSPECIFIED" => Some(Self::Unspecified),
252                "SCHEDULED" => Some(Self::Scheduled),
253                "STARTED" => Some(Self::Started),
254                "COMPLETED" => Some(Self::Completed),
255                "FAILED" => Some(Self::Failed),
256                "CANCEL_REQUESTED" => Some(Self::CancelRequested),
257                "CANCELLED" => Some(Self::Cancelled),
258                _ => None,
259            }
260        }
261    }
262}
263#[allow(clippy::derive_partial_eq_without_eq)]
264#[derive(Clone, PartialEq, ::prost::Message)]
265pub struct HistoryEntryInput {
266    #[prost(oneof = "history_entry_input::Input", tags = "1")]
267    pub input: ::core::option::Option<history_entry_input::Input>,
268}
269/// Nested message and enum types in `HistoryEntryInput`.
270pub mod history_entry_input {
271    #[allow(clippy::derive_partial_eq_without_eq)]
272    #[derive(Clone, PartialEq, ::prost::Oneof)]
273    pub enum Input {
274        /// JSON input data for the Workflow step.
275        #[prost(string, tag = "1")]
276        InputJson(::prost::alloc::string::String),
277    }
278}
279#[allow(clippy::derive_partial_eq_without_eq)]
280#[derive(Clone, PartialEq, ::prost::Message)]
281pub struct HistoryEntryOutput {
282    #[prost(oneof = "history_entry_output::Output", tags = "1")]
283    pub output: ::core::option::Option<history_entry_output::Output>,
284}
285/// Nested message and enum types in `HistoryEntryOutput`.
286pub mod history_entry_output {
287    #[allow(clippy::derive_partial_eq_without_eq)]
288    #[derive(Clone, PartialEq, ::prost::Oneof)]
289    pub enum Output {
290        /// JSON result for the Workflow step.
291        #[prost(string, tag = "1")]
292        OutputJson(::prost::alloc::string::String),
293    }
294}
295#[allow(clippy::derive_partial_eq_without_eq)]
296#[derive(Clone, PartialEq, ::prost::Message)]
297pub struct HistoryEntryError {
298    /// Error message of the Workflow step.
299    #[prost(string, tag = "1")]
300    pub message: ::prost::alloc::string::String,
301    /// Error code of the Workflow step.
302    #[prost(string, tag = "2")]
303    pub error_code: ::prost::alloc::string::String,
304}
305#[allow(clippy::derive_partial_eq_without_eq)]
306#[derive(Clone, PartialEq, ::prost::Message)]
307pub struct StartExecutionRequest {
308    /// ID of the Workflow.
309    #[prost(string, tag = "1")]
310    pub workflow_id: ::prost::alloc::string::String,
311    /// Input for the Workflow execution
312    #[prost(message, optional, tag = "3")]
313    pub input: ::core::option::Option<ExecutionInput>,
314}
315#[allow(clippy::derive_partial_eq_without_eq)]
316#[derive(Clone, PartialEq, ::prost::Message)]
317pub struct StartExecutionResponse {
318    /// ID of the Workflow execution.
319    #[prost(string, tag = "1")]
320    pub execution_id: ::prost::alloc::string::String,
321}
322#[allow(clippy::derive_partial_eq_without_eq)]
323#[derive(Clone, PartialEq, ::prost::Message)]
324pub struct StopExecutionRequest {
325    /// ID of the Workflow execution.
326    #[prost(string, tag = "1")]
327    pub execution_id: ::prost::alloc::string::String,
328}
329#[allow(clippy::derive_partial_eq_without_eq)]
330#[derive(Clone, PartialEq, ::prost::Message)]
331pub struct StopExecutionResponse {
332    /// ID of the Workflow execution.
333    #[prost(string, tag = "1")]
334    pub execution_id: ::prost::alloc::string::String,
335}
336#[allow(clippy::derive_partial_eq_without_eq)]
337#[derive(Clone, PartialEq, ::prost::Message)]
338pub struct TerminateExecutionRequest {
339    /// ID of the Workflow execution.
340    #[prost(string, tag = "1")]
341    pub execution_id: ::prost::alloc::string::String,
342}
343#[allow(clippy::derive_partial_eq_without_eq)]
344#[derive(Clone, PartialEq, ::prost::Message)]
345pub struct TerminateExecutionResponse {
346    /// ID of the Workflow execution.
347    #[prost(string, tag = "1")]
348    pub execution_id: ::prost::alloc::string::String,
349}
350#[allow(clippy::derive_partial_eq_without_eq)]
351#[derive(Clone, PartialEq, ::prost::Message)]
352pub struct GetExecutionRequest {
353    /// ID of the Workflow execution.
354    #[prost(string, tag = "1")]
355    pub execution_id: ::prost::alloc::string::String,
356}
357#[allow(clippy::derive_partial_eq_without_eq)]
358#[derive(Clone, PartialEq, ::prost::Message)]
359pub struct GetExecutionResponse {
360    /// Workflow execution details.
361    #[prost(message, optional, tag = "1")]
362    pub execution: ::core::option::Option<Execution>,
363}
364#[allow(clippy::derive_partial_eq_without_eq)]
365#[derive(Clone, PartialEq, ::prost::Message)]
366pub struct GetExecutionHistoryRequest {
367    /// ID of the Workflow execution.
368    #[prost(string, tag = "1")]
369    pub execution_id: ::prost::alloc::string::String,
370}
371#[allow(clippy::derive_partial_eq_without_eq)]
372#[derive(Clone, PartialEq, ::prost::Message)]
373pub struct GetExecutionHistoryResponse {
374    /// Workflow execution details.
375    #[prost(message, optional, tag = "1")]
376    pub execution: ::core::option::Option<ExecutionPreview>,
377    /// Workflow execution detailed history items.
378    #[prost(message, repeated, tag = "2")]
379    pub entries: ::prost::alloc::vec::Vec<HistoryEntry>,
380}
381#[allow(clippy::derive_partial_eq_without_eq)]
382#[derive(Clone, PartialEq, ::prost::Message)]
383pub struct ListExecutionsRequest {
384    /// ID of the Workflow.
385    #[prost(string, tag = "1")]
386    pub workflow_id: ::prost::alloc::string::String,
387    /// The maximum number of results per page that should be returned. If the number of available
388    /// results is larger than `pageSize`, the service returns a \[ListExecutionsResponse.next_page_token\]
389    /// that can be used to get the next page of results in subsequent list requests.
390    ///
391    /// Default value: 100.
392    #[prost(int64, tag = "2")]
393    pub page_size: i64,
394    /// Page token. To get the next page of results, set `pageToken` to the
395    /// \[ListExecutionsResponse.next_page_token\] returned by a previous list request.
396    #[prost(string, tag = "3")]
397    pub page_token: ::prost::alloc::string::String,
398    /// A filter expression that filters resources listed in the response.
399    ///
400    /// The expression must specify:
401    /// 1. The field name. Currently filtering can be applied to the following fields: status, started_at, finished_at.
402    /// 2. Operator: `=`, `<` or `>`.
403    /// 3. The value. Must be sting and match the regular expression `\[+:\.-a-z0-9\]`.
404    /// Examples of a filter: `status=ERROR`, `created_by=John.Doe`.
405    #[prost(string, tag = "4")]
406    pub filter: ::prost::alloc::string::String,
407}
408#[allow(clippy::derive_partial_eq_without_eq)]
409#[derive(Clone, PartialEq, ::prost::Message)]
410pub struct ListExecutionsResponse {
411    /// List of Workflow executions.
412    #[prost(message, repeated, tag = "1")]
413    pub executions: ::prost::alloc::vec::Vec<ExecutionPreview>,
414    /// Token for getting the next page of the list. If the number of results is greater than
415    /// the specified \[ListExecutionsRequest.page_size\], use `next_page_token` as the value
416    /// for the \[ListExecutionsRequest.page_token\] parameter in the next list request.
417    ///
418    /// Each subsequent page will have its own `next_page_token` to continue paging through the results.
419    #[prost(string, tag = "2")]
420    pub next_page_token: ::prost::alloc::string::String,
421}
422/// Generated client implementations.
423pub mod execution_service_client {
424    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
425    use tonic::codegen::*;
426    use tonic::codegen::http::Uri;
427    /// Set of methods for managing Workflows Executions.
428    #[derive(Debug, Clone)]
429    pub struct ExecutionServiceClient<T> {
430        inner: tonic::client::Grpc<T>,
431    }
432    impl ExecutionServiceClient<tonic::transport::Channel> {
433        /// Attempt to create a new client by connecting to a given endpoint.
434        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
435        where
436            D: TryInto<tonic::transport::Endpoint>,
437            D::Error: Into<StdError>,
438        {
439            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
440            Ok(Self::new(conn))
441        }
442    }
443    impl<T> ExecutionServiceClient<T>
444    where
445        T: tonic::client::GrpcService<tonic::body::BoxBody>,
446        T::Error: Into<StdError>,
447        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
448        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
449    {
450        pub fn new(inner: T) -> Self {
451            let inner = tonic::client::Grpc::new(inner);
452            Self { inner }
453        }
454        pub fn with_origin(inner: T, origin: Uri) -> Self {
455            let inner = tonic::client::Grpc::with_origin(inner, origin);
456            Self { inner }
457        }
458        pub fn with_interceptor<F>(
459            inner: T,
460            interceptor: F,
461        ) -> ExecutionServiceClient<InterceptedService<T, F>>
462        where
463            F: tonic::service::Interceptor,
464            T::ResponseBody: Default,
465            T: tonic::codegen::Service<
466                http::Request<tonic::body::BoxBody>,
467                Response = http::Response<
468                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
469                >,
470            >,
471            <T as tonic::codegen::Service<
472                http::Request<tonic::body::BoxBody>,
473            >>::Error: Into<StdError> + Send + Sync,
474        {
475            ExecutionServiceClient::new(InterceptedService::new(inner, interceptor))
476        }
477        /// Compress requests with the given encoding.
478        ///
479        /// This requires the server to support it otherwise it might respond with an
480        /// error.
481        #[must_use]
482        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
483            self.inner = self.inner.send_compressed(encoding);
484            self
485        }
486        /// Enable decompressing responses.
487        #[must_use]
488        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
489            self.inner = self.inner.accept_compressed(encoding);
490            self
491        }
492        /// Limits the maximum size of a decoded message.
493        ///
494        /// Default: `4MB`
495        #[must_use]
496        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
497            self.inner = self.inner.max_decoding_message_size(limit);
498            self
499        }
500        /// Limits the maximum size of an encoded message.
501        ///
502        /// Default: `usize::MAX`
503        #[must_use]
504        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
505            self.inner = self.inner.max_encoding_message_size(limit);
506            self
507        }
508        /// Starts new Workflow execution.
509        pub async fn start(
510            &mut self,
511            request: impl tonic::IntoRequest<super::StartExecutionRequest>,
512        ) -> std::result::Result<
513            tonic::Response<super::StartExecutionResponse>,
514            tonic::Status,
515        > {
516            self.inner
517                .ready()
518                .await
519                .map_err(|e| {
520                    tonic::Status::new(
521                        tonic::Code::Unknown,
522                        format!("Service was not ready: {}", e.into()),
523                    )
524                })?;
525            let codec = tonic::codec::ProstCodec::default();
526            let path = http::uri::PathAndQuery::from_static(
527                "/yandex.cloud.serverless.workflows.v1.ExecutionService/Start",
528            );
529            let mut req = request.into_request();
530            req.extensions_mut()
531                .insert(
532                    GrpcMethod::new(
533                        "yandex.cloud.serverless.workflows.v1.ExecutionService",
534                        "Start",
535                    ),
536                );
537            self.inner.unary(req, path, codec).await
538        }
539        /// Stops specified Workflow execution.
540        pub async fn stop(
541            &mut self,
542            request: impl tonic::IntoRequest<super::StopExecutionRequest>,
543        ) -> std::result::Result<
544            tonic::Response<super::StopExecutionResponse>,
545            tonic::Status,
546        > {
547            self.inner
548                .ready()
549                .await
550                .map_err(|e| {
551                    tonic::Status::new(
552                        tonic::Code::Unknown,
553                        format!("Service was not ready: {}", e.into()),
554                    )
555                })?;
556            let codec = tonic::codec::ProstCodec::default();
557            let path = http::uri::PathAndQuery::from_static(
558                "/yandex.cloud.serverless.workflows.v1.ExecutionService/Stop",
559            );
560            let mut req = request.into_request();
561            req.extensions_mut()
562                .insert(
563                    GrpcMethod::new(
564                        "yandex.cloud.serverless.workflows.v1.ExecutionService",
565                        "Stop",
566                    ),
567                );
568            self.inner.unary(req, path, codec).await
569        }
570        /// Terminates specified Workflow execution.
571        pub async fn terminate(
572            &mut self,
573            request: impl tonic::IntoRequest<super::TerminateExecutionRequest>,
574        ) -> std::result::Result<
575            tonic::Response<super::TerminateExecutionResponse>,
576            tonic::Status,
577        > {
578            self.inner
579                .ready()
580                .await
581                .map_err(|e| {
582                    tonic::Status::new(
583                        tonic::Code::Unknown,
584                        format!("Service was not ready: {}", e.into()),
585                    )
586                })?;
587            let codec = tonic::codec::ProstCodec::default();
588            let path = http::uri::PathAndQuery::from_static(
589                "/yandex.cloud.serverless.workflows.v1.ExecutionService/Terminate",
590            );
591            let mut req = request.into_request();
592            req.extensions_mut()
593                .insert(
594                    GrpcMethod::new(
595                        "yandex.cloud.serverless.workflows.v1.ExecutionService",
596                        "Terminate",
597                    ),
598                );
599            self.inner.unary(req, path, codec).await
600        }
601        /// Retrieves specified Workflow execution.
602        pub async fn get(
603            &mut self,
604            request: impl tonic::IntoRequest<super::GetExecutionRequest>,
605        ) -> std::result::Result<
606            tonic::Response<super::GetExecutionResponse>,
607            tonic::Status,
608        > {
609            self.inner
610                .ready()
611                .await
612                .map_err(|e| {
613                    tonic::Status::new(
614                        tonic::Code::Unknown,
615                        format!("Service was not ready: {}", e.into()),
616                    )
617                })?;
618            let codec = tonic::codec::ProstCodec::default();
619            let path = http::uri::PathAndQuery::from_static(
620                "/yandex.cloud.serverless.workflows.v1.ExecutionService/Get",
621            );
622            let mut req = request.into_request();
623            req.extensions_mut()
624                .insert(
625                    GrpcMethod::new(
626                        "yandex.cloud.serverless.workflows.v1.ExecutionService",
627                        "Get",
628                    ),
629                );
630            self.inner.unary(req, path, codec).await
631        }
632        /// Retrieves detailed history of specified Workflow execution.
633        pub async fn get_history(
634            &mut self,
635            request: impl tonic::IntoRequest<super::GetExecutionHistoryRequest>,
636        ) -> std::result::Result<
637            tonic::Response<super::GetExecutionHistoryResponse>,
638            tonic::Status,
639        > {
640            self.inner
641                .ready()
642                .await
643                .map_err(|e| {
644                    tonic::Status::new(
645                        tonic::Code::Unknown,
646                        format!("Service was not ready: {}", e.into()),
647                    )
648                })?;
649            let codec = tonic::codec::ProstCodec::default();
650            let path = http::uri::PathAndQuery::from_static(
651                "/yandex.cloud.serverless.workflows.v1.ExecutionService/GetHistory",
652            );
653            let mut req = request.into_request();
654            req.extensions_mut()
655                .insert(
656                    GrpcMethod::new(
657                        "yandex.cloud.serverless.workflows.v1.ExecutionService",
658                        "GetHistory",
659                    ),
660                );
661            self.inner.unary(req, path, codec).await
662        }
663        /// Retrieves list of Workflow executions.
664        pub async fn list(
665            &mut self,
666            request: impl tonic::IntoRequest<super::ListExecutionsRequest>,
667        ) -> std::result::Result<
668            tonic::Response<super::ListExecutionsResponse>,
669            tonic::Status,
670        > {
671            self.inner
672                .ready()
673                .await
674                .map_err(|e| {
675                    tonic::Status::new(
676                        tonic::Code::Unknown,
677                        format!("Service was not ready: {}", e.into()),
678                    )
679                })?;
680            let codec = tonic::codec::ProstCodec::default();
681            let path = http::uri::PathAndQuery::from_static(
682                "/yandex.cloud.serverless.workflows.v1.ExecutionService/List",
683            );
684            let mut req = request.into_request();
685            req.extensions_mut()
686                .insert(
687                    GrpcMethod::new(
688                        "yandex.cloud.serverless.workflows.v1.ExecutionService",
689                        "List",
690                    ),
691                );
692            self.inner.unary(req, path, codec).await
693        }
694    }
695}
696#[allow(clippy::derive_partial_eq_without_eq)]
697#[derive(Clone, PartialEq, ::prost::Message)]
698pub struct Workflow {
699    /// ID of the Workflow. Generated at creation time.
700    #[prost(string, tag = "1")]
701    pub id: ::prost::alloc::string::String,
702    /// ID of the folder that the Workflow belongs to.
703    #[prost(string, tag = "2")]
704    pub folder_id: ::prost::alloc::string::String,
705    /// Specification of the Workflow
706    #[prost(message, optional, tag = "3")]
707    pub specification: ::core::option::Option<WorkflowSpecification>,
708    /// Creation timestamp for the Workflow.
709    #[prost(message, optional, tag = "4")]
710    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
711    /// Name of the Workflow. The name is unique within the folder.
712    #[prost(string, tag = "5")]
713    pub name: ::prost::alloc::string::String,
714    /// Description of the Workflow.
715    #[prost(string, tag = "6")]
716    pub description: ::prost::alloc::string::String,
717    /// Workflow labels as `key:value` pairs.
718    #[prost(map = "string, string", tag = "7")]
719    pub labels: ::std::collections::HashMap<
720        ::prost::alloc::string::String,
721        ::prost::alloc::string::String,
722    >,
723    /// Status of the Workflow.
724    #[prost(enumeration = "workflow::Status", tag = "8")]
725    pub status: i32,
726    /// Options for logging from the Workflow.
727    #[prost(message, optional, tag = "9")]
728    pub log_options: ::core::option::Option<LogOptions>,
729    /// ID of the VPC network Workflow will be executed in, in order to access private resources.
730    #[prost(string, tag = "10")]
731    pub network_id: ::prost::alloc::string::String,
732    /// ID of the Service Account which will be used for resource access in Workflow execution.
733    #[prost(string, tag = "11")]
734    pub service_account_id: ::prost::alloc::string::String,
735}
736/// Nested message and enum types in `Workflow`.
737pub mod workflow {
738    #[derive(
739        Clone,
740        Copy,
741        Debug,
742        PartialEq,
743        Eq,
744        Hash,
745        PartialOrd,
746        Ord,
747        ::prost::Enumeration
748    )]
749    #[repr(i32)]
750    pub enum Status {
751        Unspecified = 0,
752        /// Workflow is being created.
753        Creating = 1,
754        /// Workflow is ready for use.
755        Active = 2,
756        /// Workflow is being updated.
757        Updating = 3,
758        /// Workflow is being deleted.
759        Deleting = 4,
760        /// Workflow failed. The only allowed action is delete.
761        Error = 5,
762    }
763    impl Status {
764        /// String value of the enum field names used in the ProtoBuf definition.
765        ///
766        /// The values are not transformed in any way and thus are considered stable
767        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
768        pub fn as_str_name(&self) -> &'static str {
769            match self {
770                Status::Unspecified => "STATUS_UNSPECIFIED",
771                Status::Creating => "CREATING",
772                Status::Active => "ACTIVE",
773                Status::Updating => "UPDATING",
774                Status::Deleting => "DELETING",
775                Status::Error => "ERROR",
776            }
777        }
778        /// Creates an enum from field names used in the ProtoBuf definition.
779        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
780            match value {
781                "STATUS_UNSPECIFIED" => Some(Self::Unspecified),
782                "CREATING" => Some(Self::Creating),
783                "ACTIVE" => Some(Self::Active),
784                "UPDATING" => Some(Self::Updating),
785                "DELETING" => Some(Self::Deleting),
786                "ERROR" => Some(Self::Error),
787                _ => None,
788            }
789        }
790    }
791}
792#[allow(clippy::derive_partial_eq_without_eq)]
793#[derive(Clone, PartialEq, ::prost::Message)]
794pub struct WorkflowPreview {
795    /// ID of the Workflow. Generated at creation time.
796    #[prost(string, tag = "1")]
797    pub id: ::prost::alloc::string::String,
798    /// ID of the folder that the Workflow belongs to.
799    #[prost(string, tag = "2")]
800    pub folder_id: ::prost::alloc::string::String,
801    /// Creation timestamp for the Workflow.
802    #[prost(message, optional, tag = "3")]
803    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
804    /// Name of the Workflow. The name is unique within the folder.
805    #[prost(string, tag = "4")]
806    pub name: ::prost::alloc::string::String,
807    /// Description of the Workflow.
808    #[prost(string, tag = "5")]
809    pub description: ::prost::alloc::string::String,
810    /// Workflow labels as `key:value` pairs.
811    #[prost(map = "string, string", tag = "6")]
812    pub labels: ::std::collections::HashMap<
813        ::prost::alloc::string::String,
814        ::prost::alloc::string::String,
815    >,
816    /// Status of the Workflow.
817    #[prost(enumeration = "workflow::Status", tag = "7")]
818    pub status: i32,
819    /// Options for logging from the Workflow.
820    #[prost(message, optional, tag = "8")]
821    pub log_options: ::core::option::Option<LogOptions>,
822    /// ID of the VPC network Workflow will be executed in, in order to access private resources.
823    #[prost(string, tag = "9")]
824    pub network_id: ::prost::alloc::string::String,
825    /// ID of the Service Account which will be used for resources access in Workflow execution.
826    #[prost(string, tag = "10")]
827    pub service_account_id: ::prost::alloc::string::String,
828}
829#[allow(clippy::derive_partial_eq_without_eq)]
830#[derive(Clone, PartialEq, ::prost::Message)]
831pub struct WorkflowSpecification {
832    #[prost(oneof = "workflow_specification::Spec", tags = "1")]
833    pub spec: ::core::option::Option<workflow_specification::Spec>,
834}
835/// Nested message and enum types in `WorkflowSpecification`.
836pub mod workflow_specification {
837    #[allow(clippy::derive_partial_eq_without_eq)]
838    #[derive(Clone, PartialEq, ::prost::Oneof)]
839    pub enum Spec {
840        /// Workflow specification in YAML format.
841        #[prost(string, tag = "1")]
842        SpecYaml(::prost::alloc::string::String),
843    }
844}
845#[allow(clippy::derive_partial_eq_without_eq)]
846#[derive(Clone, PartialEq, ::prost::Message)]
847pub struct LogOptions {
848    /// Is logging from Workflow disabled.
849    #[prost(bool, tag = "1")]
850    pub disabled: bool,
851    /// Minimum logs level.
852    ///
853    /// See \[LogLevel.Level\] for details.
854    #[prost(
855        enumeration = "super::super::super::logging::v1::log_level::Level",
856        tag = "4"
857    )]
858    pub min_level: i32,
859    #[prost(oneof = "log_options::Destination", tags = "2, 3")]
860    pub destination: ::core::option::Option<log_options::Destination>,
861}
862/// Nested message and enum types in `LogOptions`.
863pub mod log_options {
864    #[allow(clippy::derive_partial_eq_without_eq)]
865    #[derive(Clone, PartialEq, ::prost::Oneof)]
866    pub enum Destination {
867        /// ID of the logging group which should be used for Workflows logs.
868        #[prost(string, tag = "2")]
869        LogGroupId(::prost::alloc::string::String),
870        /// ID of the folder which default logging group should be used for Workflows.
871        #[prost(string, tag = "3")]
872        FolderId(::prost::alloc::string::String),
873    }
874}
875#[allow(clippy::derive_partial_eq_without_eq)]
876#[derive(Clone, PartialEq, ::prost::Message)]
877pub struct CreateWorkflowRequest {
878    /// ID of the folder to create Workflow in.
879    #[prost(string, tag = "1")]
880    pub folder_id: ::prost::alloc::string::String,
881    /// Name of Workflow.
882    /// The name must be unique within the folder.
883    #[prost(string, tag = "2")]
884    pub name: ::prost::alloc::string::String,
885    /// Description of Workflow.
886    #[prost(string, tag = "3")]
887    pub description: ::prost::alloc::string::String,
888    /// Workflow labels as `key:value` pairs.
889    #[prost(map = "string, string", tag = "4")]
890    pub labels: ::std::collections::HashMap<
891        ::prost::alloc::string::String,
892        ::prost::alloc::string::String,
893    >,
894    /// Specification of Workflow
895    #[prost(message, optional, tag = "5")]
896    pub specification: ::core::option::Option<WorkflowSpecification>,
897    /// Options for logging from Workflow.
898    #[prost(message, optional, tag = "6")]
899    pub log_options: ::core::option::Option<LogOptions>,
900    /// ID of the VPC network Workflow will be executed in, in order to access private resources.
901    #[prost(string, tag = "7")]
902    pub network_id: ::prost::alloc::string::String,
903    /// ID of the Service Account which will be used for resources access in Workflow execution.
904    #[prost(string, tag = "8")]
905    pub service_account_id: ::prost::alloc::string::String,
906}
907#[allow(clippy::derive_partial_eq_without_eq)]
908#[derive(Clone, PartialEq, ::prost::Message)]
909pub struct CreateWorkflowMetadata {
910    /// ID of the Workflow.
911    #[prost(string, tag = "1")]
912    pub workflow_id: ::prost::alloc::string::String,
913}
914#[allow(clippy::derive_partial_eq_without_eq)]
915#[derive(Clone, PartialEq, ::prost::Message)]
916pub struct UpdateWorkflowRequest {
917    /// ID of the Workflow.
918    #[prost(string, tag = "1")]
919    pub workflow_id: ::prost::alloc::string::String,
920    /// Name of the Workflow. The name is unique within the folder.
921    #[prost(string, tag = "2")]
922    pub name: ::prost::alloc::string::String,
923    /// Description of the Workflow.
924    #[prost(string, tag = "3")]
925    pub description: ::prost::alloc::string::String,
926    /// Workflow labels as `key:value` pairs.
927    #[prost(map = "string, string", tag = "4")]
928    pub labels: ::std::collections::HashMap<
929        ::prost::alloc::string::String,
930        ::prost::alloc::string::String,
931    >,
932    /// Specification of the Workflow.
933    #[prost(message, optional, tag = "5")]
934    pub specification: ::core::option::Option<WorkflowSpecification>,
935    /// Options for logging from the Workflow.
936    #[prost(message, optional, tag = "6")]
937    pub log_options: ::core::option::Option<LogOptions>,
938    /// ID of the VPC network Workflow will be executed in, in order to access private resources.
939    #[prost(string, tag = "7")]
940    pub network_id: ::prost::alloc::string::String,
941    /// ID of the Service Account which will be used for resources access in Workflow execution.
942    #[prost(string, tag = "8")]
943    pub service_account_id: ::prost::alloc::string::String,
944    /// Field mask that specifies which fields of the Workflow should be updated.
945    #[prost(message, optional, tag = "9")]
946    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
947}
948#[allow(clippy::derive_partial_eq_without_eq)]
949#[derive(Clone, PartialEq, ::prost::Message)]
950pub struct UpdateWorkflowMetadata {
951    /// ID of the Workflow.
952    #[prost(string, tag = "1")]
953    pub workflow_id: ::prost::alloc::string::String,
954}
955#[allow(clippy::derive_partial_eq_without_eq)]
956#[derive(Clone, PartialEq, ::prost::Message)]
957pub struct GetWorkflowRequest {
958    /// ID of the Workflow.
959    #[prost(string, tag = "1")]
960    pub workflow_id: ::prost::alloc::string::String,
961}
962#[allow(clippy::derive_partial_eq_without_eq)]
963#[derive(Clone, PartialEq, ::prost::Message)]
964pub struct GetWorkflowResponse {
965    /// Workflow properties.
966    #[prost(message, optional, tag = "1")]
967    pub workflow: ::core::option::Option<Workflow>,
968}
969#[allow(clippy::derive_partial_eq_without_eq)]
970#[derive(Clone, PartialEq, ::prost::Message)]
971pub struct DeleteWorkflowRequest {
972    /// ID of the Workflow.
973    #[prost(string, tag = "1")]
974    pub workflow_id: ::prost::alloc::string::String,
975}
976#[allow(clippy::derive_partial_eq_without_eq)]
977#[derive(Clone, PartialEq, ::prost::Message)]
978pub struct DeleteWorkflowMetadata {
979    /// ID of the Workflow.
980    #[prost(string, tag = "1")]
981    pub workflow_id: ::prost::alloc::string::String,
982}
983#[allow(clippy::derive_partial_eq_without_eq)]
984#[derive(Clone, PartialEq, ::prost::Message)]
985pub struct ListWorkflowsRequest {
986    /// ID of the folder to list Workflows in.
987    #[prost(string, tag = "1")]
988    pub folder_id: ::prost::alloc::string::String,
989    /// The maximum number of results per page to return. If the number of available
990    /// results is larger than `pageSize`, the service returns a \[ListWorkflowsResponse.next_page_token\]
991    /// that can be used to get the next page of results in subsequent list requests.
992    ///
993    /// Default value: 100.
994    #[prost(int64, tag = "2")]
995    pub page_size: i64,
996    /// Page token. To get the next page of results, set `pageToken` to the
997    /// \[ListWorkflowsResponse.next_page_token\] returned by a previous list request.
998    #[prost(string, tag = "3")]
999    pub page_token: ::prost::alloc::string::String,
1000    /// A filter expression that filters functions listed in the response.
1001    ///
1002    /// The expression must specify:
1003    /// 1. The field name. Currently filtering can only be applied to following fields: name, created_at.
1004    /// 2. An `=` operator.
1005    /// 3. The value in double quotes (`"`). Must be 3-63 characters long and match the regular expression `\[a-z]([-a-z0-9]{0,61}[a-z0-9\])?`.
1006    /// Example of a filter: `name=my-workflow`.
1007    #[prost(string, tag = "4")]
1008    pub filter: ::prost::alloc::string::String,
1009}
1010#[allow(clippy::derive_partial_eq_without_eq)]
1011#[derive(Clone, PartialEq, ::prost::Message)]
1012pub struct ListWorkflowsResponse {
1013    /// List of Workflows.
1014    #[prost(message, repeated, tag = "1")]
1015    pub workflows: ::prost::alloc::vec::Vec<WorkflowPreview>,
1016    /// Token for getting the next page of the list. If the number of results is greater than
1017    /// the specified \[ListWorkflowsRequest.page_size\], use `next_page_token` as the value
1018    /// for the \[ListWorkflowsRequest.page_token\] parameter in the next list request.
1019    ///
1020    /// Each subsequent page will have its own `next_page_token` to continue paging through the results.
1021    #[prost(string, tag = "2")]
1022    pub next_page_token: ::prost::alloc::string::String,
1023}
1024#[allow(clippy::derive_partial_eq_without_eq)]
1025#[derive(Clone, PartialEq, ::prost::Message)]
1026pub struct ListOperationsRequest {
1027    /// ID of the Workflow to list operations for.
1028    #[prost(string, tag = "1")]
1029    pub workflow_id: ::prost::alloc::string::String,
1030    /// The maximum number of results per page that should be returned. If the number of available
1031    /// results is larger than `pageSize`, the service returns a \[ListOperationsResponse.next_page_token\]
1032    /// that can be used to get the next page of results in subsequent list requests.
1033    ///
1034    /// Default value: 100.
1035    #[prost(int64, tag = "2")]
1036    pub page_size: i64,
1037    /// Page token. To get the next page of results, set `pageToken` to the
1038    /// \[ListOperationsResponse.next_page_token\] returned by a previous list request.
1039    #[prost(string, tag = "3")]
1040    pub page_token: ::prost::alloc::string::String,
1041    /// A filter expression that filters resources listed in the response.
1042    ///
1043    /// The expression must specify:
1044    /// 1. The field name. Currently filtering can be applied to the \[operation.Operation.done\], \[operation.Operation.created_by\] field.
1045    /// 2. An `=` operator.
1046    /// 3. The value in double quotes (`"`). Must be 3-63 characters long and match the regular expression `\[a-z][-a-z0-9]{1,61}[a-z0-9\]`.
1047    /// Examples of a filter: `done=false`, `created_by='John.Doe'`.
1048    #[prost(string, tag = "4")]
1049    pub filter: ::prost::alloc::string::String,
1050}
1051#[allow(clippy::derive_partial_eq_without_eq)]
1052#[derive(Clone, PartialEq, ::prost::Message)]
1053pub struct ListOperationsResponse {
1054    /// List of operations for the specified Workflow.
1055    #[prost(message, repeated, tag = "1")]
1056    pub operations: ::prost::alloc::vec::Vec<super::super::super::operation::Operation>,
1057    /// Token for getting the next page of the list. If the number of results is greater than
1058    /// the specified \[ListOperationsRequest.page_size\], use `next_page_token` as the value
1059    /// for the \[ListOperationsRequest.page_token\] parameter in the next list request.
1060    ///
1061    /// Each subsequent page will have its own `next_page_token` to continue paging through the results.
1062    #[prost(string, tag = "2")]
1063    pub next_page_token: ::prost::alloc::string::String,
1064}
1065/// Generated client implementations.
1066pub mod workflow_service_client {
1067    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
1068    use tonic::codegen::*;
1069    use tonic::codegen::http::Uri;
1070    /// Set of methods for managing Workflows.
1071    #[derive(Debug, Clone)]
1072    pub struct WorkflowServiceClient<T> {
1073        inner: tonic::client::Grpc<T>,
1074    }
1075    impl WorkflowServiceClient<tonic::transport::Channel> {
1076        /// Attempt to create a new client by connecting to a given endpoint.
1077        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1078        where
1079            D: TryInto<tonic::transport::Endpoint>,
1080            D::Error: Into<StdError>,
1081        {
1082            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1083            Ok(Self::new(conn))
1084        }
1085    }
1086    impl<T> WorkflowServiceClient<T>
1087    where
1088        T: tonic::client::GrpcService<tonic::body::BoxBody>,
1089        T::Error: Into<StdError>,
1090        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
1091        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
1092    {
1093        pub fn new(inner: T) -> Self {
1094            let inner = tonic::client::Grpc::new(inner);
1095            Self { inner }
1096        }
1097        pub fn with_origin(inner: T, origin: Uri) -> Self {
1098            let inner = tonic::client::Grpc::with_origin(inner, origin);
1099            Self { inner }
1100        }
1101        pub fn with_interceptor<F>(
1102            inner: T,
1103            interceptor: F,
1104        ) -> WorkflowServiceClient<InterceptedService<T, F>>
1105        where
1106            F: tonic::service::Interceptor,
1107            T::ResponseBody: Default,
1108            T: tonic::codegen::Service<
1109                http::Request<tonic::body::BoxBody>,
1110                Response = http::Response<
1111                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1112                >,
1113            >,
1114            <T as tonic::codegen::Service<
1115                http::Request<tonic::body::BoxBody>,
1116            >>::Error: Into<StdError> + Send + Sync,
1117        {
1118            WorkflowServiceClient::new(InterceptedService::new(inner, interceptor))
1119        }
1120        /// Compress requests with the given encoding.
1121        ///
1122        /// This requires the server to support it otherwise it might respond with an
1123        /// error.
1124        #[must_use]
1125        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1126            self.inner = self.inner.send_compressed(encoding);
1127            self
1128        }
1129        /// Enable decompressing responses.
1130        #[must_use]
1131        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1132            self.inner = self.inner.accept_compressed(encoding);
1133            self
1134        }
1135        /// Limits the maximum size of a decoded message.
1136        ///
1137        /// Default: `4MB`
1138        #[must_use]
1139        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1140            self.inner = self.inner.max_decoding_message_size(limit);
1141            self
1142        }
1143        /// Limits the maximum size of an encoded message.
1144        ///
1145        /// Default: `usize::MAX`
1146        #[must_use]
1147        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1148            self.inner = self.inner.max_encoding_message_size(limit);
1149            self
1150        }
1151        /// Creates Workflow in specified folder.
1152        pub async fn create(
1153            &mut self,
1154            request: impl tonic::IntoRequest<super::CreateWorkflowRequest>,
1155        ) -> std::result::Result<
1156            tonic::Response<super::super::super::super::operation::Operation>,
1157            tonic::Status,
1158        > {
1159            self.inner
1160                .ready()
1161                .await
1162                .map_err(|e| {
1163                    tonic::Status::new(
1164                        tonic::Code::Unknown,
1165                        format!("Service was not ready: {}", e.into()),
1166                    )
1167                })?;
1168            let codec = tonic::codec::ProstCodec::default();
1169            let path = http::uri::PathAndQuery::from_static(
1170                "/yandex.cloud.serverless.workflows.v1.WorkflowService/Create",
1171            );
1172            let mut req = request.into_request();
1173            req.extensions_mut()
1174                .insert(
1175                    GrpcMethod::new(
1176                        "yandex.cloud.serverless.workflows.v1.WorkflowService",
1177                        "Create",
1178                    ),
1179                );
1180            self.inner.unary(req, path, codec).await
1181        }
1182        /// Updates specified Workflow.
1183        pub async fn update(
1184            &mut self,
1185            request: impl tonic::IntoRequest<super::UpdateWorkflowRequest>,
1186        ) -> std::result::Result<
1187            tonic::Response<super::super::super::super::operation::Operation>,
1188            tonic::Status,
1189        > {
1190            self.inner
1191                .ready()
1192                .await
1193                .map_err(|e| {
1194                    tonic::Status::new(
1195                        tonic::Code::Unknown,
1196                        format!("Service was not ready: {}", e.into()),
1197                    )
1198                })?;
1199            let codec = tonic::codec::ProstCodec::default();
1200            let path = http::uri::PathAndQuery::from_static(
1201                "/yandex.cloud.serverless.workflows.v1.WorkflowService/Update",
1202            );
1203            let mut req = request.into_request();
1204            req.extensions_mut()
1205                .insert(
1206                    GrpcMethod::new(
1207                        "yandex.cloud.serverless.workflows.v1.WorkflowService",
1208                        "Update",
1209                    ),
1210                );
1211            self.inner.unary(req, path, codec).await
1212        }
1213        /// Retrieves specified Workflow.
1214        pub async fn get(
1215            &mut self,
1216            request: impl tonic::IntoRequest<super::GetWorkflowRequest>,
1217        ) -> std::result::Result<
1218            tonic::Response<super::GetWorkflowResponse>,
1219            tonic::Status,
1220        > {
1221            self.inner
1222                .ready()
1223                .await
1224                .map_err(|e| {
1225                    tonic::Status::new(
1226                        tonic::Code::Unknown,
1227                        format!("Service was not ready: {}", e.into()),
1228                    )
1229                })?;
1230            let codec = tonic::codec::ProstCodec::default();
1231            let path = http::uri::PathAndQuery::from_static(
1232                "/yandex.cloud.serverless.workflows.v1.WorkflowService/Get",
1233            );
1234            let mut req = request.into_request();
1235            req.extensions_mut()
1236                .insert(
1237                    GrpcMethod::new(
1238                        "yandex.cloud.serverless.workflows.v1.WorkflowService",
1239                        "Get",
1240                    ),
1241                );
1242            self.inner.unary(req, path, codec).await
1243        }
1244        /// Deletes specified Workflow.
1245        pub async fn delete(
1246            &mut self,
1247            request: impl tonic::IntoRequest<super::DeleteWorkflowRequest>,
1248        ) -> std::result::Result<
1249            tonic::Response<super::super::super::super::operation::Operation>,
1250            tonic::Status,
1251        > {
1252            self.inner
1253                .ready()
1254                .await
1255                .map_err(|e| {
1256                    tonic::Status::new(
1257                        tonic::Code::Unknown,
1258                        format!("Service was not ready: {}", e.into()),
1259                    )
1260                })?;
1261            let codec = tonic::codec::ProstCodec::default();
1262            let path = http::uri::PathAndQuery::from_static(
1263                "/yandex.cloud.serverless.workflows.v1.WorkflowService/Delete",
1264            );
1265            let mut req = request.into_request();
1266            req.extensions_mut()
1267                .insert(
1268                    GrpcMethod::new(
1269                        "yandex.cloud.serverless.workflows.v1.WorkflowService",
1270                        "Delete",
1271                    ),
1272                );
1273            self.inner.unary(req, path, codec).await
1274        }
1275        /// Retrieves list of Workflows in specified folder.
1276        pub async fn list(
1277            &mut self,
1278            request: impl tonic::IntoRequest<super::ListWorkflowsRequest>,
1279        ) -> std::result::Result<
1280            tonic::Response<super::ListWorkflowsResponse>,
1281            tonic::Status,
1282        > {
1283            self.inner
1284                .ready()
1285                .await
1286                .map_err(|e| {
1287                    tonic::Status::new(
1288                        tonic::Code::Unknown,
1289                        format!("Service was not ready: {}", e.into()),
1290                    )
1291                })?;
1292            let codec = tonic::codec::ProstCodec::default();
1293            let path = http::uri::PathAndQuery::from_static(
1294                "/yandex.cloud.serverless.workflows.v1.WorkflowService/List",
1295            );
1296            let mut req = request.into_request();
1297            req.extensions_mut()
1298                .insert(
1299                    GrpcMethod::new(
1300                        "yandex.cloud.serverless.workflows.v1.WorkflowService",
1301                        "List",
1302                    ),
1303                );
1304            self.inner.unary(req, path, codec).await
1305        }
1306        /// Lists operations for specified Workflow.
1307        pub async fn list_operations(
1308            &mut self,
1309            request: impl tonic::IntoRequest<super::ListOperationsRequest>,
1310        ) -> std::result::Result<
1311            tonic::Response<super::ListOperationsResponse>,
1312            tonic::Status,
1313        > {
1314            self.inner
1315                .ready()
1316                .await
1317                .map_err(|e| {
1318                    tonic::Status::new(
1319                        tonic::Code::Unknown,
1320                        format!("Service was not ready: {}", e.into()),
1321                    )
1322                })?;
1323            let codec = tonic::codec::ProstCodec::default();
1324            let path = http::uri::PathAndQuery::from_static(
1325                "/yandex.cloud.serverless.workflows.v1.WorkflowService/ListOperations",
1326            );
1327            let mut req = request.into_request();
1328            req.extensions_mut()
1329                .insert(
1330                    GrpcMethod::new(
1331                        "yandex.cloud.serverless.workflows.v1.WorkflowService",
1332                        "ListOperations",
1333                    ),
1334                );
1335            self.inner.unary(req, path, codec).await
1336        }
1337    }
1338}