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
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
// This file is @generated by prost-build.
/// Represents a Workload Manager Evaluation configuration.
/// An Evaluation defines a set of rules to be validated against a scope
/// of Cloud resources.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Evaluation {
    /// Name of resource that has the form
    /// `projects/{project_id}/locations/{location_id}/evaluations/{evaluation_id}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Description of the Evaluation.
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    /// Resource filter for an evaluation defining the scope of resources to be
    /// evaluated.
    #[prost(message, optional, tag = "3")]
    pub resource_filter: ::core::option::Option<ResourceFilter>,
    /// The names of the rules used for this evaluation.
    #[prost(string, repeated, tag = "4")]
    pub rule_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Output only. \[Output only\] The current lifecycle state of the evaluation
    /// resource.
    #[prost(message, optional, tag = "6")]
    pub resource_status: ::core::option::Option<ResourceStatus>,
    /// Output only. \[Output only\] Create time stamp.
    #[prost(message, optional, tag = "7")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. \[Output only\] Update time stamp.
    #[prost(message, optional, tag = "8")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Labels as key value pairs.
    #[prost(map = "string, string", tag = "9")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Crontab format schedule for scheduled evaluation, currently only supports
    /// the following fixed schedules:
    ///
    /// * `0 */1 * * *` # Hourly
    /// * `0 */6 * * *` # Every 6 hours
    /// * `0 */12 * * *` # Every 12 hours
    /// * `0 0 */1 * *` # Daily
    /// * `0 0 */7 * *` # Weekly
    /// * `0 0 */14 * *` # Every 14 days
    /// * `0 0 1 */1 *` # Monthly
    #[prost(string, optional, tag = "10")]
    pub schedule: ::core::option::Option<::prost::alloc::string::String>,
    /// The Cloud Storage bucket name for custom rules.
    #[prost(string, tag = "11")]
    pub custom_rules_bucket: ::prost::alloc::string::String,
    /// Evaluation type.
    #[prost(enumeration = "evaluation::EvaluationType", tag = "12")]
    pub evaluation_type: i32,
    /// Optional. The BigQuery destination for detailed evaluation results.
    /// If this field is specified, the results of each evaluation execution are
    /// exported to BigQuery.
    #[prost(message, optional, tag = "13")]
    pub big_query_destination: ::core::option::Option<BigQueryDestination>,
    /// Optional. Immutable. Customer-managed encryption key name, in the format
    /// projects/*/locations/*/keyRings/*/cryptoKeys/*.
    /// The key will be used for CMEK encryption of the evaluation resource.
    #[prost(string, tag = "15")]
    pub kms_key: ::prost::alloc::string::String,
}
/// Nested message and enum types in `Evaluation`.
pub mod evaluation {
    /// Possible types of workload evaluations like SAP, SQL Server, etc.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum EvaluationType {
        /// Not specified.
        Unspecified = 0,
        /// SAP best practices.
        Sap = 1,
        /// SQL best practices.
        SqlServer = 2,
        /// Customized best practices.
        Other = 3,
    }
    impl EvaluationType {
        /// 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 => "EVALUATION_TYPE_UNSPECIFIED",
                Self::Sap => "SAP",
                Self::SqlServer => "SQL_SERVER",
                Self::Other => "OTHER",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "EVALUATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "SAP" => Some(Self::Sap),
                "SQL_SERVER" => Some(Self::SqlServer),
                "OTHER" => Some(Self::Other),
                _ => None,
            }
        }
    }
}
/// Resource filter for an evaluation defining the scope of resources to be
/// evaluated.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceFilter {
    /// The scopes of evaluation resource.
    /// Format:
    ///
    /// * `projects/{project_id}`
    /// * `folders/{folder_id}`
    /// * `organizations/{organization_id}`
    #[prost(string, repeated, tag = "1")]
    pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The pattern to filter resources by their id
    /// For example, a pattern of ".*prod-cluster.*" will match all resources that
    /// contain "prod-cluster" in their ID.
    #[prost(string, repeated, tag = "2")]
    pub resource_id_patterns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Labels to filter resources by. Each key-value pair in the map must exist
    /// on the resource for it to be included (e.g. VM instance labels).
    /// For example, specifying `{ "env": "prod", "database": "nosql" }` will only
    /// include resources that have labels `env=prod` and `database=nosql`.
    #[prost(map = "string, string", tag = "3")]
    pub inclusion_labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Filter compute engine resources.
    #[prost(message, optional, tag = "4")]
    pub gce_instance_filter: ::core::option::Option<GceInstanceFilter>,
}
/// A filter for matching Compute Engine instances.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GceInstanceFilter {
    /// If non-empty, only Compute Engine instances associated with at least one of
    /// the provided service accounts will be included in the evaluation.
    #[prost(string, repeated, tag = "4")]
    pub service_accounts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// The lifecycle status of an Evaluation resource.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ResourceStatus {
    /// State of the Evaluation resource.
    #[prost(enumeration = "resource_status::State", tag = "2")]
    pub state: i32,
}
/// Nested message and enum types in `ResourceStatus`.
pub mod resource_status {
    /// Possible states of an evaluation, such as CREATING, ACTIVE, and DELETING.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// The state has not been populated in this message.
        Unspecified = 0,
        /// Resource has an active Create operation.
        Creating = 1,
        /// Resource has no outstanding operations on it or has active Update
        /// operations.
        Active = 2,
        /// Resource has an active Delete operation.
        Deleting = 3,
    }
    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::Creating => "CREATING",
                Self::Active => "ACTIVE",
                Self::Deleting => "DELETING",
            }
        }
        /// 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),
                "CREATING" => Some(Self::Creating),
                "ACTIVE" => Some(Self::Active),
                "DELETING" => Some(Self::Deleting),
                _ => None,
            }
        }
    }
}
/// BigQuery destination for evaluation results.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BigQueryDestination {
    /// Optional. Destination dataset to save evaluation results.
    #[prost(string, tag = "1")]
    pub destination_dataset: ::prost::alloc::string::String,
    /// Optional. Determines if a new results table will be created when an
    /// Execution is created.
    #[prost(bool, tag = "2")]
    pub create_new_results_table: bool,
}
/// Request message for the ListEvaluations RPC.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListEvaluationsRequest {
    /// Required. Parent value for ListEvaluationsRequest.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Requested page size. Server may return fewer items than requested.
    /// If unspecified, server will pick an appropriate default.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// A token identifying a page of results the server should return.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Filter to be applied when listing the evaluation results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Hint for how to order the results.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response message for the ListEvaluations RPC.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEvaluationsResponse {
    /// The list of evaluations.
    #[prost(message, repeated, tag = "1")]
    pub evaluations: ::prost::alloc::vec::Vec<Evaluation>,
    /// A token identifying a page of results the server should return.
    #[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>,
}
/// Request message for the GetEvaluation RPC.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetEvaluationRequest {
    /// Required. Name of the resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for the CreateEvaluation RPC.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateEvaluationRequest {
    /// Required. The resource prefix of the evaluation location using the form:
    /// `projects/{project_id}/locations/{location_id}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Id of the requesting object.
    #[prost(string, tag = "2")]
    pub evaluation_id: ::prost::alloc::string::String,
    /// Required. The resource being created.
    #[prost(message, optional, tag = "3")]
    pub evaluation: ::core::option::Option<Evaluation>,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// 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,
}
/// Request message for the UpdateEvaluation RPC.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateEvaluationRequest {
    /// Required. Field mask is used to specify the fields to be overwritten in the
    /// Evaluation resource by the update.
    /// The fields specified in the update_mask are relative to the resource, not
    /// the full request. A field will be overwritten if it is in the mask.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. The resource being updated.
    #[prost(message, optional, tag = "2")]
    pub evaluation: ::core::option::Option<Evaluation>,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// 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,
}
/// Request message for the DeleteEvaluation RPC.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteEvaluationRequest {
    /// Required. Name of the resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes after the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// 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. Followed the best practice from
    /// <https://aip.dev/135#cascading-delete.>
    #[prost(bool, tag = "3")]
    pub force: bool,
}
/// Execution that represents a single run of an Evaluation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Execution {
    /// The name of execution resource. The format is
    /// projects/{project}/locations/{location}/evaluations/{evaluation}/executions/{execution}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. \[Output only\] Start time stamp.
    #[prost(message, optional, tag = "2")]
    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. \[Output only\] End time stamp.
    #[prost(message, optional, tag = "3")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. \[Output only\] Inventory time stamp.
    #[prost(message, optional, tag = "4")]
    pub inventory_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. \[Output only\] State.
    #[prost(enumeration = "execution::State", tag = "5")]
    pub state: i32,
    /// Output only. \[Output only\] Evaluation ID.
    #[prost(string, tag = "6")]
    pub evaluation_id: ::prost::alloc::string::String,
    /// Labels as key value pairs.
    #[prost(map = "string, string", tag = "7")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Type which represents whether the execution executed directly by user or
    /// scheduled according to the `Evaluation.schedule` field.
    #[prost(enumeration = "execution::Type", tag = "8")]
    pub run_type: i32,
    /// Output only. Execution result summary per rule.
    #[prost(message, repeated, tag = "9")]
    pub rule_results: ::prost::alloc::vec::Vec<RuleExecutionResult>,
    /// Optional. External data sources.
    #[prost(message, repeated, tag = "10")]
    pub external_data_sources: ::prost::alloc::vec::Vec<execution::ExternalDataSources>,
    /// Output only. Additional information generated by the execution.
    #[prost(message, repeated, tag = "11")]
    pub notices: ::prost::alloc::vec::Vec<execution::Notice>,
    /// Optional. Engine.
    #[prost(enumeration = "execution::Engine", tag = "12")]
    pub engine: i32,
    /// Output only. \[Output only\] Result summary for the execution.
    #[prost(message, optional, tag = "13")]
    pub result_summary: ::core::option::Option<execution::Summary>,
}
/// Nested message and enum types in `Execution`.
pub mod execution {
    /// External data sources for an execution.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct ExternalDataSources {
        /// Optional. Name of external data source. The name will be used inside the
        /// rego/sql to refer the external data.
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        /// Required. URI of external data source. example of bq table
        /// {project_ID}.{dataset_ID}.{table_ID}.
        #[prost(string, tag = "2")]
        pub uri: ::prost::alloc::string::String,
        /// Required. Type of external data source.
        #[prost(enumeration = "external_data_sources::Type", tag = "3")]
        pub r#type: i32,
        /// Required. The asset type of the external data source.
        /// This can be a supported Cloud Asset Inventory asset type
        /// (see <https://cloud.google.com/asset-inventory/docs/supported-asset-types>)
        /// to override the default asset type, or it can be a custom type defined by
        /// the user.
        #[prost(string, tag = "4")]
        pub asset_type: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `ExternalDataSources`.
    pub mod external_data_sources {
        /// Possible types of external data sources like BigQuery table, etc.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Type {
            /// Unknown type.
            Unspecified = 0,
            /// BigQuery table.
            BigQueryTable = 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 {
                    Self::Unspecified => "TYPE_UNSPECIFIED",
                    Self::BigQueryTable => "BIG_QUERY_TABLE",
                }
            }
            /// 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),
                    "BIG_QUERY_TABLE" => Some(Self::BigQueryTable),
                    _ => None,
                }
            }
        }
    }
    /// Additional information generated by an execution.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Notice {
        /// Output only. Message of the notice.
        #[prost(string, tag = "1")]
        pub message: ::prost::alloc::string::String,
    }
    /// Execution summary.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Summary {
        /// Output only. Number of failures.
        #[prost(int64, tag = "1")]
        pub failures: i64,
        /// Output only. Number of new failures compared to the previous execution.
        #[prost(int64, tag = "2")]
        pub new_failures: i64,
        /// Output only. Number of new fixes compared to the previous execution.
        #[prost(int64, tag = "3")]
        pub new_fixes: i64,
    }
    /// The possible states of an execution like RUNNING, SUCCEEDED, FAILED, etc.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// State of execution is unspecified.
        Unspecified = 0,
        /// The execution is running in backend service.
        Running = 1,
        /// The execution run succeeded.
        Succeeded = 2,
        /// The execution run failed.
        Failed = 3,
    }
    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::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),
                "RUNNING" => Some(Self::Running),
                "SUCCEEDED" => Some(Self::Succeeded),
                "FAILED" => Some(Self::Failed),
                _ => None,
            }
        }
    }
    /// The type of execution, could be on demand execute or scheduled execute.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        /// Type of execution is unspecified.
        Unspecified = 0,
        /// Type of execution is one time.
        OneTime = 1,
        /// Type of execution is scheduled.
        Scheduled = 2,
    }
    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 {
                Self::Unspecified => "TYPE_UNSPECIFIED",
                Self::OneTime => "ONE_TIME",
                Self::Scheduled => "SCHEDULED",
            }
        }
        /// 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),
                "ONE_TIME" => Some(Self::OneTime),
                "SCHEDULED" => Some(Self::Scheduled),
                _ => None,
            }
        }
    }
    /// The engine used for the execution.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Engine {
        /// The original CG.
        Unspecified = 0,
        /// SlimCG / Scanner.
        Scanner = 1,
        /// Evaluation Engine V2.
        V2 = 2,
    }
    impl Engine {
        /// 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 => "ENGINE_UNSPECIFIED",
                Self::Scanner => "ENGINE_SCANNER",
                Self::V2 => "V2",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "ENGINE_UNSPECIFIED" => Some(Self::Unspecified),
                "ENGINE_SCANNER" => Some(Self::Scanner),
                "V2" => Some(Self::V2),
                _ => None,
            }
        }
    }
}
/// Execution result summary per rule.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RuleExecutionResult {
    /// Rule name as plain text like `sap-hana-configured`.
    #[prost(string, tag = "1")]
    pub rule: ::prost::alloc::string::String,
    /// Output only. The execution status.
    #[prost(enumeration = "rule_execution_result::State", tag = "2")]
    pub state: i32,
    /// Execution message, if any.
    #[prost(string, tag = "3")]
    pub message: ::prost::alloc::string::String,
    /// Number of violations.
    #[prost(int64, tag = "4")]
    pub result_count: i64,
    /// Number of total scanned resources.
    #[prost(int64, tag = "5")]
    pub scanned_resource_count: i64,
}
/// Nested message and enum types in `RuleExecutionResult`.
pub mod rule_execution_result {
    /// Possible states of a rule execution like SUCCESS, FAILURE, etc.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Unknown state
        Unspecified = 0,
        /// Execution completed successfully
        Success = 1,
        /// Execution completed with failures
        Failure = 2,
        /// Execution was not executed
        Skipped = 3,
    }
    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::Success => "STATE_SUCCESS",
                Self::Failure => "STATE_FAILURE",
                Self::Skipped => "STATE_SKIPPED",
            }
        }
        /// 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),
                "STATE_SUCCESS" => Some(Self::Success),
                "STATE_FAILURE" => Some(Self::Failure),
                "STATE_SKIPPED" => Some(Self::Skipped),
                _ => None,
            }
        }
    }
}
/// Request message for the ListExecutions RPC.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListExecutionsRequest {
    /// Required. The resource prefix of the Execution using the form:
    /// `projects/{project}/locations/{location}/evaluations/{evaluation}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Requested page size. Server may return fewer items than requested.
    /// If unspecified, server will pick an appropriate default.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// A token identifying a page of results the server should return.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Filtering results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Field to sort by. See <https://google.aip.dev/132#ordering> for more details.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response message for the ListExecutions RPC.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListExecutionsResponse {
    /// The list of Execution.
    #[prost(message, repeated, tag = "1")]
    pub executions: ::prost::alloc::vec::Vec<Execution>,
    /// A token identifying a page of results the server should return.
    #[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>,
}
/// Request message for the GetExecution RPC.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetExecutionRequest {
    /// Required. Name of the resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for the RunEvaluation RPC.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RunEvaluationRequest {
    /// Required. The resource name of the Evaluation using the form:
    /// `projects/{project}/locations/{location}/evaluations/{evaluation}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. ID of the execution which will be created.
    #[prost(string, tag = "2")]
    pub execution_id: ::prost::alloc::string::String,
    /// Required. The resource being created.
    #[prost(message, optional, tag = "3")]
    pub execution: ::core::option::Option<Execution>,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// 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,
}
/// Request message for the DeleteExecution RPC.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteExecutionRequest {
    /// Required. Name of the resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes after the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// 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,
}
/// Request message for the ListExecutionResults RPC.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListExecutionResultsRequest {
    /// Required. The execution results.
    /// Format: {parent}/evaluations/*/executions/*/results.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Requested page size. Server may return fewer items than requested.
    /// If unspecified, server will pick an appropriate default.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// A token identifying a page of results the server should return.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Filtering results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
}
/// Response message for the ListExecutionResults RPC.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListExecutionResultsResponse {
    /// The versions from the specified publisher.
    #[prost(message, repeated, tag = "1")]
    pub execution_results: ::prost::alloc::vec::Vec<ExecutionResult>,
    /// 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,
}
/// The result of an execution.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionResult {
    /// The violation message of an execution.
    #[prost(string, tag = "1")]
    pub violation_message: ::prost::alloc::string::String,
    /// The severity of violation.
    #[prost(string, tag = "2")]
    pub severity: ::prost::alloc::string::String,
    /// The rule that is violated in an evaluation.
    #[prost(string, tag = "3")]
    pub rule: ::prost::alloc::string::String,
    /// The URL for the documentation of the rule.
    #[prost(string, tag = "4")]
    pub documentation_url: ::prost::alloc::string::String,
    /// The resource that violates the rule.
    #[prost(message, optional, tag = "5")]
    pub resource: ::core::option::Option<Resource>,
    /// The details of violation in an evaluation result.
    #[prost(message, optional, tag = "6")]
    pub violation_details: ::core::option::Option<ViolationDetails>,
    /// The commands to remediate the violation.
    #[prost(message, repeated, tag = "7")]
    pub commands: ::prost::alloc::vec::Vec<Command>,
    /// Execution result type of the scanned resource.
    #[prost(enumeration = "execution_result::Type", tag = "8")]
    pub r#type: i32,
}
/// Nested message and enum types in `ExecutionResult`.
pub mod execution_result {
    /// Enum of execution result type.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        /// Unknown state.
        Unspecified = 0,
        /// Resource successfully passed the rule.
        Passed = 1,
        /// Resource violated the rule.
        Violated = 2,
    }
    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 {
                Self::Unspecified => "TYPE_UNSPECIFIED",
                Self::Passed => "TYPE_PASSED",
                Self::Violated => "TYPE_VIOLATED",
            }
        }
        /// 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),
                "TYPE_PASSED" => Some(Self::Passed),
                "TYPE_VIOLATED" => Some(Self::Violated),
                _ => None,
            }
        }
    }
}
/// Command specifies the type of command to execute.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Command {
    /// The type of command.
    #[prost(oneof = "command::CommandType", tags = "1, 2")]
    pub command_type: ::core::option::Option<command::CommandType>,
}
/// Nested message and enum types in `Command`.
pub mod command {
    /// The type of command.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum CommandType {
        /// AgentCommand specifies a one-time executable program for the agent to
        /// run.
        #[prost(message, tag = "1")]
        AgentCommand(super::AgentCommand),
        /// ShellCommand is invoked via the agent's command line executor.
        #[prost(message, tag = "2")]
        ShellCommand(super::ShellCommand),
    }
}
/// An AgentCommand specifies a one-time executable program for the agent to run.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentCommand {
    /// The name of the agent one-time executable that will be invoked.
    #[prost(string, tag = "1")]
    pub command: ::prost::alloc::string::String,
    /// A map of key/value pairs that can be used to specify
    /// additional one-time executable settings.
    #[prost(map = "string, string", tag = "2")]
    pub parameters: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// A ShellCommand is invoked via the agent's command line executor.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ShellCommand {
    /// The name of the command to be executed.
    #[prost(string, tag = "1")]
    pub command: ::prost::alloc::string::String,
    /// Arguments to be passed to the command.
    #[prost(string, tag = "2")]
    pub args: ::prost::alloc::string::String,
    /// Optional. If not specified, the default timeout is 60 seconds.
    #[prost(int32, tag = "3")]
    pub timeout_seconds: i32,
}
/// The rule output of the violation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuleOutput {
    /// Output only. Violation details generated by rule.
    #[prost(map = "string, string", tag = "1")]
    pub details: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Output only. The message generated by rule.
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
}
/// The violation in an evaluation result.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ViolationDetails {
    /// The name of the asset.
    #[prost(string, tag = "1")]
    pub asset: ::prost::alloc::string::String,
    /// The service account associated with the resource.
    #[prost(string, tag = "2")]
    pub service_account: ::prost::alloc::string::String,
    /// Details of the violation.
    #[prost(map = "string, string", tag = "3")]
    pub observed: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Output only. The rule output of the violation.
    #[prost(message, repeated, tag = "4")]
    pub rule_output: ::prost::alloc::vec::Vec<RuleOutput>,
}
/// Resource in execution result.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Resource {
    /// The type of resource.
    #[prost(string, tag = "1")]
    pub r#type: ::prost::alloc::string::String,
    /// The name of the resource.
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    /// The service account associated with the resource.
    #[prost(string, tag = "3")]
    pub service_account: ::prost::alloc::string::String,
}
/// Represents the metadata of the long-running operation.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OperationMetadata {
    /// Output only. The time the operation was created.
    #[prost(message, optional, tag = "1")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time the operation finished running.
    #[prost(message, optional, tag = "2")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Server-defined resource path for the target of the operation.
    #[prost(string, tag = "3")]
    pub target: ::prost::alloc::string::String,
    /// Output only. Name of the verb executed by the operation.
    #[prost(string, tag = "4")]
    pub verb: ::prost::alloc::string::String,
    /// Output only. Human-readable status of the operation, if any.
    #[prost(string, tag = "5")]
    pub status_message: ::prost::alloc::string::String,
    /// Output only. Identifies whether the user has requested cancellation
    /// of the operation. Operations that have been cancelled successfully
    /// have \[Operation.error\]\[\] value with a
    /// \[google.rpc.Status.code\]\[google.rpc.Status.code\] of 1, corresponding to
    /// `Code.CANCELLED`.
    #[prost(bool, tag = "6")]
    pub requested_cancellation: bool,
    /// Output only. API version used to start the operation.
    #[prost(string, tag = "7")]
    pub api_version: ::prost::alloc::string::String,
}
/// A rule to be evaluated.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Rule {
    /// Rule name.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The version of the rule.
    #[prost(string, tag = "2")]
    pub revision_id: ::prost::alloc::string::String,
    /// The name display in UI.
    #[prost(string, tag = "3")]
    pub display_name: ::prost::alloc::string::String,
    /// Describe rule in plain language.
    #[prost(string, tag = "4")]
    pub description: ::prost::alloc::string::String,
    /// The severity of the rule.
    #[prost(string, tag = "5")]
    pub severity: ::prost::alloc::string::String,
    /// The primary category.
    #[prost(string, tag = "6")]
    pub primary_category: ::prost::alloc::string::String,
    /// The secondary category.
    #[prost(string, tag = "7")]
    pub secondary_category: ::prost::alloc::string::String,
    /// The message template for rule.
    #[prost(string, tag = "8")]
    pub error_message: ::prost::alloc::string::String,
    /// The document url for the rule.
    #[prost(string, tag = "9")]
    pub uri: ::prost::alloc::string::String,
    /// The remediation for the rule.
    #[prost(string, tag = "10")]
    pub remediation: ::prost::alloc::string::String,
    /// List of user-defined tags.
    #[prost(string, repeated, tag = "11")]
    pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The type of the rule.
    #[prost(enumeration = "rule::RuleType", tag = "12")]
    pub rule_type: i32,
    /// The CAI asset type of the rule is evaluating, for joined asset types, it
    /// will be the corresponding primary asset types.
    #[prost(string, tag = "13")]
    pub asset_type: ::prost::alloc::string::String,
}
/// Nested message and enum types in `Rule`.
pub mod rule {
    /// The type of the rule.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum RuleType {
        /// Not specified.
        Unspecified = 0,
        /// Baseline rules.
        Baseline = 1,
        /// Custom rules.
        Custom = 2,
    }
    impl RuleType {
        /// 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 => "RULE_TYPE_UNSPECIFIED",
                Self::Baseline => "BASELINE",
                Self::Custom => "CUSTOM",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "RULE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "BASELINE" => Some(Self::Baseline),
                "CUSTOM" => Some(Self::Custom),
                _ => None,
            }
        }
    }
}
/// Request message for the ListRules RPC.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListRulesRequest {
    /// Required. The \[project\] on which to execute the request. The format is:
    /// projects/{project_id}/locations/{location}
    /// Currently, the pre-defined rules are global available to all projects and
    /// all regions.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Requested page size. Server may return fewer items than requested.
    /// If unspecified, server will pick an appropriate default.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// A token identifying a page of results the server should return.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Filter based on primary_category, secondary_category.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// The Cloud Storage bucket name for custom rules.
    #[prost(string, tag = "5")]
    pub custom_rules_bucket: ::prost::alloc::string::String,
    /// Optional. The evaluation type of the rules will be applied to.
    /// The Cloud Storage bucket name for custom rules.
    #[prost(enumeration = "evaluation::EvaluationType", tag = "6")]
    pub evaluation_type: i32,
}
/// Response message for the ListRules RPC.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRulesResponse {
    /// All rules in response.
    #[prost(message, repeated, tag = "1")]
    pub rules: ::prost::alloc::vec::Vec<Rule>,
}
/// Request message for the ListScannedResources RPC.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListScannedResourcesRequest {
    /// Required. Parent for ListScannedResourcesRequest.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Rule name.
    #[prost(string, tag = "2")]
    pub rule: ::prost::alloc::string::String,
    /// Requested page size. Server may return fewer items than requested.
    /// If unspecified, server will pick an appropriate default.
    #[prost(int32, tag = "3")]
    pub page_size: i32,
    /// A token identifying a page of results the server should return.
    #[prost(string, tag = "4")]
    pub page_token: ::prost::alloc::string::String,
    /// Filtering results.
    #[prost(string, tag = "5")]
    pub filter: ::prost::alloc::string::String,
    /// Field to sort by. See <https://google.aip.dev/132#ordering> for more details.
    #[prost(string, tag = "6")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response message for the ListScannedResources RPC.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListScannedResourcesResponse {
    /// All scanned resources in response.
    #[prost(message, repeated, tag = "1")]
    pub scanned_resources: ::prost::alloc::vec::Vec<ScannedResource>,
    /// 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,
}
/// A scanned resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ScannedResource {
    /// Resource name.
    #[prost(string, tag = "1")]
    pub resource: ::prost::alloc::string::String,
    /// Resource type.
    #[prost(string, tag = "2")]
    pub r#type: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod workload_manager_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// The Workload Manager provides various tools to deploy, validate and observe
    /// your workloads running on Google Cloud.
    #[derive(Debug, Clone)]
    pub struct WorkloadManagerClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl WorkloadManagerClient<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> WorkloadManagerClient<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,
        ) -> WorkloadManagerClient<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,
        {
            WorkloadManagerClient::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 Evaluations in a given project and location.
        pub async fn list_evaluations(
            &mut self,
            request: impl tonic::IntoRequest<super::ListEvaluationsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListEvaluationsResponse>,
            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.workloadmanager.v1.WorkloadManager/ListEvaluations",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.workloadmanager.v1.WorkloadManager",
                        "ListEvaluations",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single Evaluation.
        pub async fn get_evaluation(
            &mut self,
            request: impl tonic::IntoRequest<super::GetEvaluationRequest>,
        ) -> std::result::Result<tonic::Response<super::Evaluation>, 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.workloadmanager.v1.WorkloadManager/GetEvaluation",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.workloadmanager.v1.WorkloadManager",
                        "GetEvaluation",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new Evaluation in a given project and location.
        pub async fn create_evaluation(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateEvaluationRequest>,
        ) -> 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.workloadmanager.v1.WorkloadManager/CreateEvaluation",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.workloadmanager.v1.WorkloadManager",
                        "CreateEvaluation",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a single Evaluation.
        pub async fn update_evaluation(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateEvaluationRequest>,
        ) -> 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.workloadmanager.v1.WorkloadManager/UpdateEvaluation",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.workloadmanager.v1.WorkloadManager",
                        "UpdateEvaluation",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single Evaluation.
        pub async fn delete_evaluation(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteEvaluationRequest>,
        ) -> 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.workloadmanager.v1.WorkloadManager/DeleteEvaluation",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.workloadmanager.v1.WorkloadManager",
                        "DeleteEvaluation",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists Executions in a given project and location.
        pub async fn list_executions(
            &mut self,
            request: impl tonic::IntoRequest<super::ListExecutionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListExecutionsResponse>,
            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.workloadmanager.v1.WorkloadManager/ListExecutions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.workloadmanager.v1.WorkloadManager",
                        "ListExecutions",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single Execution.
        pub async fn get_execution(
            &mut self,
            request: impl tonic::IntoRequest<super::GetExecutionRequest>,
        ) -> std::result::Result<tonic::Response<super::Execution>, 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.workloadmanager.v1.WorkloadManager/GetExecution",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.workloadmanager.v1.WorkloadManager",
                        "GetExecution",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new Execution in a given project and location.
        pub async fn run_evaluation(
            &mut self,
            request: impl tonic::IntoRequest<super::RunEvaluationRequest>,
        ) -> 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.workloadmanager.v1.WorkloadManager/RunEvaluation",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.workloadmanager.v1.WorkloadManager",
                        "RunEvaluation",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single Execution.
        pub async fn delete_execution(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteExecutionRequest>,
        ) -> 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.workloadmanager.v1.WorkloadManager/DeleteExecution",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.workloadmanager.v1.WorkloadManager",
                        "DeleteExecution",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists the result of a single evaluation.
        pub async fn list_execution_results(
            &mut self,
            request: impl tonic::IntoRequest<super::ListExecutionResultsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListExecutionResultsResponse>,
            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.workloadmanager.v1.WorkloadManager/ListExecutionResults",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.workloadmanager.v1.WorkloadManager",
                        "ListExecutionResults",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists rules in a given project.
        pub async fn list_rules(
            &mut self,
            request: impl tonic::IntoRequest<super::ListRulesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListRulesResponse>,
            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.workloadmanager.v1.WorkloadManager/ListRules",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.workloadmanager.v1.WorkloadManager",
                        "ListRules",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// List all scanned resources for a single Execution.
        pub async fn list_scanned_resources(
            &mut self,
            request: impl tonic::IntoRequest<super::ListScannedResourcesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListScannedResourcesResponse>,
            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.workloadmanager.v1.WorkloadManager/ListScannedResources",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.workloadmanager.v1.WorkloadManager",
                        "ListScannedResources",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}