gcloud-sdk 0.30.0

Async Google gRPC/REST APIs and the client implementation hiding complexity of GCP authentication based on Tonic middleware and Reqwest.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
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
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
// This file is @generated by prost-build.
/// The Storage Batch Operations Job description.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Job {
    /// Identifier. The resource name of the Job. job_id is unique
    /// within the project, that is either set by the customer or
    /// defined by the service. Format:
    /// projects/{project}/locations/global/jobs/{job_id} .
    /// For example: "projects/123456/locations/global/jobs/job01".
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. A description provided by the user for the job. Its max length is
    /// 1024 bytes when Unicode-encoded.
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    /// Optional. Logging configuration.
    #[prost(message, optional, tag = "9")]
    pub logging_config: ::core::option::Option<LoggingConfig>,
    /// Output only. The time that the job was created.
    #[prost(message, optional, tag = "10")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time that the job was scheduled.
    #[prost(message, optional, tag = "11")]
    pub schedule_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time that the job was completed.
    #[prost(message, optional, tag = "12")]
    pub complete_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Information about the progress of the job.
    #[prost(message, optional, tag = "13")]
    pub counters: ::core::option::Option<Counters>,
    /// Output only. Summarizes errors encountered with sample error log entries.
    #[prost(message, repeated, tag = "14")]
    pub error_summaries: ::prost::alloc::vec::Vec<ErrorSummary>,
    /// Output only. State of the job.
    #[prost(enumeration = "job::State", tag = "15")]
    pub state: i32,
    /// Optional. If true, the job will run in dry run mode, returning the total
    /// object count and, if the object configuration is a prefix list, the bytes
    /// found from source. No transformations will be performed.
    #[prost(bool, tag = "22")]
    pub dry_run: bool,
    /// Output only. If true, this Job operates on multiple buckets. Multibucket
    /// jobs are subject to different quota limits than single-bucket jobs.
    #[prost(bool, tag = "24")]
    pub is_multi_bucket_job: bool,
    /// Specifies objects to be transformed.
    #[prost(oneof = "job::Source", tags = "19")]
    pub source: ::core::option::Option<job::Source>,
    /// Operation to be performed on the objects.
    #[prost(oneof = "job::Transformation", tags = "5, 6, 8, 20, 23")]
    pub transformation: ::core::option::Option<job::Transformation>,
}
/// Nested message and enum types in `Job`.
pub mod job {
    /// Describes state of a job.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Default value. This value is unused.
        Unspecified = 0,
        /// In progress.
        Running = 1,
        /// Completed successfully.
        Succeeded = 2,
        /// Cancelled by the user.
        Canceled = 3,
        /// Terminated due to an unrecoverable failure.
        Failed = 4,
        /// Queued but not yet started.
        Queued = 5,
    }
    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 {
                Self::Unspecified => "STATE_UNSPECIFIED",
                Self::Running => "RUNNING",
                Self::Succeeded => "SUCCEEDED",
                Self::Canceled => "CANCELED",
                Self::Failed => "FAILED",
                Self::Queued => "QUEUED",
            }
        }
        /// 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),
                "RUNNING" => Some(Self::Running),
                "SUCCEEDED" => Some(Self::Succeeded),
                "CANCELED" => Some(Self::Canceled),
                "FAILED" => Some(Self::Failed),
                "QUEUED" => Some(Self::Queued),
                _ => None,
            }
        }
    }
    /// Specifies objects to be transformed.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Source {
        /// Specifies a list of buckets and their objects to be transformed.
        #[prost(message, tag = "19")]
        BucketList(super::BucketList),
    }
    /// Operation to be performed on the objects.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Transformation {
        /// Changes object hold status.
        #[prost(message, tag = "5")]
        PutObjectHold(super::PutObjectHold),
        /// Delete objects.
        #[prost(message, tag = "6")]
        DeleteObject(super::DeleteObject),
        /// Updates object metadata. Allows updating fixed-key and custom metadata
        /// and fixed-key metadata i.e. Cache-Control, Content-Disposition,
        /// Content-Encoding, Content-Language, Content-Type, Custom-Time.
        #[prost(message, tag = "8")]
        PutMetadata(super::PutMetadata),
        /// Rewrite the object and updates metadata like KMS key.
        #[prost(message, tag = "20")]
        RewriteObject(super::RewriteObject),
        /// Update object custom context.
        #[prost(message, tag = "23")]
        UpdateObjectCustomContext(super::UpdateObjectCustomContext),
    }
}
/// BucketOperation represents a bucket-level breakdown of a Job.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BucketOperation {
    /// Identifier. The resource name of the BucketOperation. This is defined by
    /// the service. Format:
    /// projects/{project}/locations/global/jobs/{job_id}/bucketOperations/{bucket_operation}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The bucket name of the objects to be transformed in the BucketOperation.
    #[prost(string, tag = "2")]
    pub bucket_name: ::prost::alloc::string::String,
    /// Output only. The time that the BucketOperation was created.
    #[prost(message, optional, tag = "5")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time that the BucketOperation was started.
    #[prost(message, optional, tag = "6")]
    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time that the BucketOperation was completed.
    #[prost(message, optional, tag = "7")]
    pub complete_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Information about the progress of the bucket operation.
    #[prost(message, optional, tag = "8")]
    pub counters: ::core::option::Option<Counters>,
    /// Output only. Summarizes errors encountered with sample error log entries.
    #[prost(message, repeated, tag = "9")]
    pub error_summaries: ::prost::alloc::vec::Vec<ErrorSummary>,
    /// Output only. State of the BucketOperation.
    #[prost(enumeration = "bucket_operation::State", tag = "10")]
    pub state: i32,
    /// Specifies objects to be transformed in the BucketOperation.
    #[prost(oneof = "bucket_operation::ObjectConfiguration", tags = "3, 4")]
    pub object_configuration: ::core::option::Option<
        bucket_operation::ObjectConfiguration,
    >,
    /// Action to be performed on the objects.
    #[prost(oneof = "bucket_operation::Transformation", tags = "11, 12, 13, 14, 15")]
    pub transformation: ::core::option::Option<bucket_operation::Transformation>,
}
/// Nested message and enum types in `BucketOperation`.
pub mod bucket_operation {
    /// Describes state of the BucketOperation.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Default value. This value is unused.
        Unspecified = 0,
        /// Created but not yet started.
        Queued = 1,
        /// In progress.
        Running = 2,
        /// Completed successfully.
        Succeeded = 3,
        /// Cancelled by the user.
        Canceled = 4,
        /// Terminated due to an unrecoverable failure.
        Failed = 5,
    }
    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 {
                Self::Unspecified => "STATE_UNSPECIFIED",
                Self::Queued => "QUEUED",
                Self::Running => "RUNNING",
                Self::Succeeded => "SUCCEEDED",
                Self::Canceled => "CANCELED",
                Self::Failed => "FAILED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "QUEUED" => Some(Self::Queued),
                "RUNNING" => Some(Self::Running),
                "SUCCEEDED" => Some(Self::Succeeded),
                "CANCELED" => Some(Self::Canceled),
                "FAILED" => Some(Self::Failed),
                _ => None,
            }
        }
    }
    /// Specifies objects to be transformed in the BucketOperation.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum ObjectConfiguration {
        /// Specifies objects matching a prefix set.
        #[prost(message, tag = "3")]
        PrefixList(super::PrefixList),
        /// Specifies objects in a manifest file.
        #[prost(message, tag = "4")]
        Manifest(super::Manifest),
    }
    /// Action to be performed on the objects.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Transformation {
        /// Changes object hold status.
        #[prost(message, tag = "11")]
        PutObjectHold(super::PutObjectHold),
        /// Delete objects.
        #[prost(message, tag = "12")]
        DeleteObject(super::DeleteObject),
        /// Updates object metadata. Allows updating fixed-key and custom metadata
        /// and fixed-key metadata i.e. Cache-Control, Content-Disposition,
        /// Content-Encoding, Content-Language, Content-Type, Custom-Time.
        #[prost(message, tag = "13")]
        PutMetadata(super::PutMetadata),
        /// Rewrite the object and updates metadata like KMS key.
        #[prost(message, tag = "14")]
        RewriteObject(super::RewriteObject),
        /// Update object custom context.
        #[prost(message, tag = "15")]
        UpdateObjectCustomContext(super::UpdateObjectCustomContext),
    }
}
/// Describes list of buckets and their objects to be transformed.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BucketList {
    /// Required. List of buckets and their objects to be transformed. Currently,
    /// only one bucket configuration is supported. If multiple buckets are
    /// specified, an error will be returned.
    #[prost(message, repeated, tag = "1")]
    pub buckets: ::prost::alloc::vec::Vec<bucket_list::Bucket>,
}
/// Nested message and enum types in `BucketList`.
pub mod bucket_list {
    /// Describes configuration of a single bucket and its objects to be
    /// transformed.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Bucket {
        /// Required. Bucket name for the objects to be transformed.
        #[prost(string, tag = "1")]
        pub bucket: ::prost::alloc::string::String,
        /// Specifies objects to be transformed.
        #[prost(oneof = "bucket::ObjectConfiguration", tags = "2, 3")]
        pub object_configuration: ::core::option::Option<bucket::ObjectConfiguration>,
    }
    /// Nested message and enum types in `Bucket`.
    pub mod bucket {
        /// Specifies objects to be transformed.
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
        pub enum ObjectConfiguration {
            /// Specifies objects matching a prefix set.
            #[prost(message, tag = "2")]
            PrefixList(super::super::PrefixList),
            /// Specifies objects in a manifest file.
            #[prost(message, tag = "3")]
            Manifest(super::super::Manifest),
        }
    }
}
/// Describes list of objects to be transformed.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Manifest {
    /// Required. `manifest_location` must contain the manifest source file that is
    /// a CSV file in a Google Cloud Storage bucket. Each row in the file must
    /// include the object details i.e. BucketId and Name. Generation may
    /// optionally be specified. When it is not specified the live object is acted
    /// upon. `manifest_location` should either be 1) An absolute path to the
    /// object in the format of `gs://bucket_name/path/file_name.csv`. 2) An
    /// absolute path with a single wildcard character in the file name, for
    /// example `gs://bucket_name/path/file_name*.csv`.
    /// If manifest location is specified with a wildcard, objects in all manifest
    /// files matching the pattern will be acted upon.
    #[prost(string, tag = "2")]
    pub manifest_location: ::prost::alloc::string::String,
}
/// Describes prefixes of objects to be transformed.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PrefixList {
    /// Optional. Include prefixes of the objects to be transformed.
    ///
    /// * Supports full object name
    /// * Supports prefix of the object name
    /// * Wildcards are not supported
    /// * Supports empty string for all objects in a bucket.
    #[prost(string, repeated, tag = "2")]
    pub included_object_prefixes: ::prost::alloc::vec::Vec<
        ::prost::alloc::string::String,
    >,
}
/// Describes options to update object hold.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PutObjectHold {
    /// Required. Updates object temporary holds state. When object temporary hold
    /// is set, object cannot be deleted or replaced.
    #[prost(enumeration = "put_object_hold::HoldStatus", tag = "1")]
    pub temporary_hold: i32,
    /// Required. Updates object event based holds state. When object event based
    /// hold is set, object cannot be deleted or replaced. Resets object's time in
    /// the bucket for the purposes of the retention period.
    #[prost(enumeration = "put_object_hold::HoldStatus", tag = "2")]
    pub event_based_hold: i32,
}
/// Nested message and enum types in `PutObjectHold`.
pub mod put_object_hold {
    /// Describes the status of the hold.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum HoldStatus {
        /// Default value, Object hold status will not be changed.
        Unspecified = 0,
        /// Places the hold.
        Set = 1,
        /// Releases the hold.
        Unset = 2,
    }
    impl HoldStatus {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "HOLD_STATUS_UNSPECIFIED",
                Self::Set => "SET",
                Self::Unset => "UNSET",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "HOLD_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
                "SET" => Some(Self::Set),
                "UNSET" => Some(Self::Unset),
                _ => None,
            }
        }
    }
}
/// Describes options to delete an object.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteObject {
    /// Required. Controls deletion behavior when versioning is enabled for the
    /// object's bucket. If true both live and noncurrent objects will be
    /// permanently deleted. Otherwise live objects in versioned buckets will
    /// become noncurrent and objects that were already noncurrent will be skipped.
    /// This setting doesn't have any impact on the Soft Delete feature. All
    /// objects deleted by this service can be be restored for the duration of the
    /// Soft Delete retention duration if enabled. If enabled and the manifest
    /// doesn't specify an object's generation, a GetObjectMetadata call (a Class B
    /// operation) will be made to determine the live object generation.
    #[prost(bool, tag = "1")]
    pub permanent_object_deletion_enabled: bool,
}
/// Describes options for object rewrite.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RewriteObject {
    /// Required. Resource name of the Cloud KMS key that will be used to encrypt
    /// the object. The Cloud KMS key must be located in same location as the
    /// object. Refer to
    /// <https://cloud.google.com/storage/docs/encryption/using-customer-managed-keys#add-object-key>
    /// for additional documentation. Format:
    /// projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}
    /// For example:
    /// "projects/123456/locations/us-central1/keyRings/my-keyring/cryptoKeys/my-key".
    /// The object will be rewritten and set with the specified KMS key.
    #[prost(string, optional, tag = "1")]
    pub kms_key: ::core::option::Option<::prost::alloc::string::String>,
}
/// Describes options for object retention update.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ObjectRetention {
    /// Required. The time when the object will be retained until. UNSET will clear
    /// the retention. Must be specified in RFC 3339 format e.g.
    /// YYYY-MM-DD'T'HH:MM:SS.SS'Z' or YYYY-MM-DD'T'HH:MM:SS'Z'.
    #[prost(string, optional, tag = "1")]
    pub retain_until_time: ::core::option::Option<::prost::alloc::string::String>,
    /// Required. The retention mode of the object.
    #[prost(enumeration = "object_retention::RetentionMode", optional, tag = "2")]
    pub retention_mode: ::core::option::Option<i32>,
}
/// Nested message and enum types in `ObjectRetention`.
pub mod object_retention {
    /// Describes the retention mode.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum RetentionMode {
        /// If set and retain_until_time is empty, clears the retention.
        Unspecified = 0,
        /// Sets the retention mode to locked.
        Locked = 1,
        /// Sets the retention mode to unlocked.
        Unlocked = 2,
    }
    impl RetentionMode {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "RETENTION_MODE_UNSPECIFIED",
                Self::Locked => "LOCKED",
                Self::Unlocked => "UNLOCKED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "RETENTION_MODE_UNSPECIFIED" => Some(Self::Unspecified),
                "LOCKED" => Some(Self::Locked),
                "UNLOCKED" => Some(Self::Unlocked),
                _ => None,
            }
        }
    }
}
/// Describes options for object metadata update.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PutMetadata {
    /// Optional. Updates objects Content-Disposition fixed metadata. Unset values
    /// will be ignored. Set empty values to clear the metadata. Refer
    /// <https://cloud.google.com/storage/docs/metadata#content-disposition> for
    /// additional documentation.
    #[prost(string, optional, tag = "1")]
    pub content_disposition: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional. Updates objects Content-Encoding fixed metadata. Unset values
    /// will be ignored. Set empty values to clear the metadata. Refer to
    /// documentation in
    /// <https://cloud.google.com/storage/docs/metadata#content-encoding.>
    #[prost(string, optional, tag = "2")]
    pub content_encoding: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional. Updates objects Content-Language fixed metadata. Refer to ISO
    /// 639-1 language codes for typical values of this metadata. Max length 100
    /// characters. Unset values will be ignored. Set empty values to clear the
    /// metadata. Refer to documentation in
    /// <https://cloud.google.com/storage/docs/metadata#content-language.>
    #[prost(string, optional, tag = "3")]
    pub content_language: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional. Updates objects Content-Type fixed metadata. Unset values will be
    /// ignored. Set empty values to clear the metadata. Refer to documentation in
    /// <https://cloud.google.com/storage/docs/metadata#content-type>
    #[prost(string, optional, tag = "4")]
    pub content_type: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional. Updates objects Cache-Control fixed metadata. Unset values will
    /// be ignored. Set empty values to clear the metadata. Additionally, the value
    /// for Custom-Time cannot decrease. Refer to documentation in
    /// <https://cloud.google.com/storage/docs/metadata#caching_data.>
    #[prost(string, optional, tag = "5")]
    pub cache_control: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional. Updates objects Custom-Time fixed metadata. Unset values will be
    /// ignored. Set empty values to clear the metadata. Refer to documentation in
    /// <https://cloud.google.com/storage/docs/metadata#custom-time.>
    #[prost(string, optional, tag = "6")]
    pub custom_time: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional. Updates objects custom metadata. Adds or sets individual custom
    /// metadata key value pairs on objects. Keys that are set with empty custom
    /// metadata values will have its value cleared. Existing custom metadata not
    /// specified with this flag is not changed. Refer to documentation in
    /// <https://cloud.google.com/storage/docs/metadata#custom-metadata>
    #[prost(map = "string, string", tag = "7")]
    pub custom_metadata: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Optional. Updates objects retention lock configuration. Unset values will
    /// be ignored. Set empty values to clear the retention for the object with
    /// existing `Unlocked` retention mode. Object with existing `Locked` retention
    /// mode cannot be cleared or reduce retain_until_time. Refer to documentation
    /// in <https://cloud.google.com/storage/docs/object-lock>
    #[prost(message, optional, tag = "8")]
    pub object_retention: ::core::option::Option<ObjectRetention>,
}
/// Describes the payload of a user defined object custom context.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ObjectCustomContextPayload {
    /// The value of the object custom context.
    /// If set, `value` must NOT be an empty string since it is a required field in
    /// custom context. If unset, `value` will be ignored and no changes will be
    /// made to the `value` field of the custom context payload.
    #[prost(string, optional, tag = "1")]
    pub value: ::core::option::Option<::prost::alloc::string::String>,
}
/// Describes a collection of updates to apply to custom contexts identified
/// by key.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomContextUpdates {
    /// Optional. Insert or update the existing custom contexts.
    #[prost(map = "string, message", tag = "1")]
    pub updates: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ObjectCustomContextPayload,
    >,
    /// Optional. Custom contexts to clear by key.
    /// A key cannot be present in both `updates` and `keys_to_clear`.
    #[prost(string, repeated, tag = "2")]
    pub keys_to_clear: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Describes options to update object custom contexts.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateObjectCustomContext {
    /// One of the actions must be set.
    #[prost(oneof = "update_object_custom_context::Action", tags = "1, 2")]
    pub action: ::core::option::Option<update_object_custom_context::Action>,
}
/// Nested message and enum types in `UpdateObjectCustomContext`.
pub mod update_object_custom_context {
    /// One of the actions must be set.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Action {
        /// A collection of updates to apply to specific custom contexts.
        /// Use this to add, update or delete individual contexts by key.
        #[prost(message, tag = "1")]
        CustomContextUpdates(super::CustomContextUpdates),
        /// If set, must be set to true and all existing object custom contexts will
        /// be deleted.
        #[prost(bool, tag = "2")]
        ClearAll(bool),
    }
}
/// A summary of errors by error code, plus a count and sample error log
/// entries.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ErrorSummary {
    /// Required. The canonical error code.
    #[prost(enumeration = "super::super::super::rpc::Code", tag = "1")]
    pub error_code: i32,
    /// Required. Number of errors encountered per `error_code`.
    #[prost(int64, tag = "2")]
    pub error_count: i64,
    /// Required. Sample error logs.
    #[prost(message, repeated, tag = "3")]
    pub error_log_entries: ::prost::alloc::vec::Vec<ErrorLogEntry>,
}
/// An entry describing an error that has occurred.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ErrorLogEntry {
    /// Required. Output only. Object URL. e.g. gs://my_bucket/object.txt
    #[prost(string, tag = "1")]
    pub object_uri: ::prost::alloc::string::String,
    /// Optional. Output only. At most 5 error log entries are recorded for a given
    /// error code for a job.
    #[prost(string, repeated, tag = "3")]
    pub error_details: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Describes details about the progress of the job.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Counters {
    /// Output only. Number of objects listed.
    #[prost(int64, tag = "1")]
    pub total_object_count: i64,
    /// Output only. Number of objects completed.
    #[prost(int64, tag = "2")]
    pub succeeded_object_count: i64,
    /// Output only. The number of objects that failed due to user errors or
    /// service errors.
    #[prost(int64, tag = "3")]
    pub failed_object_count: i64,
    /// Output only. Number of bytes found from source. This field is only
    /// populated for jobs with a prefix list object configuration.
    #[prost(int64, optional, tag = "4")]
    pub total_bytes_found: ::core::option::Option<i64>,
    /// Output only. Number of object custom contexts created. This field is only
    /// populated for jobs with the UpdateObjectCustomContext transformation.
    #[prost(int64, optional, tag = "5")]
    pub object_custom_contexts_created: ::core::option::Option<i64>,
    /// Output only. Number of object custom contexts deleted. This field is only
    /// populated for jobs with the UpdateObjectCustomContext transformation.
    #[prost(int64, optional, tag = "6")]
    pub object_custom_contexts_deleted: ::core::option::Option<i64>,
    /// Output only. Number of object custom contexts updated. This counter tracks
    /// custom contexts where the key already existed, but the payload was
    /// modified. This field is only populated for jobs with the
    /// UpdateObjectCustomContext transformation.
    #[prost(int64, optional, tag = "7")]
    pub object_custom_contexts_updated: ::core::option::Option<i64>,
}
/// Specifies the Cloud Logging behavior.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LoggingConfig {
    /// Required. Specifies the actions to be logged.
    #[prost(
        enumeration = "logging_config::LoggableAction",
        repeated,
        packed = "false",
        tag = "1"
    )]
    pub log_actions: ::prost::alloc::vec::Vec<i32>,
    /// Required. States in which Action are logged.If empty, no logs are
    /// generated.
    #[prost(
        enumeration = "logging_config::LoggableActionState",
        repeated,
        packed = "false",
        tag = "2"
    )]
    pub log_action_states: ::prost::alloc::vec::Vec<i32>,
}
/// Nested message and enum types in `LoggingConfig`.
pub mod logging_config {
    /// Loggable actions types.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum LoggableAction {
        /// Illegal value, to avoid allowing a default.
        Unspecified = 0,
        /// The corresponding transform action in this job.
        Transform = 6,
    }
    impl LoggableAction {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "LOGGABLE_ACTION_UNSPECIFIED",
                Self::Transform => "TRANSFORM",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "LOGGABLE_ACTION_UNSPECIFIED" => Some(Self::Unspecified),
                "TRANSFORM" => Some(Self::Transform),
                _ => None,
            }
        }
    }
    /// Loggable action states filter.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum LoggableActionState {
        /// Illegal value, to avoid allowing a default.
        Unspecified = 0,
        /// `LoggableAction` completed successfully. `SUCCEEDED` actions are
        /// logged as \[INFO\]\[google.logging.type.LogSeverity.INFO\].
        Succeeded = 1,
        /// `LoggableAction` terminated in an error state. `FAILED` actions
        /// are logged as \[ERROR\]\[google.logging.type.LogSeverity.ERROR\].
        Failed = 2,
    }
    impl LoggableActionState {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "LOGGABLE_ACTION_STATE_UNSPECIFIED",
                Self::Succeeded => "SUCCEEDED",
                Self::Failed => "FAILED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "LOGGABLE_ACTION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "SUCCEEDED" => Some(Self::Succeeded),
                "FAILED" => Some(Self::Failed),
                _ => None,
            }
        }
    }
}
/// Message for request to list Jobs
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListJobsRequest {
    /// Required. Format: projects/{project_id}/locations/global.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. Filters results as defined by <https://google.aip.dev/160.>
    #[prost(string, tag = "2")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. The list page size. default page size is 100.
    #[prost(int32, tag = "3")]
    pub page_size: i32,
    /// Optional. The list page token.
    #[prost(string, tag = "4")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. Field to sort by. Supported fields are name, create_time.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Message for response to listing Jobs
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListJobsResponse {
    /// A list of storage batch jobs.
    #[prost(message, repeated, tag = "1")]
    pub jobs: ::prost::alloc::vec::Vec<Job>,
    /// A token identifying a page of results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Locations that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Message for getting a Job
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetJobRequest {
    /// Required. `name` of the job to retrieve.
    /// Format: projects/{project_id}/locations/global/jobs/{job_id} .
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Message for creating a Job
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateJobRequest {
    /// Required. Value for parent.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The optional `job_id` for this Job . If not
    /// specified, an id is generated. `job_id` should be no more than 128
    /// characters and must include only characters available in DNS names, as
    /// defined by RFC-1123.
    #[prost(string, tag = "2")]
    pub job_id: ::prost::alloc::string::String,
    /// Required. The resource being created
    #[prost(message, optional, tag = "3")]
    pub job: ::core::option::Option<Job>,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID in case you need to retry your request. Requests with same
    /// `request_id` will be ignored for at least 60 minutes since the first
    /// request. The request ID must be a valid UUID with the exception that zero
    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Message for Job to Cancel
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelJobRequest {
    /// Required. The `name` of the job to cancel.
    /// Format: projects/{project_id}/locations/global/jobs/{job_id}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID in case you need to retry your request. Requests with same
    /// `request_id` will be ignored for at least 60 minutes since the first
    /// request. The request ID must be a valid UUID with the exception that zero
    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Message for deleting a Job
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteJobRequest {
    /// Required. The `name` of the job to delete.
    /// Format: projects/{project_id}/locations/global/jobs/{job_id} .
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID in case you need to retry your request. Requests with same
    /// `request_id` will be ignored for at least 60 minutes since the first
    /// request. The request ID must be a valid UUID with the exception that zero
    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
    /// Optional. If set to true, any child bucket operations of the job will also
    /// be deleted. Highly recommended to be set to true by all clients. Users
    /// cannot mutate bucket operations directly, so only the jobs.delete
    /// permission is required to delete a job (and its child bucket operations).
    #[prost(bool, tag = "3")]
    pub force: bool,
}
/// Message for response to cancel Job.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelJobResponse {}
/// Message for request to list BucketOperations
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListBucketOperationsRequest {
    /// Required. Format: projects/{project_id}/locations/global/jobs/{job_id}.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. Filters results as defined by <https://google.aip.dev/160.>
    #[prost(string, tag = "2")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. The list page size. Default page size is 100.
    #[prost(int32, tag = "3")]
    pub page_size: i32,
    /// Optional. The list page token.
    #[prost(string, tag = "4")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. Field to sort by. Supported fields are name, create_time.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Message for response to listing BucketOperations
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBucketOperationsResponse {
    /// A list of storage batch bucket operations.
    #[prost(message, repeated, tag = "1")]
    pub bucket_operations: ::prost::alloc::vec::Vec<BucketOperation>,
    /// A token identifying a page of results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Locations that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Message for getting a BucketOperation.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetBucketOperationRequest {
    /// Required. `name` of the bucket operation to retrieve.
    /// Format:
    /// projects/{project_id}/locations/global/jobs/{job_id}/bucketOperations/{bucket_operation_id}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Represents the metadata of the long-running operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationMetadata {
    /// Output only. The unique operation resource name.
    /// Format: projects/{project}/locations/global/operations/{operation}.
    #[prost(string, tag = "1")]
    pub operation: ::prost::alloc::string::String,
    /// Output only. The time the operation was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time the operation finished running.
    #[prost(message, optional, tag = "3")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Identifies whether the user has requested cancellation
    /// of the operation. Operations that have been cancelled successfully
    /// have
    /// \[google.longrunning.Operation.error\]\[google.longrunning.Operation.error\]
    /// value with a \[google.rpc.Status.code\]\[google.rpc.Status.code\] of 1,
    /// corresponding to
    /// `[Code.CANCELLED][google.rpc.Code.CANCELLED]`.
    #[prost(bool, tag = "7")]
    pub requested_cancellation: bool,
    /// Output only. API version used to start the operation.
    #[prost(string, tag = "8")]
    pub api_version: ::prost::alloc::string::String,
    /// Output only. The Job associated with the operation.
    #[prost(message, optional, tag = "10")]
    pub job: ::core::option::Option<Job>,
}
/// Generated client implementations.
pub mod storage_batch_operations_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Storage Batch Operations offers a managed experience to perform batch
    /// operations on millions of Cloud Storage objects in a serverless fashion. With
    /// this service, you can automate and simplify large scale API operations
    /// performed on Cloud Storage objects.
    #[derive(Debug, Clone)]
    pub struct StorageBatchOperationsClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl StorageBatchOperationsClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> StorageBatchOperationsClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::Body>,
        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,
        ) -> StorageBatchOperationsClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::Body>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::Body>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            StorageBatchOperationsClient::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 Jobs in a given project.
        pub async fn list_jobs(
            &mut self,
            request: impl tonic::IntoRequest<super::ListJobsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListJobsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.storagebatchoperations.v1.StorageBatchOperations/ListJobs",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.storagebatchoperations.v1.StorageBatchOperations",
                        "ListJobs",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets a batch job.
        pub async fn get_job(
            &mut self,
            request: impl tonic::IntoRequest<super::GetJobRequest>,
        ) -> std::result::Result<tonic::Response<super::Job>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.storagebatchoperations.v1.StorageBatchOperations/GetJob",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.storagebatchoperations.v1.StorageBatchOperations",
                        "GetJob",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a batch job.
        pub async fn create_job(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateJobRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.storagebatchoperations.v1.StorageBatchOperations/CreateJob",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.storagebatchoperations.v1.StorageBatchOperations",
                        "CreateJob",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a batch job.
        pub async fn delete_job(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteJobRequest>,
        ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.storagebatchoperations.v1.StorageBatchOperations/DeleteJob",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.storagebatchoperations.v1.StorageBatchOperations",
                        "DeleteJob",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Cancels a batch job.
        pub async fn cancel_job(
            &mut self,
            request: impl tonic::IntoRequest<super::CancelJobRequest>,
        ) -> std::result::Result<
            tonic::Response<super::CancelJobResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.storagebatchoperations.v1.StorageBatchOperations/CancelJob",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.storagebatchoperations.v1.StorageBatchOperations",
                        "CancelJob",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists BucketOperations in a given project and job.
        pub async fn list_bucket_operations(
            &mut self,
            request: impl tonic::IntoRequest<super::ListBucketOperationsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListBucketOperationsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.storagebatchoperations.v1.StorageBatchOperations/ListBucketOperations",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.storagebatchoperations.v1.StorageBatchOperations",
                        "ListBucketOperations",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets a BucketOperation.
        pub async fn get_bucket_operation(
            &mut self,
            request: impl tonic::IntoRequest<super::GetBucketOperationRequest>,
        ) -> std::result::Result<
            tonic::Response<super::BucketOperation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.storagebatchoperations.v1.StorageBatchOperations/GetBucketOperation",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.storagebatchoperations.v1.StorageBatchOperations",
                        "GetBucketOperation",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}