1#[allow(clippy::derive_partial_eq_without_eq)]
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct Execution {
4 #[prost(string, tag = "1")]
6 pub id: ::prost::alloc::string::String,
7 #[prost(string, tag = "2")]
9 pub workflow_id: ::prost::alloc::string::String,
10 #[prost(message, optional, tag = "4")]
12 pub input: ::core::option::Option<ExecutionInput>,
13 #[prost(message, optional, tag = "5")]
15 pub result: ::core::option::Option<ExecutionResult>,
16 #[prost(message, optional, tag = "6")]
18 pub error: ::core::option::Option<ExecutionError>,
19 #[prost(enumeration = "execution::Status", tag = "7")]
21 pub status: i32,
22 #[prost(message, optional, tag = "8")]
24 pub started_at: ::core::option::Option<::prost_types::Timestamp>,
25 #[prost(message, optional, tag = "9")]
27 pub duration: ::core::option::Option<::prost_types::Duration>,
28}
29pub 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 Queued = 1,
47 Running = 2,
49 Paused = 3,
51 Stopped = 4,
53 Failed = 5,
55 Finished = 6,
57 }
58 impl Status {
59 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 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 #[prost(string, tag = "1")]
94 pub id: ::prost::alloc::string::String,
95 #[prost(string, tag = "2")]
97 pub workflow_id: ::prost::alloc::string::String,
98 #[prost(enumeration = "execution::Status", tag = "4")]
100 pub status: i32,
101 #[prost(message, optional, tag = "5")]
103 pub started_at: ::core::option::Option<::prost_types::Timestamp>,
104 #[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}
114pub mod execution_input {
116 #[allow(clippy::derive_partial_eq_without_eq)]
117 #[derive(Clone, PartialEq, ::prost::Oneof)]
118 pub enum Input {
119 #[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}
130pub mod execution_result {
132 #[allow(clippy::derive_partial_eq_without_eq)]
133 #[derive(Clone, PartialEq, ::prost::Oneof)]
134 pub enum Result {
135 #[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 #[prost(string, tag = "1")]
145 pub message: ::prost::alloc::string::String,
146 #[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 #[prost(string, tag = "1")]
155 pub id: ::prost::alloc::string::String,
156 #[prost(string, tag = "2")]
158 pub title: ::prost::alloc::string::String,
159 #[prost(string, tag = "3")]
161 pub description: ::prost::alloc::string::String,
162 #[prost(message, optional, tag = "4")]
164 pub started_at: ::core::option::Option<::prost_types::Timestamp>,
165 #[prost(message, optional, tag = "5")]
167 pub duration: ::core::option::Option<::prost_types::Duration>,
168 #[prost(message, optional, tag = "6")]
170 pub input: ::core::option::Option<HistoryEntryInput>,
171 #[prost(message, optional, tag = "7")]
173 pub output: ::core::option::Option<HistoryEntryOutput>,
174 #[prost(message, optional, tag = "8")]
176 pub error: ::core::option::Option<HistoryEntryError>,
177 #[prost(enumeration = "history_entry::Status", tag = "9")]
179 pub status: i32,
180 #[prost(string, tag = "10")]
182 pub r#type: ::prost::alloc::string::String,
183 #[prost(int64, tag = "12")]
185 pub attempts: i64,
186 #[prost(message, optional, tag = "13")]
188 pub last_error: ::core::option::Option<HistoryEntryError>,
189}
190pub mod history_entry {
192 #[allow(clippy::derive_partial_eq_without_eq)]
193 #[derive(Clone, PartialEq, ::prost::Message)]
194 pub struct FailedAttempt {
195 #[prost(message, optional, tag = "1")]
197 pub started_at: ::core::option::Option<::prost_types::Timestamp>,
198 #[prost(message, optional, tag = "2")]
200 pub duration: ::core::option::Option<::prost_types::Duration>,
201 #[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 Scheduled = 1,
221 Started = 2,
223 Completed = 3,
225 Failed = 4,
227 CancelRequested = 5,
229 Cancelled = 6,
231 }
232 impl Status {
233 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 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}
269pub mod history_entry_input {
271 #[allow(clippy::derive_partial_eq_without_eq)]
272 #[derive(Clone, PartialEq, ::prost::Oneof)]
273 pub enum Input {
274 #[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}
285pub mod history_entry_output {
287 #[allow(clippy::derive_partial_eq_without_eq)]
288 #[derive(Clone, PartialEq, ::prost::Oneof)]
289 pub enum Output {
290 #[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 #[prost(string, tag = "1")]
300 pub message: ::prost::alloc::string::String,
301 #[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 #[prost(string, tag = "1")]
310 pub workflow_id: ::prost::alloc::string::String,
311 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[prost(message, optional, tag = "1")]
376 pub execution: ::core::option::Option<ExecutionPreview>,
377 #[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 #[prost(string, tag = "1")]
386 pub workflow_id: ::prost::alloc::string::String,
387 #[prost(int64, tag = "2")]
393 pub page_size: i64,
394 #[prost(string, tag = "3")]
397 pub page_token: ::prost::alloc::string::String,
398 #[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 #[prost(message, repeated, tag = "1")]
413 pub executions: ::prost::alloc::vec::Vec<ExecutionPreview>,
414 #[prost(string, tag = "2")]
420 pub next_page_token: ::prost::alloc::string::String,
421}
422pub 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 #[derive(Debug, Clone)]
429 pub struct ExecutionServiceClient<T> {
430 inner: tonic::client::Grpc<T>,
431 }
432 impl ExecutionServiceClient<tonic::transport::Channel> {
433 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 #[must_use]
482 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
483 self.inner = self.inner.send_compressed(encoding);
484 self
485 }
486 #[must_use]
488 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
489 self.inner = self.inner.accept_compressed(encoding);
490 self
491 }
492 #[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 #[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 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 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 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 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 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 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 #[prost(string, tag = "1")]
701 pub id: ::prost::alloc::string::String,
702 #[prost(string, tag = "2")]
704 pub folder_id: ::prost::alloc::string::String,
705 #[prost(message, optional, tag = "3")]
707 pub specification: ::core::option::Option<WorkflowSpecification>,
708 #[prost(message, optional, tag = "4")]
710 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
711 #[prost(string, tag = "5")]
713 pub name: ::prost::alloc::string::String,
714 #[prost(string, tag = "6")]
716 pub description: ::prost::alloc::string::String,
717 #[prost(map = "string, string", tag = "7")]
719 pub labels: ::std::collections::HashMap<
720 ::prost::alloc::string::String,
721 ::prost::alloc::string::String,
722 >,
723 #[prost(enumeration = "workflow::Status", tag = "8")]
725 pub status: i32,
726 #[prost(message, optional, tag = "9")]
728 pub log_options: ::core::option::Option<LogOptions>,
729 #[prost(string, tag = "10")]
731 pub network_id: ::prost::alloc::string::String,
732 #[prost(string, tag = "11")]
734 pub service_account_id: ::prost::alloc::string::String,
735}
736pub 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 Creating = 1,
754 Active = 2,
756 Updating = 3,
758 Deleting = 4,
760 Error = 5,
762 }
763 impl Status {
764 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 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 #[prost(string, tag = "1")]
797 pub id: ::prost::alloc::string::String,
798 #[prost(string, tag = "2")]
800 pub folder_id: ::prost::alloc::string::String,
801 #[prost(message, optional, tag = "3")]
803 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
804 #[prost(string, tag = "4")]
806 pub name: ::prost::alloc::string::String,
807 #[prost(string, tag = "5")]
809 pub description: ::prost::alloc::string::String,
810 #[prost(map = "string, string", tag = "6")]
812 pub labels: ::std::collections::HashMap<
813 ::prost::alloc::string::String,
814 ::prost::alloc::string::String,
815 >,
816 #[prost(enumeration = "workflow::Status", tag = "7")]
818 pub status: i32,
819 #[prost(message, optional, tag = "8")]
821 pub log_options: ::core::option::Option<LogOptions>,
822 #[prost(string, tag = "9")]
824 pub network_id: ::prost::alloc::string::String,
825 #[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}
835pub mod workflow_specification {
837 #[allow(clippy::derive_partial_eq_without_eq)]
838 #[derive(Clone, PartialEq, ::prost::Oneof)]
839 pub enum Spec {
840 #[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 #[prost(bool, tag = "1")]
850 pub disabled: bool,
851 #[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}
862pub mod log_options {
864 #[allow(clippy::derive_partial_eq_without_eq)]
865 #[derive(Clone, PartialEq, ::prost::Oneof)]
866 pub enum Destination {
867 #[prost(string, tag = "2")]
869 LogGroupId(::prost::alloc::string::String),
870 #[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 #[prost(string, tag = "1")]
880 pub folder_id: ::prost::alloc::string::String,
881 #[prost(string, tag = "2")]
884 pub name: ::prost::alloc::string::String,
885 #[prost(string, tag = "3")]
887 pub description: ::prost::alloc::string::String,
888 #[prost(map = "string, string", tag = "4")]
890 pub labels: ::std::collections::HashMap<
891 ::prost::alloc::string::String,
892 ::prost::alloc::string::String,
893 >,
894 #[prost(message, optional, tag = "5")]
896 pub specification: ::core::option::Option<WorkflowSpecification>,
897 #[prost(message, optional, tag = "6")]
899 pub log_options: ::core::option::Option<LogOptions>,
900 #[prost(string, tag = "7")]
902 pub network_id: ::prost::alloc::string::String,
903 #[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 #[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 #[prost(string, tag = "1")]
919 pub workflow_id: ::prost::alloc::string::String,
920 #[prost(string, tag = "2")]
922 pub name: ::prost::alloc::string::String,
923 #[prost(string, tag = "3")]
925 pub description: ::prost::alloc::string::String,
926 #[prost(map = "string, string", tag = "4")]
928 pub labels: ::std::collections::HashMap<
929 ::prost::alloc::string::String,
930 ::prost::alloc::string::String,
931 >,
932 #[prost(message, optional, tag = "5")]
934 pub specification: ::core::option::Option<WorkflowSpecification>,
935 #[prost(message, optional, tag = "6")]
937 pub log_options: ::core::option::Option<LogOptions>,
938 #[prost(string, tag = "7")]
940 pub network_id: ::prost::alloc::string::String,
941 #[prost(string, tag = "8")]
943 pub service_account_id: ::prost::alloc::string::String,
944 #[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 #[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 #[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 #[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 #[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 #[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 #[prost(string, tag = "1")]
988 pub folder_id: ::prost::alloc::string::String,
989 #[prost(int64, tag = "2")]
995 pub page_size: i64,
996 #[prost(string, tag = "3")]
999 pub page_token: ::prost::alloc::string::String,
1000 #[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 #[prost(message, repeated, tag = "1")]
1015 pub workflows: ::prost::alloc::vec::Vec<WorkflowPreview>,
1016 #[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 #[prost(string, tag = "1")]
1029 pub workflow_id: ::prost::alloc::string::String,
1030 #[prost(int64, tag = "2")]
1036 pub page_size: i64,
1037 #[prost(string, tag = "3")]
1040 pub page_token: ::prost::alloc::string::String,
1041 #[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 #[prost(message, repeated, tag = "1")]
1056 pub operations: ::prost::alloc::vec::Vec<super::super::super::operation::Operation>,
1057 #[prost(string, tag = "2")]
1063 pub next_page_token: ::prost::alloc::string::String,
1064}
1065pub 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 #[derive(Debug, Clone)]
1072 pub struct WorkflowServiceClient<T> {
1073 inner: tonic::client::Grpc<T>,
1074 }
1075 impl WorkflowServiceClient<tonic::transport::Channel> {
1076 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 #[must_use]
1125 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1126 self.inner = self.inner.send_compressed(encoding);
1127 self
1128 }
1129 #[must_use]
1131 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1132 self.inner = self.inner.accept_compressed(encoding);
1133 self
1134 }
1135 #[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 #[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 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 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 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 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 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 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}