basaltic-sdk-rust 0.9.1

Official typed asynchronous Rust SDK for Basaltic
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
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
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
//! Generated typed wire models. Unknown string enum values are retained.
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct AssumeRoleRequestInput {
    #[serde(rename = "role")]
    pub role: RoleReferenceInput,
    /// Credential validity duration (15 min to 12 hours)
    #[serde(
        rename = "duration_seconds",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub duration_seconds: Option<i64>,

    #[serde(rename = "policy", default, skip_serializing_if = "Option::is_none")]
    pub policy: Option<SessionPolicyDocumentInput>,
}
impl AssumeRoleRequestInput {
    /// Set the required fields; optional fields start omitted.
    #[allow(clippy::too_many_arguments)]
    pub fn new(role: RoleReferenceInput) -> Self {
        Self {
            role,
            duration_seconds: None,
            policy: None,
        }
    }
}

pub type RoleReferenceInput = String;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct SessionPolicyDocumentInput {
    #[serde(rename = "version")]
    pub version: SessionPolicyDocumentInputVersion,

    #[serde(rename = "statements")]
    pub statements: Vec<SessionPolicyStatementInput>,
}
impl SessionPolicyDocumentInput {
    /// Set the required fields; optional fields start omitted.
    #[allow(clippy::too_many_arguments)]
    pub fn new(
        version: SessionPolicyDocumentInputVersion,
        statements: Vec<SessionPolicyStatementInput>,
    ) -> Self {
        Self {
            version,
            statements,
        }
    }
}

#[derive(Clone, Debug, PartialEq, Eq)]
pub enum SessionPolicyDocumentInputVersion {
    Value20240101,
    Unknown(String),
}
impl SessionPolicyDocumentInputVersion {
    pub fn as_str(&self) -> &str {
        match self {
            Self::Value20240101 => "2024-01-01",
            Self::Unknown(value) => value,
        }
    }
}
impl serde::Serialize for SessionPolicyDocumentInputVersion {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        serializer.serialize_str(self.as_str())
    }
}
impl<'de> serde::Deserialize<'de> for SessionPolicyDocumentInputVersion {
    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
        Ok(match value.as_str() {
            "2024-01-01" => Self::Value20240101,
            _ => Self::Unknown(value),
        })
    }
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct SessionPolicyStatementInput {
    /// Statement identifier
    #[serde(rename = "sid", default, skip_serializing_if = "Option::is_none")]
    pub sid: Option<String>,

    #[serde(rename = "effect")]
    pub effect: SessionPolicyStatementInputEffect,
    /// Actions in service:action format
    #[serde(rename = "actions", default, skip_serializing_if = "Option::is_none")]
    pub actions: Option<Vec<String>>,
    /// The statement covers every action except these
    #[serde(
        rename = "not_actions",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub not_actions: Option<Vec<String>>,
    /// Resource identifiers or patterns
    #[serde(rename = "resources", default, skip_serializing_if = "Option::is_none")]
    pub resources: Option<Vec<String>>,
    /// The statement covers every resource except these
    #[serde(
        rename = "not_resources",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub not_resources: Option<Vec<String>>,
}
impl SessionPolicyStatementInput {
    /// Set the required fields; optional fields start omitted.
    #[allow(clippy::too_many_arguments)]
    pub fn new(effect: SessionPolicyStatementInputEffect) -> Self {
        Self {
            sid: None,
            effect,
            actions: None,
            not_actions: None,
            resources: None,
            not_resources: None,
        }
    }
}

#[derive(Clone, Debug, PartialEq, Eq)]
pub enum SessionPolicyStatementInputEffect {
    Allow,
    Deny,
    Unknown(String),
}
impl SessionPolicyStatementInputEffect {
    pub fn as_str(&self) -> &str {
        match self {
            Self::Allow => "allow",
            Self::Deny => "deny",
            Self::Unknown(value) => value,
        }
    }
}
impl serde::Serialize for SessionPolicyStatementInputEffect {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        serializer.serialize_str(self.as_str())
    }
}
impl<'de> serde::Deserialize<'de> for SessionPolicyStatementInputEffect {
    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
        Ok(match value.as_str() {
            "allow" => Self::Allow,
            "deny" => Self::Deny,
            _ => Self::Unknown(value),
        })
    }
}

pub type AssumeRoleBody = AssumeRoleRequestInput;

#[derive(Clone, serde::Serialize, serde::Deserialize, Default)]
pub struct AssumeRoleResponse2 {
    /// Bearer token for the Basaltic API. Present on every role session.
    #[serde(
        rename = "access_token",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub access_token: Option<String>,
    /// Always `Bearer` when `access_token` is present.
    #[serde(
        rename = "token_type",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub token_type: Option<String>,
    /// Seconds until `access_token` expires.
    #[serde(
        rename = "expires_in",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub expires_in: Option<i64>,
    /// SigV4 access key id, for the S3 endpoint.
    #[serde(
        rename = "access_key_id",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub access_key_id: Option<String>,
    /// SigV4 secret, for the S3 endpoint.
    #[serde(
        rename = "secret_access_key",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub secret_access_key: Option<String>,
    /// SigV4 session token, for the S3 endpoint. Send as `X-Amz-Security-Token` and include it in `SignedHeaders`.
    #[serde(
        rename = "session_token",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub session_token: Option<String>,
    /// When the session — and therefore both credential forms — expires.
    #[serde(
        rename = "expiration",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub expiration: Option<String>,
    /// Owning account UUID of the target role.
    #[serde(
        rename = "account_id",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub account_id: Option<String>,
    /// Owning account handle of the target role.
    #[serde(
        rename = "account_handle",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub account_handle: Option<String>,
    /// Immutable UUID of the assumed role.
    #[serde(rename = "role_id", default, skip_serializing_if = "Option::is_none")]
    pub role_id: Option<String>,
}
impl std::fmt::Debug for AssumeRoleResponse2 {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut d = f.debug_struct("AssumeRoleResponse2");
        d.field("access_token", &"[REDACTED]");
        d.field("token_type", &"[REDACTED]");
        d.field("expires_in", &self.expires_in);
        d.field("access_key_id", &self.access_key_id);
        d.field("secret_access_key", &"[REDACTED]");
        d.field("session_token", &"[REDACTED]");
        d.field("expiration", &self.expiration);
        d.field("account_id", &self.account_id);
        d.field("account_handle", &self.account_handle);
        d.field("role_id", &self.role_id);
        d.finish()
    }
}

pub type AssumeRoleResponse = AssumeRoleResponse2;

#[derive(Clone, serde::Serialize, serde::Deserialize)]
pub struct AssumeRoleWithWebIdentityRequestInput {
    /// Signed OIDC JWT. The issuer must be registered in the role account; signature, expiry and an allowed audience are verified before evaluating role trust.
    #[serde(rename = "web_identity_token")]
    pub web_identity_token: String,
    /// Full account-scoped role CRN. Bare UUIDs and names are not accepted.
    #[serde(rename = "role")]
    pub role: String,
    /// A label recorded on the session and in the audit trail. Defaults to the token's `sub` claim, so an unnamed session still records which identity it came from.
    #[serde(
        rename = "session_name",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub session_name: Option<String>,
    /// Credential validity duration (15 min to 12 hours). A value above the role's own `max_session_duration` is rejected rather than clamped.
    #[serde(
        rename = "duration_seconds",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub duration_seconds: Option<i64>,
}
impl std::fmt::Debug for AssumeRoleWithWebIdentityRequestInput {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut d = f.debug_struct("AssumeRoleWithWebIdentityRequestInput");
        d.field("web_identity_token", &"[REDACTED]");
        d.field("role", &self.role);
        d.field("session_name", &self.session_name);
        d.field("duration_seconds", &self.duration_seconds);
        d.finish()
    }
}
impl AssumeRoleWithWebIdentityRequestInput {
    /// Set the required fields; optional fields start omitted.
    #[allow(clippy::too_many_arguments)]
    pub fn new(web_identity_token: String, role: String) -> Self {
        Self {
            web_identity_token,
            role,
            session_name: None,
            duration_seconds: None,
        }
    }
}

pub type AssumeRoleWithWebIdentityBody = AssumeRoleWithWebIdentityRequestInput;

pub type AssumeRoleWithWebIdentityResponse = AssumeRoleResponse2;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct RolePolicyAttachRequestInput {
    #[serde(rename = "policy")]
    pub policy: PolicyReferenceInput,
}
impl RolePolicyAttachRequestInput {
    /// Set the required fields; optional fields start omitted.
    #[allow(clippy::too_many_arguments)]
    pub fn new(policy: PolicyReferenceInput) -> Self {
        Self { policy }
    }
}

pub type PolicyReferenceInput = String;

pub type AttachRolePolicyBody = RolePolicyAttachRequestInput;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct PolicyAttachRequestInput {
    #[serde(rename = "policy")]
    pub policy: PolicyReferenceInput,
}
impl PolicyAttachRequestInput {
    /// Set the required fields; optional fields start omitted.
    #[allow(clippy::too_many_arguments)]
    pub fn new(policy: PolicyReferenceInput) -> Self {
        Self { policy }
    }
}

pub type AttachServiceAccountPolicyBody = PolicyAttachRequestInput;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct OIDCProviderCreateRequestInput {
    #[serde(rename = "name")]
    pub name: String,

    #[serde(
        rename = "description",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub description: Option<String>,
    /// Immutable HTTPS issuer URL. Public discovery and JWKS endpoints are required for customer providers.
    #[serde(rename = "issuer")]
    pub issuer: String,

    #[serde(rename = "audiences")]
    pub audiences: Vec<String>,

    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
    pub tags: Option<std::collections::BTreeMap<String, String>>,
}
impl OIDCProviderCreateRequestInput {
    /// Set the required fields; optional fields start omitted.
    #[allow(clippy::too_many_arguments)]
    pub fn new(name: String, issuer: String, audiences: Vec<String>) -> Self {
        Self {
            name,
            description: None,
            issuer,
            audiences,
            tags: None,
        }
    }
}

pub type CreateOIDCProviderBody = OIDCProviderCreateRequestInput;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct OIDCProviderResponse {
    #[serde(rename = "oidc_provider")]
    pub oidc_provider: OIDCProvider,
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct OIDCProvider {
    #[serde(rename = "id")]
    pub id: String,

    #[serde(rename = "crn")]
    pub crn: String,

    #[serde(rename = "name")]
    pub name: String,

    #[serde(
        rename = "description",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub description: Option<String>,
    /// Immutable HTTPS issuer URL. Public discovery and JWKS endpoints are required for customer providers.
    #[serde(rename = "issuer")]
    pub issuer: String,

    #[serde(rename = "audiences")]
    pub audiences: Vec<String>,
    /// Platform-managed providers cannot be edited or deleted.
    #[serde(rename = "is_system")]
    pub is_system: bool,

    #[serde(rename = "tags")]
    pub tags: std::collections::BTreeMap<String, String>,

    #[serde(rename = "created_at")]
    pub created_at: String,

    #[serde(rename = "updated_at")]
    pub updated_at: String,
}

pub type CreateOIDCProviderResponse = OIDCProviderResponse;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct SSHKeyCreateRequestInput {
    #[serde(rename = "name")]
    pub name: String,
    /// One OpenSSH public key. Ed25519, ECDSA, security-key variants, and RSA of at least 2048 bits are supported. Private keys, certificates, multiple keys and authorized_keys options are rejected.
    #[serde(rename = "public_key")]
    pub public_key: String,
    /// Optional expiry at least one minute in the future. Expired keys stop authorizing new logins and stop consuming quota immediately; records are automatically deleted after seven days by an hourly cleanup. Rotation requires a new credential and revocation of the old one.
    #[serde(
        rename = "expires_at",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub expires_at: Option<String>,
}
impl SSHKeyCreateRequestInput {
    /// Set the required fields; optional fields start omitted.
    #[allow(clippy::too_many_arguments)]
    pub fn new(name: String, public_key: String) -> Self {
        Self {
            name,
            public_key,
            expires_at: None,
        }
    }
}

pub type CreatePersonalSSHKeyBody = SSHKeyCreateRequestInput;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct CreatePersonalSSHKeyResult {
    #[serde(rename = "ssh_key")]
    pub ssh_key: SSHKey,
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct SSHKey {
    #[serde(rename = "id")]
    pub id: String,
    /// Identity-owned SSH credential CRN.
    #[serde(rename = "crn")]
    pub crn: String,

    #[serde(rename = "name")]
    pub name: String,
    /// Canonical OpenSSH public key without a comment or authorized_keys options.
    #[serde(rename = "public_key")]
    pub public_key: String,
    /// SHA-256 fingerprint in OpenSSH format.
    #[serde(rename = "fingerprint")]
    pub fingerprint: String,

    #[serde(rename = "algorithm")]
    pub algorithm: String,

    #[serde(rename = "created_at")]
    pub created_at: String,
    /// Optional expiry. Expired keys do not count toward the SSH key quota. They remain listed for seven days after expiry, then are automatically deleted by an hourly cleanup.
    #[serde(
        rename = "expires_at",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub expires_at: Option<String>,
}

pub type CreatePersonalSSHKeyResponse = CreatePersonalSSHKeyResult;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct PolicyCreateRequestInput {
    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
    #[serde(rename = "name")]
    pub name: String,

    #[serde(
        rename = "description",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub description: Option<String>,

    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
    pub tags: Option<TagsInput>,

    #[serde(rename = "document")]
    pub document: PolicyDocumentInput,
}
impl PolicyCreateRequestInput {
    /// Set the required fields; optional fields start omitted.
    #[allow(clippy::too_many_arguments)]
    pub fn new(name: String, document: PolicyDocumentInput) -> Self {
        Self {
            name,
            description: None,
            tags: None,
            document,
        }
    }
}

pub type TagsInput = std::collections::BTreeMap<String, String>;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct PolicyDocumentInput {
    #[serde(rename = "version")]
    pub version: PolicyDocumentInputVersion,

    #[serde(rename = "statements")]
    pub statements: Vec<PolicyStatementInput>,
}
impl PolicyDocumentInput {
    /// Set the required fields; optional fields start omitted.
    #[allow(clippy::too_many_arguments)]
    pub fn new(version: PolicyDocumentInputVersion, statements: Vec<PolicyStatementInput>) -> Self {
        Self {
            version,
            statements,
        }
    }
}

#[derive(Clone, Debug, PartialEq, Eq)]
pub enum PolicyDocumentInputVersion {
    Value20240101,
    Unknown(String),
}
impl PolicyDocumentInputVersion {
    pub fn as_str(&self) -> &str {
        match self {
            Self::Value20240101 => "2024-01-01",
            Self::Unknown(value) => value,
        }
    }
}
impl serde::Serialize for PolicyDocumentInputVersion {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        serializer.serialize_str(self.as_str())
    }
}
impl<'de> serde::Deserialize<'de> for PolicyDocumentInputVersion {
    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
        Ok(match value.as_str() {
            "2024-01-01" => Self::Value20240101,
            _ => Self::Unknown(value),
        })
    }
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct PolicyStatementInput {
    /// Statement identifier
    #[serde(rename = "sid", default, skip_serializing_if = "Option::is_none")]
    pub sid: Option<String>,

    #[serde(rename = "effect")]
    pub effect: PolicyStatementInputEffect,
    /// Actions in service:action format
    #[serde(rename = "actions", default, skip_serializing_if = "Option::is_none")]
    pub actions: Option<Vec<String>>,
    /// The statement covers every action *except* these. Pairs naturally with `effect: deny` to carve a hole out of a broad allow; with `effect: allow` it grants everything the listed patterns don't name, including actions added by future services.
    #[serde(
        rename = "not_actions",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub not_actions: Option<Vec<String>>,
    /// Resource identifiers or patterns
    #[serde(rename = "resources", default, skip_serializing_if = "Option::is_none")]
    pub resources: Option<Vec<String>>,
    /// The statement covers every resource *except* these. Same trade-off as `not_actions`: with `effect: allow` it reaches resources that do not exist yet.
    #[serde(
        rename = "not_resources",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub not_resources: Option<Vec<String>>,
    /// Optional conditions for the statement
    #[serde(
        rename = "conditions",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub conditions: Option<Vec<PolicyConditionInput>>,
}
impl PolicyStatementInput {
    /// Set the required fields; optional fields start omitted.
    #[allow(clippy::too_many_arguments)]
    pub fn new(effect: PolicyStatementInputEffect) -> Self {
        Self {
            sid: None,
            effect,
            actions: None,
            not_actions: None,
            resources: None,
            not_resources: None,
            conditions: None,
        }
    }
}

#[derive(Clone, Debug, PartialEq, Eq)]
pub enum PolicyStatementInputEffect {
    Allow,
    Deny,
    Unknown(String),
}
impl PolicyStatementInputEffect {
    pub fn as_str(&self) -> &str {
        match self {
            Self::Allow => "allow",
            Self::Deny => "deny",
            Self::Unknown(value) => value,
        }
    }
}
impl serde::Serialize for PolicyStatementInputEffect {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        serializer.serialize_str(self.as_str())
    }
}
impl<'de> serde::Deserialize<'de> for PolicyStatementInputEffect {
    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
        Ok(match value.as_str() {
            "allow" => Self::Allow,
            "deny" => Self::Deny,
            _ => Self::Unknown(value),
        })
    }
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct PolicyConditionInput {
    /// The comparison operator
    #[serde(rename = "operator")]
    pub operator: PolicyConditionInputOperator,
    /// The condition key to evaluate
    #[serde(rename = "key")]
    pub key: String,
    /// Values to compare against
    #[serde(rename = "values")]
    pub values: Vec<String>,
    /// Evaluates `operator` against a multi-valued context key (a set, such as `basalt:TagKeys` — the tag keys a request carries) rather than a single value. Omit for an ordinary single-valued condition. - `for_all_values` — holds when every member of the request set satisfies `operator`. An absent or empty set holds vacuously, so a request carrying no tags is not fenced by a tag-key restriction. - `for_any_value` — holds when at least one member does. An absent or empty set does not hold.
    #[serde(
        rename = "set_operator",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub set_operator: Option<PolicyConditionInputSetOperator>,
}
impl PolicyConditionInput {
    /// Set the required fields; optional fields start omitted.
    #[allow(clippy::too_many_arguments)]
    pub fn new(operator: PolicyConditionInputOperator, key: String, values: Vec<String>) -> Self {
        Self {
            operator,
            key,
            values,
            set_operator: None,
        }
    }
}

#[derive(Clone, Debug, PartialEq, Eq)]
pub enum PolicyConditionInputOperator {
    Equals,
    NotEquals,
    StartsWith,
    EndsWith,
    Contains,
    In,
    NotIn,
    GreaterThan,
    LessThan,
    GreaterThanOrEquals,
    LessThanOrEquals,
    Exists,
    NotExists,
    IpAddress,
    NotIpAddress,
    Unknown(String),
}
impl PolicyConditionInputOperator {
    pub fn as_str(&self) -> &str {
        match self {
            Self::Equals => "equals",
            Self::NotEquals => "not_equals",
            Self::StartsWith => "starts_with",
            Self::EndsWith => "ends_with",
            Self::Contains => "contains",
            Self::In => "in",
            Self::NotIn => "not_in",
            Self::GreaterThan => "greater_than",
            Self::LessThan => "less_than",
            Self::GreaterThanOrEquals => "greater_than_or_equals",
            Self::LessThanOrEquals => "less_than_or_equals",
            Self::Exists => "exists",
            Self::NotExists => "not_exists",
            Self::IpAddress => "ip_address",
            Self::NotIpAddress => "not_ip_address",
            Self::Unknown(value) => value,
        }
    }
}
impl serde::Serialize for PolicyConditionInputOperator {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        serializer.serialize_str(self.as_str())
    }
}
impl<'de> serde::Deserialize<'de> for PolicyConditionInputOperator {
    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
        Ok(match value.as_str() {
            "equals" => Self::Equals,
            "not_equals" => Self::NotEquals,
            "starts_with" => Self::StartsWith,
            "ends_with" => Self::EndsWith,
            "contains" => Self::Contains,
            "in" => Self::In,
            "not_in" => Self::NotIn,
            "greater_than" => Self::GreaterThan,
            "less_than" => Self::LessThan,
            "greater_than_or_equals" => Self::GreaterThanOrEquals,
            "less_than_or_equals" => Self::LessThanOrEquals,
            "exists" => Self::Exists,
            "not_exists" => Self::NotExists,
            "ip_address" => Self::IpAddress,
            "not_ip_address" => Self::NotIpAddress,
            _ => Self::Unknown(value),
        })
    }
}

#[derive(Clone, Debug, PartialEq, Eq)]
pub enum PolicyConditionInputSetOperator {
    ForAllValues,
    ForAnyValue,
    Unknown(String),
}
impl PolicyConditionInputSetOperator {
    pub fn as_str(&self) -> &str {
        match self {
            Self::ForAllValues => "for_all_values",
            Self::ForAnyValue => "for_any_value",
            Self::Unknown(value) => value,
        }
    }
}
impl serde::Serialize for PolicyConditionInputSetOperator {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        serializer.serialize_str(self.as_str())
    }
}
impl<'de> serde::Deserialize<'de> for PolicyConditionInputSetOperator {
    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
        Ok(match value.as_str() {
            "for_all_values" => Self::ForAllValues,
            "for_any_value" => Self::ForAnyValue,
            _ => Self::Unknown(value),
        })
    }
}

pub type CreatePolicyBody = PolicyCreateRequestInput;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct CreatePolicyResult {
    #[serde(rename = "policy", default, skip_serializing_if = "Option::is_none")]
    pub policy: Option<Policy>,
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct Policy {
    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Managed policy CRN; absent on inline policy projections in effective-policy lists.
    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
    pub crn: Option<String>,
    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    #[serde(
        rename = "description",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub description: Option<String>,

    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
    pub tags: Option<Tags>,
    /// Whether this is a system-managed policy (cannot be modified or deleted)
    #[serde(rename = "is_system", default, skip_serializing_if = "Option::is_none")]
    pub is_system: Option<bool>,

    #[serde(rename = "document", default, skip_serializing_if = "Option::is_none")]
    pub document: Option<PolicyDocument>,
    /// Creation timestamp (not present for system policies)
    #[serde(
        rename = "created_at",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub created_at: Option<String>,
    /// Last update timestamp (not present for system policies)
    #[serde(
        rename = "updated_at",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub updated_at: Option<String>,
}

pub type Tags = std::collections::BTreeMap<String, String>;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct PolicyDocument {
    #[serde(rename = "version")]
    pub version: PolicyDocumentVersion,

    #[serde(rename = "statements")]
    pub statements: Vec<PolicyStatement>,
}

#[derive(Clone, Debug, PartialEq, Eq)]
pub enum PolicyDocumentVersion {
    Value20240101,
    Unknown(String),
}
impl PolicyDocumentVersion {
    pub fn as_str(&self) -> &str {
        match self {
            Self::Value20240101 => "2024-01-01",
            Self::Unknown(value) => value,
        }
    }
}
impl serde::Serialize for PolicyDocumentVersion {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        serializer.serialize_str(self.as_str())
    }
}
impl<'de> serde::Deserialize<'de> for PolicyDocumentVersion {
    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
        Ok(match value.as_str() {
            "2024-01-01" => Self::Value20240101,
            _ => Self::Unknown(value),
        })
    }
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct PolicyStatement {
    /// Statement identifier
    #[serde(rename = "sid", default, skip_serializing_if = "Option::is_none")]
    pub sid: Option<String>,

    #[serde(rename = "effect")]
    pub effect: PolicyStatementEffect,
    /// Actions in service:action format
    #[serde(rename = "actions", default, skip_serializing_if = "Option::is_none")]
    pub actions: Option<Vec<String>>,
    /// The statement covers every action *except* these. Pairs naturally with `effect: deny` to carve a hole out of a broad allow; with `effect: allow` it grants everything the listed patterns don't name, including actions added by future services.
    #[serde(
        rename = "not_actions",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub not_actions: Option<Vec<String>>,
    /// Resource identifiers or patterns
    #[serde(rename = "resources", default, skip_serializing_if = "Option::is_none")]
    pub resources: Option<Vec<String>>,
    /// The statement covers every resource *except* these. Same trade-off as `not_actions`: with `effect: allow` it reaches resources that do not exist yet.
    #[serde(
        rename = "not_resources",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub not_resources: Option<Vec<String>>,
    /// Optional conditions for the statement
    #[serde(
        rename = "conditions",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub conditions: Option<Vec<PolicyCondition>>,
}

#[derive(Clone, Debug, PartialEq, Eq)]
pub enum PolicyStatementEffect {
    Allow,
    Deny,
    Unknown(String),
}
impl PolicyStatementEffect {
    pub fn as_str(&self) -> &str {
        match self {
            Self::Allow => "allow",
            Self::Deny => "deny",
            Self::Unknown(value) => value,
        }
    }
}
impl serde::Serialize for PolicyStatementEffect {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        serializer.serialize_str(self.as_str())
    }
}
impl<'de> serde::Deserialize<'de> for PolicyStatementEffect {
    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
        Ok(match value.as_str() {
            "allow" => Self::Allow,
            "deny" => Self::Deny,
            _ => Self::Unknown(value),
        })
    }
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct PolicyCondition {
    /// The comparison operator
    #[serde(rename = "operator")]
    pub operator: PolicyConditionOperator,
    /// The condition key to evaluate
    #[serde(rename = "key")]
    pub key: String,
    /// Values to compare against
    #[serde(rename = "values")]
    pub values: Vec<String>,
    /// Evaluates `operator` against a multi-valued context key (a set, such as `basalt:TagKeys` — the tag keys a request carries) rather than a single value. Omit for an ordinary single-valued condition. - `for_all_values` — holds when every member of the request set satisfies `operator`. An absent or empty set holds vacuously, so a request carrying no tags is not fenced by a tag-key restriction. - `for_any_value` — holds when at least one member does. An absent or empty set does not hold.
    #[serde(
        rename = "set_operator",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub set_operator: Option<PolicyConditionSetOperator>,
}

#[derive(Clone, Debug, PartialEq, Eq)]
pub enum PolicyConditionOperator {
    Equals,
    NotEquals,
    StartsWith,
    EndsWith,
    Contains,
    In,
    NotIn,
    GreaterThan,
    LessThan,
    GreaterThanOrEquals,
    LessThanOrEquals,
    Exists,
    NotExists,
    IpAddress,
    NotIpAddress,
    Unknown(String),
}
impl PolicyConditionOperator {
    pub fn as_str(&self) -> &str {
        match self {
            Self::Equals => "equals",
            Self::NotEquals => "not_equals",
            Self::StartsWith => "starts_with",
            Self::EndsWith => "ends_with",
            Self::Contains => "contains",
            Self::In => "in",
            Self::NotIn => "not_in",
            Self::GreaterThan => "greater_than",
            Self::LessThan => "less_than",
            Self::GreaterThanOrEquals => "greater_than_or_equals",
            Self::LessThanOrEquals => "less_than_or_equals",
            Self::Exists => "exists",
            Self::NotExists => "not_exists",
            Self::IpAddress => "ip_address",
            Self::NotIpAddress => "not_ip_address",
            Self::Unknown(value) => value,
        }
    }
}
impl serde::Serialize for PolicyConditionOperator {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        serializer.serialize_str(self.as_str())
    }
}
impl<'de> serde::Deserialize<'de> for PolicyConditionOperator {
    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
        Ok(match value.as_str() {
            "equals" => Self::Equals,
            "not_equals" => Self::NotEquals,
            "starts_with" => Self::StartsWith,
            "ends_with" => Self::EndsWith,
            "contains" => Self::Contains,
            "in" => Self::In,
            "not_in" => Self::NotIn,
            "greater_than" => Self::GreaterThan,
            "less_than" => Self::LessThan,
            "greater_than_or_equals" => Self::GreaterThanOrEquals,
            "less_than_or_equals" => Self::LessThanOrEquals,
            "exists" => Self::Exists,
            "not_exists" => Self::NotExists,
            "ip_address" => Self::IpAddress,
            "not_ip_address" => Self::NotIpAddress,
            _ => Self::Unknown(value),
        })
    }
}

#[derive(Clone, Debug, PartialEq, Eq)]
pub enum PolicyConditionSetOperator {
    ForAllValues,
    ForAnyValue,
    Unknown(String),
}
impl PolicyConditionSetOperator {
    pub fn as_str(&self) -> &str {
        match self {
            Self::ForAllValues => "for_all_values",
            Self::ForAnyValue => "for_any_value",
            Self::Unknown(value) => value,
        }
    }
}
impl serde::Serialize for PolicyConditionSetOperator {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        serializer.serialize_str(self.as_str())
    }
}
impl<'de> serde::Deserialize<'de> for PolicyConditionSetOperator {
    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
        Ok(match value.as_str() {
            "for_all_values" => Self::ForAllValues,
            "for_any_value" => Self::ForAnyValue,
            _ => Self::Unknown(value),
        })
    }
}

pub type CreatePolicyResponse = CreatePolicyResult;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct RoleCreateRequestInput {
    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
    #[serde(rename = "name")]
    pub name: String,

    #[serde(
        rename = "description",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub description: Option<String>,

    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
    pub tags: Option<TagsInput>,

    #[serde(
        rename = "trust_policy",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub trust_policy: Option<TrustPolicyInput>,
}
impl RoleCreateRequestInput {
    /// Set the required fields; optional fields start omitted.
    #[allow(clippy::too_many_arguments)]
    pub fn new(name: String) -> Self {
        Self {
            name,
            description: None,
            tags: None,
            trust_policy: None,
        }
    }
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct TrustPolicyInput {
    /// Qualified CRN patterns identifying who may assume this account role. Same-organization membership alone does not establish trust. The caller also needs iam:AssumeRole permission for the target role. Account roles and service accounts use crn:iam::&lt;account-handle&gt;:role/&lt;name&gt; and crn:iam::&lt;account-handle&gt;:service-account/&lt;name&gt;. Human users use crn:workspace:::user/&lt;username&gt; or crn:workspace:::user/* in the selected organization. An instance presents its compute CRN through IMDS. A federated caller names the trusted provider as crn:iam::&lt;account&gt;:oidc-provider/&lt;provider&gt; and uses conditions to restrict token claims.
    #[serde(
        rename = "principals",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub principals: Option<Vec<String>>,
    /// Optional conditions for role assumption
    #[serde(
        rename = "conditions",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub conditions: Option<Vec<PolicyConditionInput>>,
}

pub type CreateRoleBody = RoleCreateRequestInput;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct CreateRoleResult {
    #[serde(rename = "role", default, skip_serializing_if = "Option::is_none")]
    pub role: Option<Role>,
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct Role {
    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Cloud Resource Name
    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
    pub crn: Option<String>,
    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    #[serde(
        rename = "description",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub description: Option<String>,

    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
    pub tags: Option<Tags>,

    #[serde(
        rename = "trust_policy",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub trust_policy: Option<TrustPolicy>,

    #[serde(
        rename = "created_at",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub created_at: Option<String>,

    #[serde(
        rename = "updated_at",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub updated_at: Option<String>,
    /// System roles cannot be changed or deleted.
    #[serde(rename = "is_system", default, skip_serializing_if = "Option::is_none")]
    pub is_system: Option<bool>,
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct TrustPolicy {
    /// Qualified CRN patterns identifying who may assume this account role. Same-organization membership alone does not establish trust. The caller also needs iam:AssumeRole permission for the target role. Account roles and service accounts use crn:iam::&lt;account-handle&gt;:role/&lt;name&gt; and crn:iam::&lt;account-handle&gt;:service-account/&lt;name&gt;. Human users use crn:workspace:::user/&lt;username&gt; or crn:workspace:::user/* in the selected organization. An instance presents its compute CRN through IMDS. A federated caller names the trusted provider as crn:iam::&lt;account&gt;:oidc-provider/&lt;provider&gt; and uses conditions to restrict token claims.
    #[serde(
        rename = "principals",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub principals: Option<Vec<String>>,
    /// Optional conditions for role assumption
    #[serde(
        rename = "conditions",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub conditions: Option<Vec<PolicyCondition>>,
}

pub type CreateRoleResponse = CreateRoleResult;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct ServiceAccountCreateRequestInput {
    /// Immutable account-scoped name. The Linux login is sa_&lt;name&gt;. Resource names must not start with the literal crn: prefix or be UUIDs.
    #[serde(rename = "name")]
    pub name: String,

    #[serde(
        rename = "description",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub description: Option<String>,

    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
    pub tags: Option<TagsInput>,
}
impl ServiceAccountCreateRequestInput {
    /// Set the required fields; optional fields start omitted.
    #[allow(clippy::too_many_arguments)]
    pub fn new(name: String) -> Self {
        Self {
            name,
            description: None,
            tags: None,
        }
    }
}

pub type CreateServiceAccountBody = ServiceAccountCreateRequestInput;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct CreateServiceAccountResult {
    #[serde(
        rename = "service_account",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub service_account: Option<ServiceAccount>,
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct ServiceAccount {
    #[serde(
        rename = "linux_identity",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub linux_identity: Option<LinuxIdentity>,

    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Cloud Resource Name
    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
    pub crn: Option<String>,
    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    #[serde(
        rename = "description",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub description: Option<String>,

    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
    pub tags: Option<Tags>,

    #[serde(rename = "enabled", default, skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,

    #[serde(
        rename = "created_at",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub created_at: Option<String>,

    #[serde(
        rename = "updated_at",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub updated_at: Option<String>,
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct LinuxIdentity {
    /// Home allocated to this identity. New human identities use /home/bsu_&lt;uid&gt; and service accounts use /home/bsa_&lt;uid&gt;. Existing identities retain their home. Read this value instead of deriving it from the username.
    #[serde(rename = "home_directory")]
    pub home_directory: String,

    #[serde(rename = "username")]
    pub username: String,

    #[serde(rename = "uid")]
    pub uid: i64,

    #[serde(rename = "gid")]
    pub gid: i64,
}

pub type CreateServiceAccountResponse = CreateServiceAccountResult;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct CredentialCreateRequestInput {
    #[serde(rename = "name")]
    pub name: String,
    /// Optional expiration date
    #[serde(
        rename = "expires_at",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub expires_at: Option<String>,
}
impl CredentialCreateRequestInput {
    /// Set the required fields; optional fields start omitted.
    #[allow(clippy::too_many_arguments)]
    pub fn new(name: String) -> Self {
        Self {
            name,
            expires_at: None,
        }
    }
}

pub type CreateServiceAccountCredentialBody = CredentialCreateRequestInput;

#[derive(Clone, serde::Serialize, serde::Deserialize, Default)]
pub struct CredentialCreateResponse {
    #[serde(
        rename = "credential",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub credential: Option<Credential>,
    /// Only returned once at creation time
    #[serde(
        rename = "secret_access_key",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub secret_access_key: Option<String>,
}
impl std::fmt::Debug for CredentialCreateResponse {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut d = f.debug_struct("CredentialCreateResponse");
        d.field("credential", &"[REDACTED]");
        d.field("secret_access_key", &"[REDACTED]");
        d.finish()
    }
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct Credential {
    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Cloud Resource Name
    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
    pub crn: Option<String>,

    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    #[serde(
        rename = "access_key_id",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub access_key_id: Option<String>,

    #[serde(
        rename = "last_used_at",
        default,
        skip_serializing_if = "Option::is_none",
        deserialize_with = "crate::response::present_nullable"
    )]
    pub last_used_at: Option<crate::Nullable<String>>,

    #[serde(
        rename = "expires_at",
        default,
        skip_serializing_if = "Option::is_none",
        deserialize_with = "crate::response::present_nullable"
    )]
    pub expires_at: Option<crate::Nullable<String>>,

    #[serde(
        rename = "created_at",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub created_at: Option<String>,
}

pub type CreateServiceAccountCredentialResponse = CredentialCreateResponse;

pub type CreateServiceAccountSSHKeyBody = SSHKeyCreateRequestInput;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct CreateServiceAccountSSHKeyResult {
    #[serde(rename = "ssh_key")]
    pub ssh_key: SSHKey,
}

pub type CreateServiceAccountSSHKeyResponse = CreateServiceAccountSSHKeyResult;

#[derive(Clone, serde::Serialize, serde::Deserialize)]
pub struct OAuthTokenRequestInput {
    /// `client_credentials` is the one to use for a service account: it exchanges an access key pair for a token, and needs nothing else. `authorization_code` and `refresh_token` belong to the interactive login a person runs (`basaltic login`), where the token names a USER rather than a service account. They are driven by the CLI, not written by hand. Check the authorization-server metadata document before branching on them — they are advertised only where an authorization endpoint is configured.
    #[serde(rename = "grant_type")]
    pub grant_type: OAuthTokenRequestInputGrantType,
    /// The access key id. Omit when using HTTP Basic.
    #[serde(rename = "client_id", default, skip_serializing_if = "Option::is_none")]
    pub client_id: Option<String>,
    /// The secret access key. Omit when using HTTP Basic.
    #[serde(
        rename = "client_secret",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub client_secret: Option<String>,
    /// Requested token lifetime. A Basaltic extension, not an OAuth parameter — omit it and you get the default. Values outside the range are clamped into it rather than refused, so asking for a day yields the longest token allowed.
    #[serde(
        rename = "duration_seconds",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub duration_seconds: Option<i64>,
    /// The authorization code from the consent redirect. Single use, and valid for five minutes. `authorization_code` grant only.
    #[serde(rename = "code", default, skip_serializing_if = "Option::is_none")]
    pub code: Option<String>,
    /// The PKCE verifier whose SHA-256 was sent as `code_challenge` when the flow started (RFC 7636). Required with `authorization_code`: it is what proves this is the client that began the flow, since a CLI holds no client secret.
    #[serde(
        rename = "code_verifier",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub code_verifier: Option<String>,
    /// The same `redirect_uri` the code was issued for — for the CLI, `urn:ietf:wg:oauth:2.0:oob`. Re-checked here, so a code cannot be redeemed under a different one (RFC 6749 4.1.3).
    #[serde(
        rename = "redirect_uri",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub redirect_uri: Option<String>,
    /// `refresh_token` grant only. Renews a user session without another trip through the browser. Rotated on every use — store the new one.
    #[serde(
        rename = "refresh_token",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub refresh_token: Option<String>,
}
impl std::fmt::Debug for OAuthTokenRequestInput {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut d = f.debug_struct("OAuthTokenRequestInput");
        d.field("grant_type", &self.grant_type);
        d.field("client_id", &self.client_id);
        d.field("client_secret", &"[REDACTED]");
        d.field("duration_seconds", &self.duration_seconds);
        d.field("code", &self.code);
        d.field("code_verifier", &"[REDACTED]");
        d.field("redirect_uri", &self.redirect_uri);
        d.field("refresh_token", &"[REDACTED]");
        d.finish()
    }
}
impl OAuthTokenRequestInput {
    /// Set the required fields; optional fields start omitted.
    #[allow(clippy::too_many_arguments)]
    pub fn new(grant_type: OAuthTokenRequestInputGrantType) -> Self {
        Self {
            grant_type,
            client_id: None,
            client_secret: None,
            duration_seconds: None,
            code: None,
            code_verifier: None,
            redirect_uri: None,
            refresh_token: None,
        }
    }
}

#[derive(Clone, Debug, PartialEq, Eq)]
pub enum OAuthTokenRequestInputGrantType {
    ClientCredentials,
    AuthorizationCode,
    RefreshToken,
    Unknown(String),
}
impl OAuthTokenRequestInputGrantType {
    pub fn as_str(&self) -> &str {
        match self {
            Self::ClientCredentials => "client_credentials",
            Self::AuthorizationCode => "authorization_code",
            Self::RefreshToken => "refresh_token",
            Self::Unknown(value) => value,
        }
    }
}
impl serde::Serialize for OAuthTokenRequestInputGrantType {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        serializer.serialize_str(self.as_str())
    }
}
impl<'de> serde::Deserialize<'de> for OAuthTokenRequestInputGrantType {
    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
        Ok(match value.as_str() {
            "client_credentials" => Self::ClientCredentials,
            "authorization_code" => Self::AuthorizationCode,
            "refresh_token" => Self::RefreshToken,
            _ => Self::Unknown(value),
        })
    }
}

pub type GetOAuthTokenBody = OAuthTokenRequestInput;

#[derive(Clone, serde::Serialize, serde::Deserialize)]
pub struct OAuthTokenResponse {
    /// Send as `Authorization: Bearer <token>`. Opaque to clients: do not parse it, and do not key anything on the token string.
    #[serde(rename = "access_token")]
    pub access_token: String,

    #[serde(rename = "token_type")]
    pub token_type: OAuthTokenResponseTokenType,
    /// Seconds until the token expires.
    #[serde(rename = "expires_in")]
    pub expires_in: i64,
    /// Returned only by the user grants (`authorization_code` and `refresh_token`). Present it to the `refresh_token` grant to renew without another browser round trip; it is ROTATED on each use, so replace the stored copy every time. A service account gets none. It already holds a long-lived access key and can simply run `client_credentials` again, so a refresh token would be a second credential to store for no gain.
    #[serde(
        rename = "refresh_token",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub refresh_token: Option<String>,
}
impl std::fmt::Debug for OAuthTokenResponse {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut d = f.debug_struct("OAuthTokenResponse");
        d.field("access_token", &"[REDACTED]");
        d.field("token_type", &"[REDACTED]");
        d.field("expires_in", &self.expires_in);
        d.field("refresh_token", &"[REDACTED]");
        d.finish()
    }
}

#[derive(Clone, Debug, PartialEq, Eq)]
pub enum OAuthTokenResponseTokenType {
    Bearer,
    Unknown(String),
}
impl OAuthTokenResponseTokenType {
    pub fn as_str(&self) -> &str {
        match self {
            Self::Bearer => "Bearer",
            Self::Unknown(value) => value,
        }
    }
}
impl serde::Serialize for OAuthTokenResponseTokenType {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        serializer.serialize_str(self.as_str())
    }
}
impl<'de> serde::Deserialize<'de> for OAuthTokenResponseTokenType {
    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
        Ok(match value.as_str() {
            "Bearer" => Self::Bearer,
            _ => Self::Unknown(value),
        })
    }
}

pub type GetOAuthTokenResponse = OAuthTokenResponse;

pub type GetOIDCProviderResponse = OIDCProviderResponse;

pub type GetOIDCProviderResource = OIDCProvider;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct GetOIDCProviderScope {
    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
    pub limit: Option<i64>,
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct GetPersonalLinuxIdentityResult {
    #[serde(rename = "linux_identity")]
    pub linux_identity: LinuxIdentity,
}

pub type GetPersonalLinuxIdentityResponse = GetPersonalLinuxIdentityResult;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct GetPolicyResult {
    #[serde(rename = "policy", default, skip_serializing_if = "Option::is_none")]
    pub policy: Option<Policy>,
}

pub type GetPolicyResponse = GetPolicyResult;

pub type GetPolicyResource = Policy;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct GetPolicyScope {
    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
    pub limit: Option<i64>,
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct GetRoleResult {
    #[serde(rename = "role", default, skip_serializing_if = "Option::is_none")]
    pub role: Option<Role>,
}

pub type GetRoleResponse = GetRoleResult;

pub type GetRoleResource = Role;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct GetRoleScope {
    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
    pub limit: Option<i64>,
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct InlinePolicyResponse {
    #[serde(
        rename = "inline_policy",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub inline_policy: Option<InlinePolicy>,
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct InlinePolicy {
    /// Canonical inline policy identity under the owning account principal.
    #[serde(rename = "crn")]
    pub crn: String,

    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    #[serde(rename = "document", default, skip_serializing_if = "Option::is_none")]
    pub document: Option<PolicyDocument>,

    #[serde(
        rename = "created_at",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub created_at: Option<String>,

    #[serde(
        rename = "updated_at",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub updated_at: Option<String>,
}

pub type GetRoleInlinePolicyResponse = InlinePolicyResponse;

pub type GetRoleInlinePolicyResource = InlinePolicy;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct GetRoleInlinePolicyScope {}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct PermissionBoundaryResponse {
    #[serde(rename = "policy")]
    pub policy: Policy,
}

pub type GetRolePermissionBoundaryResponse = PermissionBoundaryResponse;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct STSSessionResponse {
    #[serde(rename = "sts_session")]
    pub sts_session: STSSession,
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct STSSession {
    #[serde(rename = "id")]
    pub id: String,
    /// Optional session identifier
    #[serde(
        rename = "session_name",
        default,
        skip_serializing_if = "Option::is_none",
        deserialize_with = "crate::response::present_nullable"
    )]
    pub session_name: Option<crate::Nullable<String>>,

    #[serde(rename = "created_at")]
    pub created_at: String,

    #[serde(rename = "expires_at")]
    pub expires_at: String,

    #[serde(
        rename = "last_used_at",
        default,
        skip_serializing_if = "Option::is_none",
        deserialize_with = "crate::response::present_nullable"
    )]
    pub last_used_at: Option<crate::Nullable<String>>,
    /// Whether the session has been revoked
    #[serde(rename = "revoked")]
    pub revoked: bool,

    #[serde(
        rename = "revoked_at",
        default,
        skip_serializing_if = "Option::is_none",
        deserialize_with = "crate::response::present_nullable"
    )]
    pub revoked_at: Option<crate::Nullable<String>>,

    #[serde(
        rename = "revoked_reason",
        default,
        skip_serializing_if = "Option::is_none",
        deserialize_with = "crate::response::present_nullable"
    )]
    pub revoked_reason: Option<crate::Nullable<String>>,
    /// IP address where the session was created
    #[serde(
        rename = "source_ip",
        default,
        skip_serializing_if = "Option::is_none",
        deserialize_with = "crate::response::present_nullable"
    )]
    pub source_ip: Option<crate::Nullable<String>>,
    /// User-Agent of the caller that created the session
    #[serde(
        rename = "user_agent",
        default,
        skip_serializing_if = "Option::is_none",
        deserialize_with = "crate::response::present_nullable"
    )]
    pub user_agent: Option<crate::Nullable<String>>,

    #[serde(
        rename = "grant_type",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub grant_type: Option<String>,

    #[serde(rename = "crn")]
    pub crn: String,
    /// Assumed role. Absent for service-account OAuth sessions that do not assume a role.
    #[serde(rename = "role", default, skip_serializing_if = "Option::is_none")]
    pub role: Option<ResourceRef>,
    /// Source user, service account, role or instance. Absent for web identity; use identity_provider and subject instead.
    #[serde(
        rename = "source_principal",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub source_principal: Option<ResourceRef>,
    /// Account of the source resource, when applicable.
    #[serde(
        rename = "source_account",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub source_account: Option<ResourceRef>,
    /// Session used to assume this role, when the session is chained.
    #[serde(
        rename = "parent_session",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub parent_session: Option<ResourceRef>,
    /// Account-owned OIDC provider that verified the web-identity token.
    #[serde(
        rename = "identity_provider",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub identity_provider: Option<ResourceRef>,
    /// Verified subject (sub) from the web-identity token, independent of the session name.
    #[serde(rename = "subject", default, skip_serializing_if = "Option::is_none")]
    pub subject: Option<String>,
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct ResourceRef {
    #[serde(rename = "id")]
    pub id: String,

    #[serde(rename = "crn")]
    pub crn: String,
    /// Display label at response time — the resource's name where it has one, otherwise its human label (an invoice number, an account display name). Absent when the target is gone. Not a lookup key.
    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
}

pub type GetSTSSessionResponse = STSSessionResponse;

pub type GetSTSSessionResource = STSSession;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct GetSTSSessionScope {
    #[serde(rename = "role", default, skip_serializing_if = "Option::is_none")]
    pub role: Option<String>,

    #[serde(rename = "principal", default, skip_serializing_if = "Option::is_none")]
    pub principal: Option<String>,

    #[serde(
        rename = "principal_type",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub principal_type: Option<GetSTSSessionScopePrincipalType>,

    #[serde(
        rename = "active_only",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub active_only: Option<bool>,

    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
    pub limit: Option<i64>,
}

#[derive(Clone, Debug, PartialEq, Eq)]
pub enum GetSTSSessionScopePrincipalType {
    User,
    ServiceAccount,
    Role,
    AssumedRole,
    Unknown(String),
}
impl GetSTSSessionScopePrincipalType {
    pub fn as_str(&self) -> &str {
        match self {
            Self::User => "user",
            Self::ServiceAccount => "service_account",
            Self::Role => "role",
            Self::AssumedRole => "assumed_role",
            Self::Unknown(value) => value,
        }
    }
}
impl serde::Serialize for GetSTSSessionScopePrincipalType {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        serializer.serialize_str(self.as_str())
    }
}
impl<'de> serde::Deserialize<'de> for GetSTSSessionScopePrincipalType {
    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
        Ok(match value.as_str() {
            "user" => Self::User,
            "service_account" => Self::ServiceAccount,
            "role" => Self::Role,
            "assumed_role" => Self::AssumedRole,
            _ => Self::Unknown(value),
        })
    }
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct GetServiceAccountResult {
    #[serde(
        rename = "service_account",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub service_account: Option<ServiceAccount>,
}

pub type GetServiceAccountResponse = GetServiceAccountResult;

pub type GetServiceAccountResource = ServiceAccount;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct GetServiceAccountScope {
    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
    pub limit: Option<i64>,
}

pub type GetServiceAccountInlinePolicyResponse = InlinePolicyResponse;

pub type GetServiceAccountInlinePolicyResource = InlinePolicy;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct GetServiceAccountInlinePolicyScope {}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct GetServiceAccountLinuxIdentityResult {
    #[serde(rename = "linux_identity")]
    pub linux_identity: LinuxIdentity,
}

pub type GetServiceAccountLinuxIdentityResponse = GetServiceAccountLinuxIdentityResult;

pub type GetServiceAccountPermissionBoundaryResponse = PermissionBoundaryResponse;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct ListOIDCProvidersParameters {
    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
    pub crn: Option<String>,

    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
    pub limit: Option<i64>,

    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
    pub marker: Option<String>,
}

pub type ListOIDCProvidersQuery = ListOIDCProvidersParameters;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct OIDCProviderListResponse {
    #[serde(rename = "oidc_providers")]
    pub oidc_providers: Vec<OIDCProvider>,

    #[serde(rename = "meta")]
    pub meta: PaginationMeta,
}

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct PaginationMeta {
    /// Total number of items
    #[serde(rename = "total", default, skip_serializing_if = "Option::is_none")]
    pub total: Option<i64>,
    /// Number of items per page
    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
    pub limit: Option<i64>,
    /// Opaque cursor for the next page. Pass it back as the `marker` query parameter; treat it as a token, not a value to parse.
    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
    pub marker: Option<String>,
    /// Whether there are more items
    #[serde(rename = "has_more", default, skip_serializing_if = "Option::is_none")]
    pub has_more: Option<bool>,
}

pub type ListOIDCProvidersResponse = OIDCProviderListResponse;

pub type ListOIDCProvidersItem = OIDCProvider;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct ListPersonalSSHKeysResult {
    #[serde(rename = "ssh_keys")]
    pub ssh_keys: Vec<SSHKey>,
}

pub type ListPersonalSSHKeysResponse = ListPersonalSSHKeysResult;

pub type ListPersonalSSHKeysItem = SSHKey;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct ListPoliciesParameters {
    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
    pub crn: Option<String>,

    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
    pub limit: Option<i64>,

    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
    pub marker: Option<String>,
}

pub type ListPoliciesQuery = ListPoliciesParameters;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct PolicyListResponse {
    #[serde(rename = "policies", default, skip_serializing_if = "Option::is_none")]
    pub policies: Option<Vec<Policy>>,

    #[serde(rename = "meta", default, skip_serializing_if = "Option::is_none")]
    pub meta: Option<PaginationMeta>,
}

pub type ListPoliciesResponse = PolicyListResponse;

pub type ListPoliciesItem = Policy;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct ListPolicyRolesParameters {
    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
    pub crn: Option<String>,

    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
    pub limit: Option<i64>,

    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
    pub marker: Option<String>,
}

pub type ListPolicyRolesQuery = ListPolicyRolesParameters;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct PolicyRolesListResponse {
    #[serde(rename = "roles")]
    pub roles: Vec<Role>,

    #[serde(rename = "meta")]
    pub meta: PaginationMeta,
}

pub type ListPolicyRolesResponse = PolicyRolesListResponse;

pub type ListPolicyRolesItem = Role;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct ListPolicyServiceAccountsParameters {
    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
    pub crn: Option<String>,

    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
    pub limit: Option<i64>,

    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
    pub marker: Option<String>,
}

pub type ListPolicyServiceAccountsQuery = ListPolicyServiceAccountsParameters;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct PolicyServiceAccountsListResponse {
    #[serde(rename = "service_accounts")]
    pub service_accounts: Vec<ServiceAccount>,

    #[serde(rename = "meta")]
    pub meta: PaginationMeta,
}

pub type ListPolicyServiceAccountsResponse = PolicyServiceAccountsListResponse;

pub type ListPolicyServiceAccountsItem = ServiceAccount;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct ListRoleInlinePoliciesParameters {
    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
    pub crn: Option<String>,
}

pub type ListRoleInlinePoliciesQuery = ListRoleInlinePoliciesParameters;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct InlinePolicyListResponse {
    #[serde(
        rename = "inline_policies",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub inline_policies: Option<Vec<InlinePolicy>>,
}

pub type ListRoleInlinePoliciesResponse = InlinePolicyListResponse;

pub type ListRoleInlinePoliciesItem = InlinePolicy;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct ListRolePoliciesParameters {
    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
    pub crn: Option<String>,
}

pub type ListRolePoliciesQuery = ListRolePoliciesParameters;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct RolePoliciesListResponse {
    #[serde(rename = "policies", default, skip_serializing_if = "Option::is_none")]
    pub policies: Option<Vec<Policy>>,
}

pub type ListRolePoliciesResponse = RolePoliciesListResponse;

pub type ListRolePoliciesItem = Policy;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct ListRolesParameters {
    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
    pub crn: Option<String>,

    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
    pub limit: Option<i64>,

    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
    pub marker: Option<String>,
}

pub type ListRolesQuery = ListRolesParameters;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct RoleListResponse {
    #[serde(rename = "roles", default, skip_serializing_if = "Option::is_none")]
    pub roles: Option<Vec<Role>>,

    #[serde(rename = "meta", default, skip_serializing_if = "Option::is_none")]
    pub meta: Option<PaginationMeta>,
}

pub type ListRolesResponse = RoleListResponse;

pub type ListRolesItem = Role;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct ListSTSSessionsParameters {
    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
    pub crn: Option<String>,

    #[serde(rename = "role", default, skip_serializing_if = "Option::is_none")]
    pub role: Option<String>,

    #[serde(rename = "principal", default, skip_serializing_if = "Option::is_none")]
    pub principal: Option<String>,

    #[serde(
        rename = "principal_type",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub principal_type: Option<ListSTSSessionsParametersPrincipalType>,

    #[serde(
        rename = "active_only",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub active_only: Option<bool>,

    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
    pub limit: Option<i64>,

    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
    pub marker: Option<String>,
}

#[derive(Clone, Debug, PartialEq, Eq)]
pub enum ListSTSSessionsParametersPrincipalType {
    User,
    ServiceAccount,
    Role,
    AssumedRole,
    Unknown(String),
}
impl ListSTSSessionsParametersPrincipalType {
    pub fn as_str(&self) -> &str {
        match self {
            Self::User => "user",
            Self::ServiceAccount => "service_account",
            Self::Role => "role",
            Self::AssumedRole => "assumed_role",
            Self::Unknown(value) => value,
        }
    }
}
impl serde::Serialize for ListSTSSessionsParametersPrincipalType {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        serializer.serialize_str(self.as_str())
    }
}
impl<'de> serde::Deserialize<'de> for ListSTSSessionsParametersPrincipalType {
    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
        Ok(match value.as_str() {
            "user" => Self::User,
            "service_account" => Self::ServiceAccount,
            "role" => Self::Role,
            "assumed_role" => Self::AssumedRole,
            _ => Self::Unknown(value),
        })
    }
}

pub type ListSTSSessionsQuery = ListSTSSessionsParameters;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct STSSessionListResponse {
    #[serde(rename = "sts_sessions")]
    pub sts_sessions: Vec<STSSession>,

    #[serde(rename = "meta")]
    pub meta: PaginationMeta,
}

pub type ListSTSSessionsResponse = STSSessionListResponse;

pub type ListSTSSessionsItem = STSSession;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct ListServiceAccountCredentialsParameters {
    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
    pub crn: Option<String>,
}

pub type ListServiceAccountCredentialsQuery = ListServiceAccountCredentialsParameters;

#[derive(Clone, serde::Serialize, serde::Deserialize, Default)]
pub struct CredentialListResponse {
    #[serde(
        rename = "credentials",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub credentials: Option<Vec<Credential>>,
}
impl std::fmt::Debug for CredentialListResponse {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut d = f.debug_struct("CredentialListResponse");
        d.field("credentials", &"[REDACTED]");
        d.finish()
    }
}

pub type ListServiceAccountCredentialsResponse = CredentialListResponse;

pub type ListServiceAccountCredentialsItem = Credential;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct ListServiceAccountInlinePoliciesParameters {
    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
    pub crn: Option<String>,
}

pub type ListServiceAccountInlinePoliciesQuery = ListServiceAccountInlinePoliciesParameters;

pub type ListServiceAccountInlinePoliciesResponse = InlinePolicyListResponse;

pub type ListServiceAccountInlinePoliciesItem = InlinePolicy;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct ListServiceAccountPoliciesParameters {
    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
    pub crn: Option<String>,
}

pub type ListServiceAccountPoliciesQuery = ListServiceAccountPoliciesParameters;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct PrincipalPoliciesListResponse {
    #[serde(rename = "policies", default, skip_serializing_if = "Option::is_none")]
    pub policies: Option<Vec<Policy>>,
}

pub type ListServiceAccountPoliciesResponse = PrincipalPoliciesListResponse;

pub type ListServiceAccountPoliciesItem = Policy;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct ListServiceAccountSSHKeysResult {
    #[serde(rename = "ssh_keys")]
    pub ssh_keys: Vec<SSHKey>,
}

pub type ListServiceAccountSSHKeysResponse = ListServiceAccountSSHKeysResult;

pub type ListServiceAccountSSHKeysItem = SSHKey;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct ListServiceAccountsParameters {
    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
    pub crn: Option<String>,

    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
    pub limit: Option<i64>,

    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
    pub marker: Option<String>,
}

pub type ListServiceAccountsQuery = ListServiceAccountsParameters;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct ServiceAccountListResponse {
    #[serde(
        rename = "service_accounts",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub service_accounts: Option<Vec<ServiceAccount>>,

    #[serde(rename = "meta", default, skip_serializing_if = "Option::is_none")]
    pub meta: Option<PaginationMeta>,
}

pub type ListServiceAccountsResponse = ServiceAccountListResponse;

pub type ListServiceAccountsItem = ServiceAccount;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct PutInlinePolicyRequestInput {
    #[serde(rename = "document")]
    pub document: PolicyDocumentInput,
}
impl PutInlinePolicyRequestInput {
    /// Set the required fields; optional fields start omitted.
    #[allow(clippy::too_many_arguments)]
    pub fn new(document: PolicyDocumentInput) -> Self {
        Self { document }
    }
}

pub type PutRoleInlinePolicyBody = PutInlinePolicyRequestInput;

pub type PutRoleInlinePolicyResponse = InlinePolicyResponse;

pub type PutServiceAccountInlinePolicyBody = PutInlinePolicyRequestInput;

pub type PutServiceAccountInlinePolicyResponse = InlinePolicyResponse;

#[derive(Clone, serde::Serialize, serde::Deserialize)]
pub struct OAuthRevokeRequestInput {
    /// The access token to revoke.
    #[serde(rename = "token")]
    pub token: String,
    /// Accepted and ignored — the token identifies itself. Present because RFC 7009 clients send it.
    #[serde(
        rename = "token_type_hint",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub token_type_hint: Option<String>,
}
impl std::fmt::Debug for OAuthRevokeRequestInput {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut d = f.debug_struct("OAuthRevokeRequestInput");
        d.field("token", &"[REDACTED]");
        d.field("token_type_hint", &"[REDACTED]");
        d.finish()
    }
}
impl OAuthRevokeRequestInput {
    /// Set the required fields; optional fields start omitted.
    #[allow(clippy::too_many_arguments)]
    pub fn new(token: String) -> Self {
        Self {
            token,
            token_type_hint: None,
        }
    }
}

pub type RevokeOAuthTokenBody = OAuthRevokeRequestInput;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct RevokeSTSSessionRequest {
    /// Reason for revoking the session
    #[serde(rename = "reason", default, skip_serializing_if = "Option::is_none")]
    pub reason: Option<String>,
}

pub type RevokeSTSSessionBody = RevokeSTSSessionRequest;

pub type RevokeSTSSessionResponse = STSSessionResponse;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct SetBoundaryRequestInput {
    #[serde(rename = "policy")]
    pub policy: PolicyReferenceInput,
}
impl SetBoundaryRequestInput {
    /// Set the required fields; optional fields start omitted.
    #[allow(clippy::too_many_arguments)]
    pub fn new(policy: PolicyReferenceInput) -> Self {
        Self { policy }
    }
}

pub type SetRolePermissionBoundaryBody = SetBoundaryRequestInput;

pub type SetServiceAccountPermissionBoundaryBody = SetBoundaryRequestInput;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct OIDCProviderUpdateRequestInput {
    #[serde(
        rename = "description",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub description: Option<String>,

    #[serde(rename = "audiences", default, skip_serializing_if = "Option::is_none")]
    pub audiences: Option<Vec<String>>,

    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
    pub tags: Option<std::collections::BTreeMap<String, String>>,
}

pub type UpdateOIDCProviderBody = OIDCProviderUpdateRequestInput;

pub type UpdateOIDCProviderResponse = OIDCProviderResponse;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct PolicyUpdateRequestInput {
    #[serde(
        rename = "description",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub description: Option<String>,

    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
    pub tags: Option<TagsInput>,

    #[serde(rename = "document", default, skip_serializing_if = "Option::is_none")]
    pub document: Option<PolicyDocumentInput>,
}

pub type UpdatePolicyBody = PolicyUpdateRequestInput;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct UpdatePolicyResult {
    #[serde(rename = "policy", default, skip_serializing_if = "Option::is_none")]
    pub policy: Option<Policy>,
}

pub type UpdatePolicyResponse = UpdatePolicyResult;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct RoleUpdateRequestInput {
    #[serde(
        rename = "description",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub description: Option<String>,

    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
    pub tags: Option<TagsInput>,

    #[serde(
        rename = "trust_policy",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub trust_policy: Option<TrustPolicyInput>,
}

pub type UpdateRoleBody = RoleUpdateRequestInput;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct UpdateRoleResult {
    #[serde(rename = "role", default, skip_serializing_if = "Option::is_none")]
    pub role: Option<Role>,
}

pub type UpdateRoleResponse = UpdateRoleResult;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct ServiceAccountUpdateRequestInput {
    #[serde(
        rename = "description",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub description: Option<String>,

    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
    pub tags: Option<TagsInput>,

    #[serde(rename = "enabled", default, skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
}

pub type UpdateServiceAccountBody = ServiceAccountUpdateRequestInput;

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub struct UpdateServiceAccountResult {
    #[serde(
        rename = "service_account",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub service_account: Option<ServiceAccount>,
}

pub type UpdateServiceAccountResponse = UpdateServiceAccountResult;