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
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
// This file is @generated by prost-build.
/// An insight along with the information used to derive the insight. The insight
/// may have associated recommendations as well.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Insight {
    /// Name of the insight.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Free-form human readable summary in English. The maximum length is 500
    /// characters.
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    /// Fully qualified resource names that this insight is targeting.
    #[prost(string, repeated, tag = "9")]
    pub target_resources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Insight subtype. Insight content schema will be stable for a given subtype.
    #[prost(string, tag = "10")]
    pub insight_subtype: ::prost::alloc::string::String,
    /// A struct of custom fields to explain the insight.
    /// Example: "grantedPermissionsCount": "1000"
    #[prost(message, optional, tag = "3")]
    pub content: ::core::option::Option<::prost_types::Struct>,
    /// Timestamp of the latest data used to generate the insight.
    #[prost(message, optional, tag = "4")]
    pub last_refresh_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Observation period that led to the insight. The source data used to
    /// generate the insight ends at last_refresh_time and begins at
    /// (last_refresh_time - observation_period).
    #[prost(message, optional, tag = "5")]
    pub observation_period: ::core::option::Option<::prost_types::Duration>,
    /// Information state and metadata.
    #[prost(message, optional, tag = "6")]
    pub state_info: ::core::option::Option<InsightStateInfo>,
    /// Category being targeted by the insight.
    #[prost(enumeration = "insight::Category", tag = "7")]
    pub category: i32,
    /// Insight's severity.
    #[prost(enumeration = "insight::Severity", tag = "15")]
    pub severity: i32,
    /// Fingerprint of the Insight. Provides optimistic locking when updating
    /// states.
    #[prost(string, tag = "11")]
    pub etag: ::prost::alloc::string::String,
    /// Recommendations derived from this insight.
    #[prost(message, repeated, tag = "8")]
    pub associated_recommendations: ::prost::alloc::vec::Vec<
        insight::RecommendationReference,
    >,
}
/// Nested message and enum types in `Insight`.
pub mod insight {
    /// Reference to an associated recommendation.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RecommendationReference {
        /// Recommendation resource name, e.g.
        /// projects/\[PROJECT_NUMBER\]/locations/\[LOCATION\]/recommenders/\[RECOMMENDER_ID\]/recommendations/\[RECOMMENDATION_ID\]
        #[prost(string, tag = "1")]
        pub recommendation: ::prost::alloc::string::String,
    }
    /// Insight category.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Category {
        /// Unspecified category.
        Unspecified = 0,
        /// The insight is related to cost.
        Cost = 1,
        /// The insight is related to security.
        Security = 2,
        /// The insight is related to performance.
        Performance = 3,
        /// This insight is related to manageability.
        Manageability = 4,
    }
    impl Category {
        /// 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 {
                Category::Unspecified => "CATEGORY_UNSPECIFIED",
                Category::Cost => "COST",
                Category::Security => "SECURITY",
                Category::Performance => "PERFORMANCE",
                Category::Manageability => "MANAGEABILITY",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CATEGORY_UNSPECIFIED" => Some(Self::Unspecified),
                "COST" => Some(Self::Cost),
                "SECURITY" => Some(Self::Security),
                "PERFORMANCE" => Some(Self::Performance),
                "MANAGEABILITY" => Some(Self::Manageability),
                _ => None,
            }
        }
    }
    /// Insight severity levels.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Severity {
        /// Insight has unspecified severity.
        Unspecified = 0,
        /// Insight has low severity.
        Low = 1,
        /// Insight has medium severity.
        Medium = 2,
        /// Insight has high severity.
        High = 3,
        /// Insight has critical severity.
        Critical = 4,
    }
    impl Severity {
        /// 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 {
                Severity::Unspecified => "SEVERITY_UNSPECIFIED",
                Severity::Low => "LOW",
                Severity::Medium => "MEDIUM",
                Severity::High => "HIGH",
                Severity::Critical => "CRITICAL",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "SEVERITY_UNSPECIFIED" => Some(Self::Unspecified),
                "LOW" => Some(Self::Low),
                "MEDIUM" => Some(Self::Medium),
                "HIGH" => Some(Self::High),
                "CRITICAL" => Some(Self::Critical),
                _ => None,
            }
        }
    }
}
/// Information related to insight state.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InsightStateInfo {
    /// Insight state.
    #[prost(enumeration = "insight_state_info::State", tag = "1")]
    pub state: i32,
    /// A map of metadata for the state, provided by user or automations systems.
    #[prost(btree_map = "string, string", tag = "2")]
    pub state_metadata: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// Nested message and enum types in `InsightStateInfo`.
pub mod insight_state_info {
    /// Represents insight state.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Unspecified state.
        Unspecified = 0,
        /// Insight is active. Content for ACTIVE insights can be updated by Google.
        /// ACTIVE insights can be marked DISMISSED OR ACCEPTED.
        Active = 1,
        /// Some action has been taken based on this insight. Insights become
        /// accepted when a recommendation derived from the insight has been marked
        /// CLAIMED, SUCCEEDED, or FAILED. ACTIVE insights can also be marked
        /// ACCEPTED explicitly. Content for ACCEPTED insights is immutable. ACCEPTED
        /// insights can only be marked ACCEPTED (which may update state metadata).
        Accepted = 2,
        /// Insight is dismissed. Content for DISMISSED insights can be updated by
        /// Google. DISMISSED insights can be marked as ACTIVE.
        Dismissed = 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 {
                State::Unspecified => "STATE_UNSPECIFIED",
                State::Active => "ACTIVE",
                State::Accepted => "ACCEPTED",
                State::Dismissed => "DISMISSED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "ACTIVE" => Some(Self::Active),
                "ACCEPTED" => Some(Self::Accepted),
                "DISMISSED" => Some(Self::Dismissed),
                _ => None,
            }
        }
    }
}
/// The type of insight.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InsightType {
    /// The insight_type’s name in format insightTypes/{insight_type}
    /// eg: insightTypes/google.iam.policy.Insight
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// A recommendation along with a suggested action. E.g., a rightsizing
/// recommendation for an underutilized VM, IAM role recommendations, etc
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Recommendation {
    /// Name of recommendation.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Free-form human readable summary in English. The maximum length is 500
    /// characters.
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    /// Contains an identifier for a subtype of recommendations produced for the
    /// same recommender. Subtype is a function of content and impact, meaning a
    /// new subtype might be added when significant changes to `content` or
    /// `primary_impact.category` are introduced. See the Recommenders section
    /// to see a list of subtypes for a given Recommender.
    ///
    /// Examples:
    ///    For recommender = "google.iam.policy.Recommender",
    ///    recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE"
    #[prost(string, tag = "12")]
    pub recommender_subtype: ::prost::alloc::string::String,
    /// Last time this recommendation was refreshed by the system that created it
    /// in the first place.
    #[prost(message, optional, tag = "4")]
    pub last_refresh_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The primary impact that this recommendation can have while trying to
    /// optimize for one category.
    #[prost(message, optional, tag = "5")]
    pub primary_impact: ::core::option::Option<Impact>,
    /// Optional set of additional impact that this recommendation may have when
    /// trying to optimize for the primary category. These may be positive
    /// or negative.
    #[prost(message, repeated, tag = "6")]
    pub additional_impact: ::prost::alloc::vec::Vec<Impact>,
    /// Recommendation's priority.
    #[prost(enumeration = "recommendation::Priority", tag = "17")]
    pub priority: i32,
    /// Content of the recommendation describing recommended changes to resources.
    #[prost(message, optional, tag = "7")]
    pub content: ::core::option::Option<RecommendationContent>,
    /// Information for state. Contains state and metadata.
    #[prost(message, optional, tag = "10")]
    pub state_info: ::core::option::Option<RecommendationStateInfo>,
    /// Fingerprint of the Recommendation. Provides optimistic locking when
    /// updating states.
    #[prost(string, tag = "11")]
    pub etag: ::prost::alloc::string::String,
    /// Insights that led to this recommendation.
    #[prost(message, repeated, tag = "14")]
    pub associated_insights: ::prost::alloc::vec::Vec<recommendation::InsightReference>,
    /// Corresponds to a mutually exclusive group ID within a recommender.
    /// A non-empty ID indicates that the recommendation belongs to a mutually
    /// exclusive group. This means that only one recommendation within the group
    /// is suggested to be applied.
    #[prost(string, tag = "18")]
    pub xor_group_id: ::prost::alloc::string::String,
}
/// Nested message and enum types in `Recommendation`.
pub mod recommendation {
    /// Reference to an associated insight.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct InsightReference {
        /// Insight resource name, e.g.
        /// projects/\[PROJECT_NUMBER\]/locations/\[LOCATION\]/insightTypes/\[INSIGHT_TYPE_ID\]/insights/\[INSIGHT_ID\]
        #[prost(string, tag = "1")]
        pub insight: ::prost::alloc::string::String,
    }
    /// Recommendation priority levels.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Priority {
        /// Recommendation has unspecified priority.
        Unspecified = 0,
        /// Recommendation has P4 priority (lowest priority).
        P4 = 1,
        /// Recommendation has P3 priority (second lowest priority).
        P3 = 2,
        /// Recommendation has P2 priority (second highest priority).
        P2 = 3,
        /// Recommendation has P1 priority (highest priority).
        P1 = 4,
    }
    impl Priority {
        /// 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 {
                Priority::Unspecified => "PRIORITY_UNSPECIFIED",
                Priority::P4 => "P4",
                Priority::P3 => "P3",
                Priority::P2 => "P2",
                Priority::P1 => "P1",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "PRIORITY_UNSPECIFIED" => Some(Self::Unspecified),
                "P4" => Some(Self::P4),
                "P3" => Some(Self::P3),
                "P2" => Some(Self::P2),
                "P1" => Some(Self::P1),
                _ => None,
            }
        }
    }
}
/// Contains what resources are changing and how they are changing.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecommendationContent {
    /// Operations to one or more Google Cloud resources grouped in such a way
    /// that, all operations within one group are expected to be performed
    /// atomically and in an order.
    #[prost(message, repeated, tag = "2")]
    pub operation_groups: ::prost::alloc::vec::Vec<OperationGroup>,
    /// Condensed overview information about the recommendation.
    #[prost(message, optional, tag = "3")]
    pub overview: ::core::option::Option<::prost_types::Struct>,
}
/// Group of operations that need to be performed atomically.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationGroup {
    /// List of operations across one or more resources that belong to this group.
    /// Loosely based on RFC6902 and should be performed in the order they appear.
    #[prost(message, repeated, tag = "1")]
    pub operations: ::prost::alloc::vec::Vec<Operation>,
}
/// Contains an operation for a resource loosely based on the JSON-PATCH format
/// with support for:
///
/// * Custom filters for describing partial array patch.
/// * Extended path values for describing nested arrays.
/// * Custom fields for describing the resource for which the operation is being
///    described.
/// * Allows extension to custom operations not natively supported by RFC6902.
/// See <https://tools.ietf.org/html/rfc6902> for details on the original RFC.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Operation {
    /// Type of this operation. Contains one of 'add', 'remove', 'replace', 'move',
    /// 'copy', 'test' and 'custom' operations. This field is case-insensitive and
    /// always populated.
    #[prost(string, tag = "1")]
    pub action: ::prost::alloc::string::String,
    /// Type of GCP resource being modified/tested. This field is always populated.
    /// Example: cloudresourcemanager.googleapis.com/Project,
    /// compute.googleapis.com/Instance
    #[prost(string, tag = "2")]
    pub resource_type: ::prost::alloc::string::String,
    /// Contains the fully qualified resource name. This field is always populated.
    /// ex: //cloudresourcemanager.googleapis.com/projects/foo.
    #[prost(string, tag = "3")]
    pub resource: ::prost::alloc::string::String,
    /// Path to the target field being operated on. If the operation is at the
    /// resource level, then path should be "/". This field is always populated.
    #[prost(string, tag = "4")]
    pub path: ::prost::alloc::string::String,
    /// Can be set with action 'copy' to copy resource configuration across
    /// different resources of the same type. Example: A resource clone can be
    /// done via action = 'copy', path = "/", from = "/",
    /// source_resource = <source> and resource_name = <target>.
    /// This field is empty for all other values of `action`.
    #[prost(string, tag = "5")]
    pub source_resource: ::prost::alloc::string::String,
    /// Can be set with action 'copy' or 'move' to indicate the source field within
    /// resource or source_resource, ignored if provided for other operation types.
    #[prost(string, tag = "6")]
    pub source_path: ::prost::alloc::string::String,
    /// Set of filters to apply if `path` refers to array elements or nested array
    /// elements in order to narrow down to a single unique element that is being
    /// tested/modified.
    /// This is intended to be an exact match per filter. To perform advanced
    /// matching, use path_value_matchers.
    ///
    /// * Example:
    /// ```
    /// {
    ///    "/versions/*/name" : "it-123"
    ///    "/versions/*/targetSize/percent": 20
    /// }
    /// ```
    /// * Example:
    /// ```
    /// {
    ///    "/bindings/*/role": "roles/owner"
    ///    "/bindings/*/condition" : null
    /// }
    /// ```
    /// * Example:
    /// ```
    /// {
    ///    "/bindings/*/role": "roles/owner"
    ///    "/bindings/*/members/*" : \["x@example.com", "y@example.com"\]
    /// }
    /// ```
    /// When both path_filters and path_value_matchers are set, an implicit AND
    /// must be performed.
    #[prost(btree_map = "string, message", tag = "8")]
    pub path_filters: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost_types::Value,
    >,
    /// Similar to path_filters, this contains set of filters to apply if `path`
    /// field refers to array elements. This is meant to support value matching
    /// beyond exact match. To perform exact match, use path_filters.
    /// When both path_filters and path_value_matchers are set, an implicit AND
    /// must be performed.
    #[prost(btree_map = "string, message", tag = "11")]
    pub path_value_matchers: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ValueMatcher,
    >,
    /// One of the fields in the following block will be set and intend to
    /// describe a value for 'path' field.
    #[prost(oneof = "operation::PathValue", tags = "7, 10")]
    pub path_value: ::core::option::Option<operation::PathValue>,
}
/// Nested message and enum types in `Operation`.
pub mod operation {
    /// One of the fields in the following block will be set and intend to
    /// describe a value for 'path' field.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum PathValue {
        /// Value for the `path` field. Will be set for actions:'add'/'replace'.
        /// Maybe set for action: 'test'. Either this or `value_matcher` will be set
        /// for 'test' operation. An exact match must be performed.
        #[prost(message, tag = "7")]
        Value(::prost_types::Value),
        /// Can be set for action 'test' for advanced matching for the value of
        /// 'path' field. Either this or `value` will be set for 'test' operation.
        #[prost(message, tag = "10")]
        ValueMatcher(super::ValueMatcher),
    }
}
/// Contains various matching options for values for a GCP resource field.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValueMatcher {
    #[prost(oneof = "value_matcher::MatchVariant", tags = "1")]
    pub match_variant: ::core::option::Option<value_matcher::MatchVariant>,
}
/// Nested message and enum types in `ValueMatcher`.
pub mod value_matcher {
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum MatchVariant {
        /// To be used for full regex matching. The regular expression is using the
        /// Google RE2 syntax (<https://github.com/google/re2/wiki/Syntax>), so to be
        /// used with RE2::FullMatch
        #[prost(string, tag = "1")]
        MatchesPattern(::prost::alloc::string::String),
    }
}
/// Contains metadata about how much money a recommendation can save or incur.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CostProjection {
    /// An approximate projection on amount saved or amount incurred. Negative cost
    /// units indicate cost savings and positive cost units indicate increase.
    /// See google.type.Money documentation for positive/negative units.
    ///
    /// A user's permissions may affect whether the cost is computed using list
    /// prices or custom contract prices.
    #[prost(message, optional, tag = "1")]
    pub cost: ::core::option::Option<super::super::super::r#type::Money>,
    /// Duration for which this cost applies.
    #[prost(message, optional, tag = "2")]
    pub duration: ::core::option::Option<::prost_types::Duration>,
}
/// Contains various ways of describing the impact on Security.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SecurityProjection {
    /// This field can be used by the recommender to define details specific to
    /// security impact.
    #[prost(message, optional, tag = "2")]
    pub details: ::core::option::Option<::prost_types::Struct>,
}
/// Contains metadata about how much sustainability a recommendation can save or
/// incur.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SustainabilityProjection {
    /// Carbon Footprint generated in kg of CO2 equivalent.
    /// Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).
    #[prost(double, tag = "1")]
    pub kg_c_o2e: f64,
    /// Duration for which this sustanability applies.
    #[prost(message, optional, tag = "2")]
    pub duration: ::core::option::Option<::prost_types::Duration>,
}
/// Contains the impact a recommendation can have for a given category.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Impact {
    /// Category that is being targeted.
    #[prost(enumeration = "impact::Category", tag = "1")]
    pub category: i32,
    /// Contains projections (if any) for this category.
    #[prost(oneof = "impact::Projection", tags = "100, 101, 102")]
    pub projection: ::core::option::Option<impact::Projection>,
}
/// Nested message and enum types in `Impact`.
pub mod impact {
    /// The category of the impact.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Category {
        /// Default unspecified category. Don't use directly.
        Unspecified = 0,
        /// Indicates a potential increase or decrease in cost.
        Cost = 1,
        /// Indicates a potential increase or decrease in security.
        Security = 2,
        /// Indicates a potential increase or decrease in performance.
        Performance = 3,
        /// Indicates a potential increase or decrease in manageability.
        Manageability = 4,
        /// Indicates a potential increase or decrease in sustainability.
        Sustainability = 5,
    }
    impl Category {
        /// 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 {
                Category::Unspecified => "CATEGORY_UNSPECIFIED",
                Category::Cost => "COST",
                Category::Security => "SECURITY",
                Category::Performance => "PERFORMANCE",
                Category::Manageability => "MANAGEABILITY",
                Category::Sustainability => "SUSTAINABILITY",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CATEGORY_UNSPECIFIED" => Some(Self::Unspecified),
                "COST" => Some(Self::Cost),
                "SECURITY" => Some(Self::Security),
                "PERFORMANCE" => Some(Self::Performance),
                "MANAGEABILITY" => Some(Self::Manageability),
                "SUSTAINABILITY" => Some(Self::Sustainability),
                _ => None,
            }
        }
    }
    /// Contains projections (if any) for this category.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Projection {
        /// Use with CategoryType.COST
        #[prost(message, tag = "100")]
        CostProjection(super::CostProjection),
        /// Use with CategoryType.SECURITY
        #[prost(message, tag = "101")]
        SecurityProjection(super::SecurityProjection),
        /// Use with CategoryType.SUSTAINABILITY
        #[prost(message, tag = "102")]
        SustainabilityProjection(super::SustainabilityProjection),
    }
}
/// Information for state. Contains state and metadata.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecommendationStateInfo {
    /// The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
    #[prost(enumeration = "recommendation_state_info::State", tag = "1")]
    pub state: i32,
    /// A map of metadata for the state, provided by user or automations systems.
    #[prost(btree_map = "string, string", tag = "2")]
    pub state_metadata: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// Nested message and enum types in `RecommendationStateInfo`.
pub mod recommendation_state_info {
    /// Represents Recommendation State.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Default state. Don't use directly.
        Unspecified = 0,
        /// Recommendation is active and can be applied. Recommendations content can
        /// be updated by Google.
        ///
        /// ACTIVE recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED.
        Active = 1,
        /// Recommendation is in claimed state. Recommendations content is
        /// immutable and cannot be updated by Google.
        ///
        /// CLAIMED recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED.
        Claimed = 6,
        /// Recommendation is in succeeded state. Recommendations content is
        /// immutable and cannot be updated by Google.
        ///
        /// SUCCEEDED recommendations can be marked as SUCCEEDED, or FAILED.
        Succeeded = 3,
        /// Recommendation is in failed state. Recommendations content is immutable
        /// and cannot be updated by Google.
        ///
        /// FAILED recommendations can be marked as SUCCEEDED, or FAILED.
        Failed = 4,
        /// Recommendation is in dismissed state. Recommendation content can be
        /// updated by Google.
        ///
        /// DISMISSED recommendations can be marked as ACTIVE.
        Dismissed = 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 {
                State::Unspecified => "STATE_UNSPECIFIED",
                State::Active => "ACTIVE",
                State::Claimed => "CLAIMED",
                State::Succeeded => "SUCCEEDED",
                State::Failed => "FAILED",
                State::Dismissed => "DISMISSED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "ACTIVE" => Some(Self::Active),
                "CLAIMED" => Some(Self::Claimed),
                "SUCCEEDED" => Some(Self::Succeeded),
                "FAILED" => Some(Self::Failed),
                "DISMISSED" => Some(Self::Dismissed),
                _ => None,
            }
        }
    }
}
/// The type of a recommender.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecommenderType {
    /// The recommender's name in format RecommenderTypes/{recommender_type}
    /// eg:  recommenderTypes/google.iam.policy.Recommender
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Configuration for a Recommender.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecommenderConfig {
    /// Name of recommender config.
    /// Eg,
    /// projects/\[PROJECT_NUMBER\]/locations/\[LOCATION\]/recommenders/\[RECOMMENDER_ID\]/config
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// RecommenderGenerationConfig which configures the Generation of
    /// recommendations for this recommender.
    #[prost(message, optional, tag = "2")]
    pub recommender_generation_config: ::core::option::Option<
        RecommenderGenerationConfig,
    >,
    /// Fingerprint of the RecommenderConfig. Provides optimistic locking when
    /// updating.
    #[prost(string, tag = "3")]
    pub etag: ::prost::alloc::string::String,
    /// Last time when the config was updated.
    #[prost(message, optional, tag = "4")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Immutable. The revision ID of the config.
    /// A new revision is committed whenever the config is changed in any way.
    /// The format is an 8-character hexadecimal string.
    #[prost(string, tag = "5")]
    pub revision_id: ::prost::alloc::string::String,
    /// Allows clients to store small amounts of arbitrary data. Annotations must
    /// follow the Kubernetes syntax.
    /// The total size of all keys and values combined is limited to 256k.
    /// Key can have 2 segments: prefix (optional) and name (required),
    /// separated by a slash (/).
    /// Prefix must be a DNS subdomain.
    /// Name must be 63 characters or less, begin and end with alphanumerics,
    /// with dashes (-), underscores (_), dots (.), and alphanumerics between.
    #[prost(btree_map = "string, string", tag = "6")]
    pub annotations: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// A user-settable field to provide a human-readable name to be used in user
    /// interfaces.
    #[prost(string, tag = "7")]
    pub display_name: ::prost::alloc::string::String,
}
/// A Configuration to customize the generation of recommendations.
/// Eg, customizing the lookback period considered when generating a
/// recommendation.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecommenderGenerationConfig {
    /// Parameters for this RecommenderGenerationConfig. These configs can be used
    /// by or are applied to all subtypes.
    #[prost(message, optional, tag = "1")]
    pub params: ::core::option::Option<::prost_types::Struct>,
}
/// Configuration for an InsightType.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InsightTypeConfig {
    /// Name of insight type config.
    /// Eg,
    /// projects/\[PROJECT_NUMBER\]/locations/\[LOCATION\]/insightTypes/\[INSIGHT_TYPE_ID\]/config
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// InsightTypeGenerationConfig which configures the generation of
    /// insights for this insight type.
    #[prost(message, optional, tag = "2")]
    pub insight_type_generation_config: ::core::option::Option<
        InsightTypeGenerationConfig,
    >,
    /// Fingerprint of the InsightTypeConfig. Provides optimistic locking when
    /// updating.
    #[prost(string, tag = "3")]
    pub etag: ::prost::alloc::string::String,
    /// Last time when the config was updated.
    #[prost(message, optional, tag = "4")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Immutable. The revision ID of the config.
    /// A new revision is committed whenever the config is changed in any way.
    /// The format is an 8-character hexadecimal string.
    #[prost(string, tag = "5")]
    pub revision_id: ::prost::alloc::string::String,
    /// Allows clients to store small amounts of arbitrary data. Annotations must
    /// follow the Kubernetes syntax.
    /// The total size of all keys and values combined is limited to 256k.
    /// Key can have 2 segments: prefix (optional) and name (required),
    /// separated by a slash (/).
    /// Prefix must be a DNS subdomain.
    /// Name must be 63 characters or less, begin and end with alphanumerics,
    /// with dashes (-), underscores (_), dots (.), and alphanumerics between.
    #[prost(btree_map = "string, string", tag = "6")]
    pub annotations: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// A user-settable field to provide a human-readable name to be used in user
    /// interfaces.
    #[prost(string, tag = "7")]
    pub display_name: ::prost::alloc::string::String,
}
/// A configuration to customize the generation of insights.
/// Eg, customizing the lookback period considered when generating a
/// insight.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InsightTypeGenerationConfig {
    /// Parameters for this InsightTypeGenerationConfig. These configs can be used
    /// by or are applied to all subtypes.
    #[prost(message, optional, tag = "1")]
    pub params: ::core::option::Option<::prost_types::Struct>,
}
/// Request for the `ListInsights` method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInsightsRequest {
    /// Required. The container resource on which to execute the request.
    /// Acceptable formats:
    ///
    /// * `projects/\[PROJECT_NUMBER\]/locations/\[LOCATION\]/insightTypes/\[INSIGHT_TYPE_ID\]`
    ///
    /// * `projects/\[PROJECT_ID\]/locations/\[LOCATION\]/insightTypes/\[INSIGHT_TYPE_ID\]`
    ///
    /// * `billingAccounts/\[BILLING_ACCOUNT_ID\]/locations/\[LOCATION\]/insightTypes/\[INSIGHT_TYPE_ID\]`
    ///
    /// * `folders/\[FOLDER_ID\]/locations/\[LOCATION\]/insightTypes/\[INSIGHT_TYPE_ID\]`
    ///
    /// * `organizations/\[ORGANIZATION_ID\]/locations/\[LOCATION\]/insightTypes/\[INSIGHT_TYPE_ID\]`
    ///
    /// LOCATION here refers to GCP Locations:
    /// <https://cloud.google.com/about/locations/>
    /// INSIGHT_TYPE_ID refers to supported insight types:
    /// <https://cloud.google.com/recommender/docs/insights/insight-types.>
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of results to return from this request.
    /// Non-positive values are ignored. If not specified, the server will
    /// determine the number of results to return.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. If present, retrieves the next batch of results from the
    /// preceding call to this method. `page_token` must be the value of
    /// `next_page_token` from the previous response. The values of other method
    /// parameters must be identical to those in the previous call.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. Filter expression to restrict the insights returned. Supported
    /// filter fields:
    ///
    /// * `stateInfo.state`
    ///
    /// * `insightSubtype`
    ///
    /// * `severity`
    ///
    /// Examples:
    ///
    /// * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED`
    ///
    /// * `insightSubtype = PERMISSIONS_USAGE`
    ///
    /// * `severity = CRITICAL OR severity = HIGH`
    ///
    /// * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)`
    ///
    /// (These expressions are based on the filter language described at
    /// <https://google.aip.dev/160>)
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
}
/// Response to the `ListInsights` method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInsightsResponse {
    /// The set of insights for the `parent` resource.
    #[prost(message, repeated, tag = "1")]
    pub insights: ::prost::alloc::vec::Vec<Insight>,
    /// A token that can be used to request the next page of results. This field is
    /// empty if there are no additional results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Request to the `GetInsight` method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetInsightRequest {
    /// Required. Name of the insight.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for the `MarkInsightAccepted` method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarkInsightAcceptedRequest {
    /// Required. Name of the insight.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. State properties user wish to include with this state.  Full
    /// replace of the current state_metadata.
    #[prost(btree_map = "string, string", tag = "2")]
    pub state_metadata: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Required. Fingerprint of the Insight. Provides optimistic locking.
    #[prost(string, tag = "3")]
    pub etag: ::prost::alloc::string::String,
}
/// Request for the `ListRecommendations` method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRecommendationsRequest {
    /// Required. The container resource on which to execute the request.
    /// Acceptable formats:
    ///
    /// * `projects/\[PROJECT_NUMBER\]/locations/\[LOCATION\]/recommenders/\[RECOMMENDER_ID\]`
    ///
    /// * `projects/\[PROJECT_ID\]/locations/\[LOCATION\]/recommenders/\[RECOMMENDER_ID\]`
    ///
    /// * `billingAccounts/\[BILLING_ACCOUNT_ID\]/locations/\[LOCATION\]/recommenders/\[RECOMMENDER_ID\]`
    ///
    /// * `folders/\[FOLDER_ID\]/locations/\[LOCATION\]/recommenders/\[RECOMMENDER_ID\]`
    ///
    /// * `organizations/\[ORGANIZATION_ID\]/locations/\[LOCATION\]/recommenders/\[RECOMMENDER_ID\]`
    ///
    /// LOCATION here refers to GCP Locations:
    /// <https://cloud.google.com/about/locations/>
    /// RECOMMENDER_ID refers to supported recommenders:
    /// <https://cloud.google.com/recommender/docs/recommenders.>
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of results to return from this request.
    /// Non-positive values are ignored. If not specified, the server will
    /// determine the number of results to return.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. If present, retrieves the next batch of results from the
    /// preceding call to this method. `page_token` must be the value of
    /// `next_page_token` from the previous response. The values of other method
    /// parameters must be identical to those in the previous call.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Filter expression to restrict the recommendations returned. Supported
    /// filter fields:
    ///
    /// * `state_info.state`
    ///
    /// * `recommenderSubtype`
    ///
    /// * `priority`
    ///
    /// Examples:
    ///
    /// * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED`
    ///
    /// * `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE`
    ///
    /// * `priority = P1 OR priority = P2`
    ///
    /// * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)`
    ///
    /// (These expressions are based on the filter language described at
    /// <https://google.aip.dev/160>)
    #[prost(string, tag = "5")]
    pub filter: ::prost::alloc::string::String,
}
/// Response to the `ListRecommendations` method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRecommendationsResponse {
    /// The set of recommendations for the `parent` resource.
    #[prost(message, repeated, tag = "1")]
    pub recommendations: ::prost::alloc::vec::Vec<Recommendation>,
    /// A token that can be used to request the next page of results. This field is
    /// empty if there are no additional results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Request to the `GetRecommendation` method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRecommendationRequest {
    /// Required. Name of the recommendation.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for the `MarkRecommendationClaimed` Method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarkRecommendationClaimedRequest {
    /// Required. Name of the recommendation.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// State properties to include with this state. Overwrites any existing
    /// `state_metadata`.
    /// Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`.
    /// Values must match the regex `/^\[a-zA-Z0-9_./-\]{0,255}$/`.
    #[prost(btree_map = "string, string", tag = "2")]
    pub state_metadata: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Required. Fingerprint of the Recommendation. Provides optimistic locking.
    #[prost(string, tag = "3")]
    pub etag: ::prost::alloc::string::String,
}
/// Request for the `MarkRecommendationSucceeded` Method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarkRecommendationSucceededRequest {
    /// Required. Name of the recommendation.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// State properties to include with this state. Overwrites any existing
    /// `state_metadata`.
    /// Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`.
    /// Values must match the regex `/^\[a-zA-Z0-9_./-\]{0,255}$/`.
    #[prost(btree_map = "string, string", tag = "2")]
    pub state_metadata: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Required. Fingerprint of the Recommendation. Provides optimistic locking.
    #[prost(string, tag = "3")]
    pub etag: ::prost::alloc::string::String,
}
/// Request for the `MarkRecommendationFailed` Method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarkRecommendationFailedRequest {
    /// Required. Name of the recommendation.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// State properties to include with this state. Overwrites any existing
    /// `state_metadata`.
    /// Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`.
    /// Values must match the regex `/^\[a-zA-Z0-9_./-\]{0,255}$/`.
    #[prost(btree_map = "string, string", tag = "2")]
    pub state_metadata: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Required. Fingerprint of the Recommendation. Provides optimistic locking.
    #[prost(string, tag = "3")]
    pub etag: ::prost::alloc::string::String,
}
/// Request for the GetRecommenderConfig` method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRecommenderConfigRequest {
    /// Required. Name of the Recommendation Config to get.
    ///
    /// Acceptable formats:
    ///
    /// * `projects/\[PROJECT_NUMBER\]/locations/\[LOCATION\]/recommenders/\[RECOMMENDER_ID\]/config`
    ///
    /// * `projects/\[PROJECT_ID\]/locations/\[LOCATION\]/recommenders/\[RECOMMENDER_ID\]/config`
    ///
    /// * `organizations/\[ORGANIZATION_ID\]/locations/\[LOCATION\]/recommenders/\[RECOMMENDER_ID\]/config`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for the `UpdateRecommenderConfig` method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateRecommenderConfigRequest {
    /// Required. The RecommenderConfig to update.
    #[prost(message, optional, tag = "1")]
    pub recommender_config: ::core::option::Option<RecommenderConfig>,
    /// The list of fields to be updated.
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// If true, validate the request and preview the change, but do not actually
    /// update it.
    #[prost(bool, tag = "3")]
    pub validate_only: bool,
}
/// Request for the GetInsightTypeConfig` method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetInsightTypeConfigRequest {
    /// Required. Name of the InsightTypeConfig to get.
    ///
    /// Acceptable formats:
    ///
    /// * `projects/\[PROJECT_NUMBER\]/locations/global/recommenders/\[INSIGHT_TYPE_ID\]/config`
    ///
    /// * `projects/\[PROJECT_ID\]/locations/global/recommenders/\[INSIGHT_TYPE_ID\]/config`
    ///
    /// * `organizations/\[ORGANIZATION_ID\]/locations/global/recommenders/\[INSIGHT_TYPE_ID\]/config`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for the `UpdateInsightTypeConfig` method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateInsightTypeConfigRequest {
    /// Required. The InsightTypeConfig to update.
    #[prost(message, optional, tag = "1")]
    pub insight_type_config: ::core::option::Option<InsightTypeConfig>,
    /// The list of fields to be updated.
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// If true, validate the request and preview the change, but do not actually
    /// update it.
    #[prost(bool, tag = "3")]
    pub validate_only: bool,
}
/// Request for the `ListRecommender` method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRecommendersRequest {
    /// The number of RecommenderTypes to return per page. The service may return
    /// fewer than this value.
    #[prost(int32, tag = "1")]
    pub page_size: i32,
    /// A page token, received from a previous `ListRecommenders` call.
    /// Provide this to retrieve the subsequent page.
    #[prost(string, tag = "2")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response for the `ListRecommender` method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRecommendersResponse {
    /// The set of recommenders available
    #[prost(message, repeated, tag = "1")]
    pub recommenders: ::prost::alloc::vec::Vec<RecommenderType>,
    /// 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,
}
/// Request for the `ListInsightTypes` method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInsightTypesRequest {
    /// The number of InsightTypes to return per page. The service may return
    /// fewer than this value.
    #[prost(int32, tag = "1")]
    pub page_size: i32,
    /// A page token, received from a previous `ListRecommenders` call.
    /// Provide this to retrieve the subsequent page.
    #[prost(string, tag = "2")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response for the `ListInsightTypes` method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInsightTypesResponse {
    /// The set of recommenders available
    #[prost(message, repeated, tag = "1")]
    pub insight_types: ::prost::alloc::vec::Vec<InsightType>,
    /// 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,
}
/// Generated client implementations.
pub mod recommender_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Provides insights and recommendations for cloud customers for various
    /// categories like performance optimization, cost savings, reliability, feature
    /// discovery, etc. Insights and recommendations are generated automatically
    /// based on analysis of user resources, configuration and monitoring metrics.
    #[derive(Debug, Clone)]
    pub struct RecommenderClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> RecommenderClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + 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,
        ) -> RecommenderClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + Send + Sync,
        {
            RecommenderClient::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 insights for the specified Cloud Resource. Requires the
        /// recommender.*.list IAM permission for the specified insight type.
        pub async fn list_insights(
            &mut self,
            request: impl tonic::IntoRequest<super::ListInsightsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListInsightsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.recommender.v1beta1.Recommender/ListInsights",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recommender.v1beta1.Recommender",
                        "ListInsights",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the requested insight. Requires the recommender.*.get IAM permission
        /// for the specified insight type.
        pub async fn get_insight(
            &mut self,
            request: impl tonic::IntoRequest<super::GetInsightRequest>,
        ) -> std::result::Result<tonic::Response<super::Insight>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.recommender.v1beta1.Recommender/GetInsight",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recommender.v1beta1.Recommender",
                        "GetInsight",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Marks the Insight State as Accepted. Users can use this method to
        /// indicate to the Recommender API that they have applied some action based
        /// on the insight. This stops the insight content from being updated.
        ///
        /// MarkInsightAccepted can be applied to insights in ACTIVE state. Requires
        /// the recommender.*.update IAM permission for the specified insight.
        pub async fn mark_insight_accepted(
            &mut self,
            request: impl tonic::IntoRequest<super::MarkInsightAcceptedRequest>,
        ) -> std::result::Result<tonic::Response<super::Insight>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.recommender.v1beta1.Recommender/MarkInsightAccepted",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recommender.v1beta1.Recommender",
                        "MarkInsightAccepted",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists recommendations for the specified Cloud Resource. Requires the
        /// recommender.*.list IAM permission for the specified recommender.
        pub async fn list_recommendations(
            &mut self,
            request: impl tonic::IntoRequest<super::ListRecommendationsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListRecommendationsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.recommender.v1beta1.Recommender/ListRecommendations",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recommender.v1beta1.Recommender",
                        "ListRecommendations",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the requested recommendation. Requires the recommender.*.get
        /// IAM permission for the specified recommender.
        pub async fn get_recommendation(
            &mut self,
            request: impl tonic::IntoRequest<super::GetRecommendationRequest>,
        ) -> std::result::Result<tonic::Response<super::Recommendation>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.recommender.v1beta1.Recommender/GetRecommendation",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recommender.v1beta1.Recommender",
                        "GetRecommendation",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Marks the Recommendation State as Claimed. Users can use this method to
        /// indicate to the Recommender API that they are starting to apply the
        /// recommendation themselves. This stops the recommendation content from being
        /// updated. Associated insights are frozen and placed in the ACCEPTED state.
        ///
        /// MarkRecommendationClaimed can be applied to recommendations in CLAIMED or
        /// ACTIVE state.
        ///
        /// Requires the recommender.*.update IAM permission for the specified
        /// recommender.
        pub async fn mark_recommendation_claimed(
            &mut self,
            request: impl tonic::IntoRequest<super::MarkRecommendationClaimedRequest>,
        ) -> std::result::Result<tonic::Response<super::Recommendation>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.recommender.v1beta1.Recommender/MarkRecommendationClaimed",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recommender.v1beta1.Recommender",
                        "MarkRecommendationClaimed",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Marks the Recommendation State as Succeeded. Users can use this method to
        /// indicate to the Recommender API that they have applied the recommendation
        /// themselves, and the operation was successful. This stops the recommendation
        /// content from being updated. Associated insights are frozen and placed in
        /// the ACCEPTED state.
        ///
        /// MarkRecommendationSucceeded can be applied to recommendations in ACTIVE,
        /// CLAIMED, SUCCEEDED, or FAILED state.
        ///
        /// Requires the recommender.*.update IAM permission for the specified
        /// recommender.
        pub async fn mark_recommendation_succeeded(
            &mut self,
            request: impl tonic::IntoRequest<super::MarkRecommendationSucceededRequest>,
        ) -> std::result::Result<tonic::Response<super::Recommendation>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.recommender.v1beta1.Recommender/MarkRecommendationSucceeded",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recommender.v1beta1.Recommender",
                        "MarkRecommendationSucceeded",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Marks the Recommendation State as Failed. Users can use this method to
        /// indicate to the Recommender API that they have applied the recommendation
        /// themselves, and the operation failed. This stops the recommendation content
        /// from being updated. Associated insights are frozen and placed in the
        /// ACCEPTED state.
        ///
        /// MarkRecommendationFailed can be applied to recommendations in ACTIVE,
        /// CLAIMED, SUCCEEDED, or FAILED state.
        ///
        /// Requires the recommender.*.update IAM permission for the specified
        /// recommender.
        pub async fn mark_recommendation_failed(
            &mut self,
            request: impl tonic::IntoRequest<super::MarkRecommendationFailedRequest>,
        ) -> std::result::Result<tonic::Response<super::Recommendation>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.recommender.v1beta1.Recommender/MarkRecommendationFailed",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recommender.v1beta1.Recommender",
                        "MarkRecommendationFailed",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the requested Recommender Config. There is only one instance of the
        /// config for each Recommender.
        pub async fn get_recommender_config(
            &mut self,
            request: impl tonic::IntoRequest<super::GetRecommenderConfigRequest>,
        ) -> std::result::Result<
            tonic::Response<super::RecommenderConfig>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.recommender.v1beta1.Recommender/GetRecommenderConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recommender.v1beta1.Recommender",
                        "GetRecommenderConfig",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates a Recommender Config. This will create a new revision of the
        /// config.
        pub async fn update_recommender_config(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateRecommenderConfigRequest>,
        ) -> std::result::Result<
            tonic::Response<super::RecommenderConfig>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.recommender.v1beta1.Recommender/UpdateRecommenderConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recommender.v1beta1.Recommender",
                        "UpdateRecommenderConfig",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the requested InsightTypeConfig. There is only one instance of the
        /// config for each InsightType.
        pub async fn get_insight_type_config(
            &mut self,
            request: impl tonic::IntoRequest<super::GetInsightTypeConfigRequest>,
        ) -> std::result::Result<
            tonic::Response<super::InsightTypeConfig>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.recommender.v1beta1.Recommender/GetInsightTypeConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recommender.v1beta1.Recommender",
                        "GetInsightTypeConfig",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates an InsightTypeConfig change. This will create a new revision of the
        /// config.
        pub async fn update_insight_type_config(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateInsightTypeConfigRequest>,
        ) -> std::result::Result<
            tonic::Response<super::InsightTypeConfig>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.recommender.v1beta1.Recommender/UpdateInsightTypeConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recommender.v1beta1.Recommender",
                        "UpdateInsightTypeConfig",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists all available Recommenders.
        /// No IAM permissions are required.
        pub async fn list_recommenders(
            &mut self,
            request: impl tonic::IntoRequest<super::ListRecommendersRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListRecommendersResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.recommender.v1beta1.Recommender/ListRecommenders",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recommender.v1beta1.Recommender",
                        "ListRecommenders",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists available InsightTypes.
        /// No IAM permissions are required.
        pub async fn list_insight_types(
            &mut self,
            request: impl tonic::IntoRequest<super::ListInsightTypesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListInsightTypesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.recommender.v1beta1.Recommender/ListInsightTypes",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recommender.v1beta1.Recommender",
                        "ListInsightTypes",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}