1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
// This file is @generated by prost-build.
/// Workflow program to be executed by Workflows.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Workflow {
    /// The resource name of the workflow.
    /// Format: projects/{project}/locations/{location}/workflows/{workflow}
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Description of the workflow provided by the user.
    /// Must be at most 1000 unicode characters long.
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    /// Output only. State of the workflow deployment.
    #[prost(enumeration = "workflow::State", tag = "3")]
    pub state: i32,
    /// Output only. The revision of the workflow.
    /// A new revision of a workflow is created as a result of updating the
    /// following properties of a workflow:
    ///
    /// - [Service account][google.cloud.workflows.v1.Workflow.service_account]
    /// - [Workflow code to be
    /// executed][google.cloud.workflows.v1.Workflow.source_contents]
    ///
    /// The format is "000001-a4d", where the first six characters define
    /// the zero-padded revision ordinal number. They are followed by a hyphen and
    /// three hexadecimal random characters.
    #[prost(string, tag = "4")]
    pub revision_id: ::prost::alloc::string::String,
    /// Output only. The timestamp for when the workflow was created.
    #[prost(message, optional, tag = "5")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The timestamp for when the workflow was last updated.
    #[prost(message, optional, tag = "6")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The timestamp for the latest revision of the workflow's
    /// creation.
    #[prost(message, optional, tag = "7")]
    pub revision_create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Labels associated with this workflow.
    /// Labels can contain at most 64 entries. Keys and values can be no longer
    /// than 63 characters and can only contain lowercase letters, numeric
    /// characters, underscores, and dashes. Label keys must start with a letter.
    /// International characters are allowed.
    #[prost(btree_map = "string, string", tag = "8")]
    pub labels: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// The service account associated with the latest workflow version.
    /// This service account represents the identity of the workflow and determines
    /// what permissions the workflow has.
    /// Format: projects/{project}/serviceAccounts/{account} or {account}
    ///
    /// Using `-` as a wildcard for the `{project}` or not providing one at all
    /// will infer the project from the account. The `{account}` value can be the
    /// `email` address or the `unique_id` of the service account.
    ///
    /// If not provided, workflow will use the project's default service account.
    /// Modifying this field for an existing workflow results in a new workflow
    /// revision.
    #[prost(string, tag = "9")]
    pub service_account: ::prost::alloc::string::String,
    /// Optional. The resource name of a KMS crypto key used to encrypt or decrypt
    /// the data associated with the workflow.
    ///
    /// Format:
    /// projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
    ///
    /// Using `-` as a wildcard for the `{project}` or not providing one at all
    /// will infer the project from the account.
    ///
    /// If not provided, data associated with the workflow will not be
    /// CMEK-encrypted.
    #[prost(string, tag = "11")]
    pub crypto_key_name: ::prost::alloc::string::String,
    /// Output only. Error regarding the state of the workflow. For example, this
    /// field will have error details if the execution data is unavailable due to
    /// revoked KMS key permissions.
    #[prost(message, optional, tag = "12")]
    pub state_error: ::core::option::Option<workflow::StateError>,
    /// Optional. Describes the level of platform logging to apply to calls and
    /// call responses during executions of this workflow. If both the workflow and
    /// the execution specify a logging level, the execution level takes
    /// precedence.
    #[prost(enumeration = "workflow::CallLogLevel", tag = "13")]
    pub call_log_level: i32,
    /// Optional. User-defined environment variables associated with this workflow
    /// revision. This map has a maximum length of 20. Each string can take up to
    /// 40KiB. Keys cannot be empty strings and cannot start with “GOOGLE” or
    /// “WORKFLOWS".
    #[prost(btree_map = "string, string", tag = "14")]
    pub user_env_vars: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Required. Location of the workflow source code.
    /// Modifying this field for an existing workflow results in a new workflow
    /// revision.
    #[prost(oneof = "workflow::SourceCode", tags = "10")]
    pub source_code: ::core::option::Option<workflow::SourceCode>,
}
/// Nested message and enum types in `Workflow`.
pub mod workflow {
    /// Describes an error related to the current state of the workflow.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct StateError {
        /// Provides specifics about the error.
        #[prost(string, tag = "1")]
        pub details: ::prost::alloc::string::String,
        /// The type of this state error.
        #[prost(enumeration = "state_error::Type", tag = "2")]
        pub r#type: i32,
    }
    /// Nested message and enum types in `StateError`.
    pub mod state_error {
        /// Describes the possibled types of a state error.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Type {
            /// No type specified.
            Unspecified = 0,
            /// Caused by an issue with KMS.
            KmsError = 1,
        }
        impl Type {
            /// String value of the enum field names used in the ProtoBuf definition.
            ///
            /// The values are not transformed in any way and thus are considered stable
            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
            pub fn as_str_name(&self) -> &'static str {
                match self {
                    Type::Unspecified => "TYPE_UNSPECIFIED",
                    Type::KmsError => "KMS_ERROR",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                    "KMS_ERROR" => Some(Self::KmsError),
                    _ => None,
                }
            }
        }
    }
    /// Describes the current state of workflow deployment.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Invalid state.
        Unspecified = 0,
        /// The workflow has been deployed successfully and is serving.
        Active = 1,
        /// Workflow data is unavailable. See the `state_error` field.
        Unavailable = 2,
    }
    impl State {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                State::Unspecified => "STATE_UNSPECIFIED",
                State::Active => "ACTIVE",
                State::Unavailable => "UNAVAILABLE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "ACTIVE" => Some(Self::Active),
                "UNAVAILABLE" => Some(Self::Unavailable),
                _ => None,
            }
        }
    }
    /// Describes the level of platform logging to apply to calls and call
    /// responses during workflow executions.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum CallLogLevel {
        /// No call logging level specified.
        Unspecified = 0,
        /// Log all call steps within workflows, all call returns, and all exceptions
        /// raised.
        LogAllCalls = 1,
        /// Log only exceptions that are raised from call steps within workflows.
        LogErrorsOnly = 2,
        /// Explicitly log nothing.
        LogNone = 3,
    }
    impl CallLogLevel {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                CallLogLevel::Unspecified => "CALL_LOG_LEVEL_UNSPECIFIED",
                CallLogLevel::LogAllCalls => "LOG_ALL_CALLS",
                CallLogLevel::LogErrorsOnly => "LOG_ERRORS_ONLY",
                CallLogLevel::LogNone => "LOG_NONE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CALL_LOG_LEVEL_UNSPECIFIED" => Some(Self::Unspecified),
                "LOG_ALL_CALLS" => Some(Self::LogAllCalls),
                "LOG_ERRORS_ONLY" => Some(Self::LogErrorsOnly),
                "LOG_NONE" => Some(Self::LogNone),
                _ => None,
            }
        }
    }
    /// Required. Location of the workflow source code.
    /// Modifying this field for an existing workflow results in a new workflow
    /// revision.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum SourceCode {
        /// Workflow code to be executed. The size limit is 128KB.
        #[prost(string, tag = "10")]
        SourceContents(::prost::alloc::string::String),
    }
}
/// Request for the
/// [ListWorkflows][google.cloud.workflows.v1.Workflows.ListWorkflows]
/// method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListWorkflowsRequest {
    /// Required. Project and location from which the workflows should be listed.
    /// Format: projects/{project}/locations/{location}
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Maximum number of workflows to return per call. The service might return
    /// fewer than this value even if not at the end of the collection. If a value
    /// is not specified, a default value of 500 is used. The maximum permitted
    /// value is 1000 and values greater than 1000 are coerced down to 1000.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// A page token, received from a previous `ListWorkflows` call.
    /// Provide this to retrieve the subsequent page.
    ///
    /// When paginating, all other parameters provided to `ListWorkflows` must
    /// match the call that provided the page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Filter to restrict results to specific workflows.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Comma-separated list of fields that specify the order of the results.
    /// Default sorting order for a field is ascending. To specify descending order
    /// for a field, append a "desc" suffix.
    /// If not specified, the results are returned in an unspecified order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response for the
/// [ListWorkflows][google.cloud.workflows.v1.Workflows.ListWorkflows]
/// method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListWorkflowsResponse {
    /// The workflows that match the request.
    #[prost(message, repeated, tag = "1")]
    pub workflows: ::prost::alloc::vec::Vec<Workflow>,
    /// A token, which can be sent as `page_token` to retrieve the next page.
    /// If this field is omitted, there are no subsequent pages.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Unreachable resources.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for the
/// [GetWorkflow][google.cloud.workflows.v1.Workflows.GetWorkflow] method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetWorkflowRequest {
    /// Required. Name of the workflow for which information should be retrieved.
    /// Format: projects/{project}/locations/{location}/workflows/{workflow}
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. The revision of the workflow to retrieve. If the revision_id is
    /// empty, the latest revision is retrieved.
    /// The format is "000001-a4d", where the first six characters define
    /// the zero-padded decimal revision number. They are followed by a hyphen and
    /// three hexadecimal characters.
    #[prost(string, tag = "2")]
    pub revision_id: ::prost::alloc::string::String,
}
/// Request for the
/// [CreateWorkflow][google.cloud.workflows.v1.Workflows.CreateWorkflow]
/// method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateWorkflowRequest {
    /// Required. Project and location in which the workflow should be created.
    /// Format:  projects/{project}/locations/{location}
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Workflow to be created.
    #[prost(message, optional, tag = "2")]
    pub workflow: ::core::option::Option<Workflow>,
    /// Required. The ID of the workflow to be created. It has to fulfill the
    /// following requirements:
    ///
    /// * Must contain only letters, numbers, underscores and hyphens.
    /// * Must start with a letter.
    /// * Must be between 1-64 characters.
    /// * Must end with a number or a letter.
    /// * Must be unique within the customer project and location.
    #[prost(string, tag = "3")]
    pub workflow_id: ::prost::alloc::string::String,
}
/// Request for the
/// [DeleteWorkflow][google.cloud.workflows.v1.Workflows.DeleteWorkflow]
/// method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteWorkflowRequest {
    /// Required. Name of the workflow to be deleted.
    /// Format: projects/{project}/locations/{location}/workflows/{workflow}
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for the
/// [UpdateWorkflow][google.cloud.workflows.v1.Workflows.UpdateWorkflow]
/// method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateWorkflowRequest {
    /// Required. Workflow to be updated.
    #[prost(message, optional, tag = "1")]
    pub workflow: ::core::option::Option<Workflow>,
    /// List of fields to be updated. If not present, the entire workflow
    /// will be updated.
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Represents the metadata of the long-running operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationMetadata {
    /// The time the operation was created.
    #[prost(message, optional, tag = "1")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The time the operation finished running.
    #[prost(message, optional, tag = "2")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Server-defined resource path for the target of the operation.
    #[prost(string, tag = "3")]
    pub target: ::prost::alloc::string::String,
    /// Name of the verb executed by the operation.
    #[prost(string, tag = "4")]
    pub verb: ::prost::alloc::string::String,
    /// API version used to start the operation.
    #[prost(string, tag = "5")]
    pub api_version: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod workflows_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Workflows is used to deploy and execute workflow programs.
    /// Workflows makes sure the program executes reliably, despite hardware and
    /// networking interruptions.
    #[derive(Debug, Clone)]
    pub struct WorkflowsClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> WorkflowsClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> WorkflowsClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            WorkflowsClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Lists workflows in a given project and location.
        /// The default order is not specified.
        pub async fn list_workflows(
            &mut self,
            request: impl tonic::IntoRequest<super::ListWorkflowsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListWorkflowsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.workflows.v1.Workflows/ListWorkflows",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.workflows.v1.Workflows",
                        "ListWorkflows",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single workflow.
        pub async fn get_workflow(
            &mut self,
            request: impl tonic::IntoRequest<super::GetWorkflowRequest>,
        ) -> std::result::Result<tonic::Response<super::Workflow>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.workflows.v1.Workflows/GetWorkflow",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.cloud.workflows.v1.Workflows", "GetWorkflow"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new workflow. If a workflow with the specified name already
        /// exists in the specified project and location, the long running operation
        /// returns a [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
        pub async fn create_workflow(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateWorkflowRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.workflows.v1.Workflows/CreateWorkflow",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.workflows.v1.Workflows",
                        "CreateWorkflow",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a workflow with the specified name.
        /// This method also cancels and deletes all running executions of the
        /// workflow.
        pub async fn delete_workflow(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteWorkflowRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.workflows.v1.Workflows/DeleteWorkflow",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.workflows.v1.Workflows",
                        "DeleteWorkflow",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates an existing workflow.
        /// Running this method has no impact on already running executions of the
        /// workflow. A new revision of the workflow might be created as a result of a
        /// successful update operation. In that case, the new revision is used
        /// in new workflow executions.
        pub async fn update_workflow(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateWorkflowRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.workflows.v1.Workflows/UpdateWorkflow",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.workflows.v1.Workflows",
                        "UpdateWorkflow",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}