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
#![allow(non_camel_case_types)]
#![allow(unused_imports)]
use serde::de::{value, Deserializer, IntoDeserializer};
use serde::{Deserialize, Serialize, Serializer};
use std::str::FromStr;
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AcquisitionOperation {
#[doc = "State of the the AcquisitionOperation for the current user"]
#[serde(
rename = "operationState",
default,
skip_serializing_if = "Option::is_none"
)]
pub operation_state: Option<acquisition_operation::OperationState>,
#[doc = "AcquisitionOperationType: install, request, buy, etc..."]
#[serde(
rename = "operationType",
default,
skip_serializing_if = "Option::is_none"
)]
pub operation_type: Option<acquisition_operation::OperationType>,
#[doc = "Optional reason to justify current state. Typically used with Disallow state."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub reason: Option<String>,
#[doc = "List of reasons indicating why the operation is not allowed."]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub reasons: Vec<AcquisitionOperationDisallowReason>,
}
impl AcquisitionOperation {
pub fn new() -> Self {
Self::default()
}
}
pub mod acquisition_operation {
use super::*;
#[doc = "State of the the AcquisitionOperation for the current user"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum OperationState {
#[serde(rename = "disallow")]
Disallow,
#[serde(rename = "allow")]
Allow,
#[serde(rename = "completed")]
Completed,
}
#[doc = "AcquisitionOperationType: install, request, buy, etc..."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum OperationType {
#[serde(rename = "get")]
Get,
#[serde(rename = "install")]
Install,
#[serde(rename = "buy")]
Buy,
#[serde(rename = "try")]
Try,
#[serde(rename = "request")]
Request,
#[serde(rename = "none")]
None,
#[serde(rename = "purchaseRequest")]
PurchaseRequest,
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AcquisitionOperationDisallowReason {
#[doc = "User-friendly message clarifying the reason for disallowance"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[doc = "Type of reason for disallowance - AlreadyInstalled, UnresolvedDemand, etc."]
#[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
impl AcquisitionOperationDisallowReason {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Market item acquisition options (install, buy, etc) for an installation target."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AcquisitionOptions {
#[doc = ""]
#[serde(
rename = "defaultOperation",
default,
skip_serializing_if = "Option::is_none"
)]
pub default_operation: Option<AcquisitionOperation>,
#[doc = "The item id that this options refer to"]
#[serde(rename = "itemId", default, skip_serializing_if = "Option::is_none")]
pub item_id: Option<String>,
#[doc = "Operations allowed for the ItemId in this target"]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub operations: Vec<AcquisitionOperation>,
#[doc = "Represents a JSON object."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub properties: Option<JObject>,
#[doc = "The target that this options refer to"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub target: Option<String>,
}
impl AcquisitionOptions {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Representation of a ContributionNode that can be used for serialized to clients."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ClientContribution {
#[doc = "Description of the contribution/type"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[doc = "Fully qualified identifier of the contribution/type"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[doc = "Includes is a set of contributions that should have this contribution included in their targets list."]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub includes: Vec<String>,
#[doc = "Represents a JSON object."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub properties: Option<JObject>,
#[doc = "The ids of the contribution(s) that this contribution targets. (parent contributions)"]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub targets: Vec<String>,
#[doc = "Id of the Contribution Type"]
#[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
impl ClientContribution {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Representation of a ContributionNode that can be used for serialized to clients."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ClientContributionNode {
#[doc = "List of ids for contributions which are children to the current contribution."]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub children: Vec<String>,
#[doc = "Representation of a ContributionNode that can be used for serialized to clients."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub contribution: Option<ClientContribution>,
#[doc = "List of ids for contributions which are parents to the current contribution."]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub parents: Vec<String>,
}
impl ClientContributionNode {
pub fn new() -> Self {
Self::default()
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ClientContributionProviderDetails {
#[doc = "Friendly name for the provider."]
#[serde(
rename = "displayName",
default,
skip_serializing_if = "Option::is_none"
)]
pub display_name: Option<String>,
#[doc = "Unique identifier for this provider. The provider name can be used to cache the contribution data and refer back to it when looking for changes"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[doc = "Properties associated with the provider"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub properties: Option<serde_json::Value>,
#[doc = "Version of contributions associated with this contribution provider."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
impl ClientContributionProviderDetails {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "A client data provider are the details needed to make the data provider request from the client."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ClientDataProviderQuery {
#[serde(flatten)]
pub data_provider_query: DataProviderQuery,
#[doc = "The Id of the service instance type that should be communicated with in order to resolve the data providers from the client given the query values."]
#[serde(
rename = "queryServiceInstanceType",
default,
skip_serializing_if = "Option::is_none"
)]
pub query_service_instance_type: Option<String>,
}
impl ClientDataProviderQuery {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "An individual contribution made by an extension"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct Contribution {
#[serde(flatten)]
pub contribution_base: ContributionBase,
#[doc = "List of constraints (filters) that should be applied to the availability of this contribution"]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub constraints: Vec<ContributionConstraint>,
#[doc = "Includes is a set of contributions that should have this contribution included in their targets list."]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub includes: Vec<String>,
#[doc = "Represents a JSON object."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub properties: Option<JObject>,
#[doc = "List of demanded claims in order for the user to see this contribution (like anonymous, public, member...)."]
#[serde(
rename = "restrictedTo",
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub restricted_to: Vec<String>,
#[doc = "The ids of the contribution(s) that this contribution targets. (parent contributions)"]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub targets: Vec<String>,
#[doc = "Id of the Contribution Type"]
#[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
impl Contribution {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Base class shared by contributions and contribution types"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ContributionBase {
#[doc = "Description of the contribution/type"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[doc = "Fully qualified identifier of the contribution/type"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[doc = "VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too. Examples: \"ms\" - Means only the \"ms\" publisher can reference this. \"ms.vss-web\" - Means only the \"vss-web\" extension from the \"ms\" publisher can reference this."]
#[serde(
rename = "visibleTo",
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub visible_to: Vec<String>,
}
impl ContributionBase {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Specifies a constraint that can be used to dynamically include/exclude a given contribution"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ContributionConstraint {
#[doc = "An optional property that can be specified to group constraints together. All constraints within a group are AND'd together (all must be evaluate to True in order for the contribution to be included). Different groups of constraints are OR'd (only one group needs to evaluate to True for the contribution to be included)."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub group: Option<i32>,
#[doc = "Fully qualified identifier of a shared constraint"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[doc = "If true, negate the result of the filter (include the contribution if the applied filter returns false instead of true)"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub inverse: Option<bool>,
#[doc = "Name of the IContributionFilter plugin"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[doc = "Represents a JSON object."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub properties: Option<JObject>,
#[doc = "Constraints can be optionally be applied to one or more of the relationships defined in the contribution. If no relationships are defined then all relationships are associated with the constraint. This means the default behaviour will eliminate the contribution from the tree completely if the constraint is applied."]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub relationships: Vec<String>,
}
impl ContributionConstraint {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "A query that can be issued for contribution nodes"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ContributionNodeQuery {
#[doc = "The contribution ids of the nodes to find."]
#[serde(
rename = "contributionIds",
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub contribution_ids: Vec<String>,
#[doc = "Contextual information that data providers can examine when populating their data"]
#[serde(
rename = "dataProviderContext",
default,
skip_serializing_if = "Option::is_none"
)]
pub data_provider_context: Option<DataProviderContext>,
#[doc = "Indicator if contribution provider details should be included in the result."]
#[serde(
rename = "includeProviderDetails",
default,
skip_serializing_if = "Option::is_none"
)]
pub include_provider_details: Option<bool>,
#[doc = "Query options tpo be used when fetching ContributionNodes"]
#[serde(
rename = "queryOptions",
default,
skip_serializing_if = "Option::is_none"
)]
pub query_options: Option<contribution_node_query::QueryOptions>,
}
impl ContributionNodeQuery {
pub fn new() -> Self {
Self::default()
}
}
pub mod contribution_node_query {
use super::*;
#[doc = "Query options tpo be used when fetching ContributionNodes"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum QueryOptions {
#[serde(rename = "none")]
None,
#[serde(rename = "includeSelf")]
IncludeSelf,
#[serde(rename = "includeChildren")]
IncludeChildren,
#[serde(rename = "includeSubTree")]
IncludeSubTree,
#[serde(rename = "includeAll")]
IncludeAll,
#[serde(rename = "ignoreConstraints")]
IgnoreConstraints,
}
}
#[doc = "Result of a contribution node query. Wraps the resulting contribution nodes and provider details."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ContributionNodeQueryResult {
#[doc = "Map of contribution ids to corresponding node."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub nodes: Option<serde_json::Value>,
#[doc = "Map of provider ids to the corresponding provider details object."]
#[serde(
rename = "providerDetails",
default,
skip_serializing_if = "Option::is_none"
)]
pub provider_details: Option<serde_json::Value>,
}
impl ContributionNodeQueryResult {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Description about a property of a contribution type"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ContributionPropertyDescription {
#[doc = "Description of the property"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[doc = "Name of the property"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[doc = "True if this property is required"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub required: Option<bool>,
#[doc = "The type of value used for this property"]
#[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
pub type_: Option<contribution_property_description::Type>,
}
impl ContributionPropertyDescription {
pub fn new() -> Self {
Self::default()
}
}
pub mod contribution_property_description {
use super::*;
#[doc = "The type of value used for this property"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "unknown")]
Unknown,
#[serde(rename = "string")]
String,
#[serde(rename = "uri")]
Uri,
#[serde(rename = "guid")]
Guid,
#[serde(rename = "boolean")]
Boolean,
#[serde(rename = "integer")]
Integer,
#[serde(rename = "double")]
Double,
#[serde(rename = "dateTime")]
DateTime,
#[serde(rename = "dictionary")]
Dictionary,
#[serde(rename = "array")]
Array,
#[serde(rename = "object")]
Object,
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ContributionProviderDetails {
#[doc = "Friendly name for the provider."]
#[serde(
rename = "displayName",
default,
skip_serializing_if = "Option::is_none"
)]
pub display_name: Option<String>,
#[doc = "Unique identifier for this provider. The provider name can be used to cache the contribution data and refer back to it when looking for changes"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[doc = "Properties associated with the provider"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub properties: Option<serde_json::Value>,
#[doc = "Version of contributions associated with this contribution provider."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
impl ContributionProviderDetails {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "A contribution type, given by a json schema"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ContributionType {
#[serde(flatten)]
pub contribution_base: ContributionBase,
#[doc = "Controls whether or not contributions of this type have the type indexed for queries. This allows clients to find all extensions that have a contribution of this type. NOTE: Only TrustedPartners are allowed to specify indexed contribution types."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub indexed: Option<bool>,
#[doc = "Friendly name of the contribution/type"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[doc = "Describes the allowed properties for this contribution type"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub properties: Option<serde_json::Value>,
}
impl ContributionType {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Contextual information that data providers can examine when populating their data"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DataProviderContext {
#[doc = "Generic property bag that contains context-specific properties that data providers can use when populating their data dictionary"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub properties: Option<serde_json::Value>,
}
impl DataProviderContext {
pub fn new() -> Self {
Self::default()
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DataProviderExceptionDetails {
#[doc = "The type of the exception that was thrown."]
#[serde(
rename = "exceptionType",
default,
skip_serializing_if = "Option::is_none"
)]
pub exception_type: Option<String>,
#[doc = "Message that is associated with the exception."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[doc = "The StackTrace from the exception turned into a string."]
#[serde(
rename = "stackTrace",
default,
skip_serializing_if = "Option::is_none"
)]
pub stack_trace: Option<String>,
}
impl DataProviderExceptionDetails {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "A query that can be issued for data provider data"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DataProviderQuery {
#[doc = "Contextual information that data providers can examine when populating their data"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub context: Option<DataProviderContext>,
#[doc = "The contribution ids of the data providers to resolve"]
#[serde(
rename = "contributionIds",
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub contribution_ids: Vec<String>,
}
impl DataProviderQuery {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Result structure from calls to GetDataProviderData"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DataProviderResult {
#[doc = "This is the set of data providers that were requested, but either they were defined as client providers, or as remote providers that failed and may be retried by the client."]
#[serde(
rename = "clientProviders",
default,
skip_serializing_if = "Option::is_none"
)]
pub client_providers: Option<serde_json::Value>,
#[doc = "Property bag of data keyed off of the data provider contribution id"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub data: Option<serde_json::Value>,
#[doc = "Set of exceptions that occurred resolving the data providers."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub exceptions: Option<serde_json::Value>,
#[doc = "List of data providers resolved in the data-provider query"]
#[serde(
rename = "resolvedProviders",
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub resolved_providers: Vec<ResolvedDataProvider>,
#[doc = "Scope name applied to this data provider result."]
#[serde(rename = "scopeName", default, skip_serializing_if = "Option::is_none")]
pub scope_name: Option<String>,
#[doc = "Scope value applied to this data provider result."]
#[serde(
rename = "scopeValue",
default,
skip_serializing_if = "Option::is_none"
)]
pub scope_value: Option<String>,
#[doc = "Property bag of shared data that was contributed to by any of the individual data providers"]
#[serde(
rename = "sharedData",
default,
skip_serializing_if = "Option::is_none"
)]
pub shared_data: Option<serde_json::Value>,
}
impl DataProviderResult {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Data bag that any data provider can contribute to. This shared dictionary is returned in the data provider result."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DataProviderSharedData {}
impl DataProviderSharedData {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Contract for handling the extension acquisition process"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionAcquisitionRequest {
#[doc = "How the item is being assigned"]
#[serde(
rename = "assignmentType",
default,
skip_serializing_if = "Option::is_none"
)]
pub assignment_type: Option<extension_acquisition_request::AssignmentType>,
#[doc = "The id of the subscription used for purchase"]
#[serde(rename = "billingId", default, skip_serializing_if = "Option::is_none")]
pub billing_id: Option<String>,
#[doc = "The marketplace id (publisherName.extensionName) for the item"]
#[serde(rename = "itemId", default, skip_serializing_if = "Option::is_none")]
pub item_id: Option<String>,
#[doc = "The type of operation, such as install, request, purchase"]
#[serde(
rename = "operationType",
default,
skip_serializing_if = "Option::is_none"
)]
pub operation_type: Option<extension_acquisition_request::OperationType>,
#[doc = "Represents a JSON object."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub properties: Option<JObject>,
#[doc = "How many licenses should be purchased"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub quantity: Option<i32>,
}
impl ExtensionAcquisitionRequest {
pub fn new() -> Self {
Self::default()
}
}
pub mod extension_acquisition_request {
use super::*;
#[doc = "How the item is being assigned"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum AssignmentType {
#[serde(rename = "none")]
None,
#[serde(rename = "me")]
Me,
#[serde(rename = "all")]
All,
}
#[doc = "The type of operation, such as install, request, purchase"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum OperationType {
#[serde(rename = "get")]
Get,
#[serde(rename = "install")]
Install,
#[serde(rename = "buy")]
Buy,
#[serde(rename = "try")]
Try,
#[serde(rename = "request")]
Request,
#[serde(rename = "none")]
None,
#[serde(rename = "purchaseRequest")]
PurchaseRequest,
}
}
#[doc = "Audit log for an extension"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionAuditLog {
#[doc = "Collection of audit log entries"]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub entries: Vec<ExtensionAuditLogEntry>,
#[doc = "Extension that the change was made for"]
#[serde(
rename = "extensionName",
default,
skip_serializing_if = "Option::is_none"
)]
pub extension_name: Option<String>,
#[doc = "Publisher that the extension is part of"]
#[serde(
rename = "publisherName",
default,
skip_serializing_if = "Option::is_none"
)]
pub publisher_name: Option<String>,
}
impl ExtensionAuditLog {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "An audit log entry for an extension"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionAuditLogEntry {
#[doc = "Change that was made to extension"]
#[serde(
rename = "auditAction",
default,
skip_serializing_if = "Option::is_none"
)]
pub audit_action: Option<String>,
#[doc = "Date at which the change was made"]
#[serde(
rename = "auditDate",
default,
with = "crate::date_time::rfc3339::option"
)]
pub audit_date: Option<time::OffsetDateTime>,
#[doc = "Extra information about the change"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub comment: Option<String>,
#[doc = ""]
#[serde(rename = "updatedBy", default, skip_serializing_if = "Option::is_none")]
pub updated_by: Option<IdentityRef>,
}
impl ExtensionAuditLogEntry {
pub fn new() -> Self {
Self::default()
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionAuthorization {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub scopes: Vec<String>,
}
impl ExtensionAuthorization {
pub fn new() -> Self {
Self::default()
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionBadge {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "imgUri", default, skip_serializing_if = "Option::is_none")]
pub img_uri: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub link: Option<String>,
}
impl ExtensionBadge {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Represents a single collection for extension data documents"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionDataCollection {
#[doc = "The name of the collection"]
#[serde(
rename = "collectionName",
default,
skip_serializing_if = "Option::is_none"
)]
pub collection_name: Option<String>,
#[doc = "A list of documents belonging to the collection"]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub documents: Vec<JObject>,
#[doc = "The type of the collection's scope, such as Default or User"]
#[serde(rename = "scopeType", default, skip_serializing_if = "Option::is_none")]
pub scope_type: Option<String>,
#[doc = "The value of the collection's scope, such as Current or Me"]
#[serde(
rename = "scopeValue",
default,
skip_serializing_if = "Option::is_none"
)]
pub scope_value: Option<String>,
}
impl ExtensionDataCollection {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Represents a query to receive a set of extension data collections"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionDataCollectionQuery {
#[doc = "A list of collections to query"]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub collections: Vec<ExtensionDataCollection>,
}
impl ExtensionDataCollectionQuery {
pub fn new() -> Self {
Self::default()
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionEvent {
#[doc = ""]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub extension: Option<PublishedExtension>,
#[doc = "The current version of the extension that was updated"]
#[serde(
rename = "extensionVersion",
default,
skip_serializing_if = "Option::is_none"
)]
pub extension_version: Option<String>,
#[doc = ""]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub host: Option<ExtensionHost>,
#[doc = ""]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub links: Option<ExtensionEventUrls>,
#[doc = ""]
#[serde(
rename = "modifiedBy",
default,
skip_serializing_if = "Option::is_none"
)]
pub modified_by: Option<IdentityRef>,
#[doc = "The type of update that was made"]
#[serde(
rename = "updateType",
default,
skip_serializing_if = "Option::is_none"
)]
pub update_type: Option<extension_event::UpdateType>,
}
impl ExtensionEvent {
pub fn new() -> Self {
Self::default()
}
}
pub mod extension_event {
use super::*;
#[doc = "The type of update that was made"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum UpdateType {
#[serde(rename = "installed")]
Installed,
#[serde(rename = "uninstalled")]
Uninstalled,
#[serde(rename = "enabled")]
Enabled,
#[serde(rename = "disabled")]
Disabled,
#[serde(rename = "versionUpdated")]
VersionUpdated,
#[serde(rename = "actionRequired")]
ActionRequired,
#[serde(rename = "actionResolved")]
ActionResolved,
}
}
#[doc = "Base class for an event callback for an extension"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionEventCallback {
#[doc = "The uri of the endpoint that is hit when an event occurs"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub uri: Option<String>,
}
impl ExtensionEventCallback {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Collection of event callbacks - endpoints called when particular extension events occur."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionEventCallbackCollection {
#[doc = "Base class for an event callback for an extension"]
#[serde(
rename = "postDisable",
default,
skip_serializing_if = "Option::is_none"
)]
pub post_disable: Option<ExtensionEventCallback>,
#[doc = "Base class for an event callback for an extension"]
#[serde(
rename = "postEnable",
default,
skip_serializing_if = "Option::is_none"
)]
pub post_enable: Option<ExtensionEventCallback>,
#[doc = "Base class for an event callback for an extension"]
#[serde(
rename = "postInstall",
default,
skip_serializing_if = "Option::is_none"
)]
pub post_install: Option<ExtensionEventCallback>,
#[doc = "Base class for an event callback for an extension"]
#[serde(
rename = "postUninstall",
default,
skip_serializing_if = "Option::is_none"
)]
pub post_uninstall: Option<ExtensionEventCallback>,
#[doc = "Base class for an event callback for an extension"]
#[serde(
rename = "postUpdate",
default,
skip_serializing_if = "Option::is_none"
)]
pub post_update: Option<ExtensionEventCallback>,
#[doc = "Base class for an event callback for an extension"]
#[serde(
rename = "preInstall",
default,
skip_serializing_if = "Option::is_none"
)]
pub pre_install: Option<ExtensionEventCallback>,
#[doc = "Base class for an event callback for an extension"]
#[serde(
rename = "versionCheck",
default,
skip_serializing_if = "Option::is_none"
)]
pub version_check: Option<ExtensionEventCallback>,
}
impl ExtensionEventCallbackCollection {
pub fn new() -> Self {
Self::default()
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionEventUrls {
#[serde(flatten)]
pub extension_urls: ExtensionUrls,
#[doc = "Url of the extension management page"]
#[serde(
rename = "manageExtensionsPage",
default,
skip_serializing_if = "Option::is_none"
)]
pub manage_extensions_page: Option<String>,
}
impl ExtensionEventUrls {
pub fn new() -> Self {
Self::default()
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionFile {
#[serde(rename = "assetType", default, skip_serializing_if = "Option::is_none")]
pub asset_type: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub language: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub source: Option<String>,
}
impl ExtensionFile {
pub fn new() -> Self {
Self::default()
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionHost {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
impl ExtensionHost {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Represents the component pieces of an extensions fully qualified name, along with the fully qualified name."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionIdentifier {
#[doc = "The ExtensionName component part of the fully qualified ExtensionIdentifier"]
#[serde(
rename = "extensionName",
default,
skip_serializing_if = "Option::is_none"
)]
pub extension_name: Option<String>,
#[doc = "The PublisherName component part of the fully qualified ExtensionIdentifier"]
#[serde(
rename = "publisherName",
default,
skip_serializing_if = "Option::is_none"
)]
pub publisher_name: Option<String>,
}
impl ExtensionIdentifier {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "How an extension should handle including contributions based on licensing"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionLicensing {
#[doc = "A list of contributions which deviate from the default licensing behavior"]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub overrides: Vec<LicensingOverride>,
}
impl ExtensionLicensing {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Base class for extension properties which are shared by the extension manifest and the extension model"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionManifest {
#[doc = "Uri used as base for other relative uri's defined in extension"]
#[serde(rename = "baseUri", default, skip_serializing_if = "Option::is_none")]
pub base_uri: Option<String>,
#[doc = "List of shared constraints defined by this extension"]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub constraints: Vec<ContributionConstraint>,
#[doc = "List of contributions made by this extension"]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub contributions: Vec<Contribution>,
#[doc = "List of contribution types defined by this extension"]
#[serde(
rename = "contributionTypes",
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub contribution_types: Vec<ContributionType>,
#[doc = "List of explicit demands required by this extension"]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub demands: Vec<String>,
#[doc = "Collection of event callbacks - endpoints called when particular extension events occur."]
#[serde(
rename = "eventCallbacks",
default,
skip_serializing_if = "Option::is_none"
)]
pub event_callbacks: Option<ExtensionEventCallbackCollection>,
#[doc = "Secondary location that can be used as base for other relative uri's defined in extension"]
#[serde(
rename = "fallbackBaseUri",
default,
skip_serializing_if = "Option::is_none"
)]
pub fallback_base_uri: Option<String>,
#[doc = "Language Culture Name set by the Gallery"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub language: Option<String>,
#[doc = "How an extension should handle including contributions based on licensing"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub licensing: Option<ExtensionLicensing>,
#[doc = "Version of the extension manifest format/content"]
#[serde(
rename = "manifestVersion",
default,
skip_serializing_if = "Option::is_none"
)]
pub manifest_version: Option<f64>,
#[doc = "Default user claims applied to all contributions (except the ones which have been specified restrictedTo explicitly) to control the visibility of a contribution."]
#[serde(
rename = "restrictedTo",
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub restricted_to: Vec<String>,
#[doc = "List of all oauth scopes required by this extension"]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub scopes: Vec<String>,
#[doc = "The ServiceInstanceType(Guid) of the VSTS service that must be available to an account in order for the extension to be installed"]
#[serde(
rename = "serviceInstanceType",
default,
skip_serializing_if = "Option::is_none"
)]
pub service_instance_type: Option<String>,
}
impl ExtensionManifest {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Policy with a set of permissions on extension operations"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionPolicy {
#[doc = "Permissions on 'Install' operation"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub install: Option<extension_policy::Install>,
#[doc = "Permission on 'Request' operation"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub request: Option<extension_policy::Request>,
}
impl ExtensionPolicy {
pub fn new() -> Self {
Self::default()
}
}
pub mod extension_policy {
use super::*;
#[doc = "Permissions on 'Install' operation"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum Install {
#[serde(rename = "none")]
None,
#[serde(rename = "private")]
Private,
#[serde(rename = "public")]
Public,
#[serde(rename = "preview")]
Preview,
#[serde(rename = "released")]
Released,
#[serde(rename = "firstParty")]
FirstParty,
#[serde(rename = "all")]
All,
}
#[doc = "Permission on 'Request' operation"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum Request {
#[serde(rename = "none")]
None,
#[serde(rename = "private")]
Private,
#[serde(rename = "public")]
Public,
#[serde(rename = "preview")]
Preview,
#[serde(rename = "released")]
Released,
#[serde(rename = "firstParty")]
FirstParty,
#[serde(rename = "all")]
All,
}
}
#[doc = "A request for an extension (to be installed or have a license assigned)"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionRequest {
#[doc = "Required message supplied if the request is rejected"]
#[serde(
rename = "rejectMessage",
default,
skip_serializing_if = "Option::is_none"
)]
pub reject_message: Option<String>,
#[doc = "Date at which the request was made"]
#[serde(
rename = "requestDate",
default,
with = "crate::date_time::rfc3339::option"
)]
pub request_date: Option<time::OffsetDateTime>,
#[doc = ""]
#[serde(
rename = "requestedBy",
default,
skip_serializing_if = "Option::is_none"
)]
pub requested_by: Option<IdentityRef>,
#[doc = "Optional message supplied by the requester justifying the request"]
#[serde(
rename = "requestMessage",
default,
skip_serializing_if = "Option::is_none"
)]
pub request_message: Option<String>,
#[doc = "Represents the state of the request"]
#[serde(
rename = "requestState",
default,
skip_serializing_if = "Option::is_none"
)]
pub request_state: Option<extension_request::RequestState>,
#[doc = "Date at which the request was resolved"]
#[serde(
rename = "resolveDate",
default,
with = "crate::date_time::rfc3339::option"
)]
pub resolve_date: Option<time::OffsetDateTime>,
#[doc = ""]
#[serde(
rename = "resolvedBy",
default,
skip_serializing_if = "Option::is_none"
)]
pub resolved_by: Option<IdentityRef>,
}
impl ExtensionRequest {
pub fn new() -> Self {
Self::default()
}
}
pub mod extension_request {
use super::*;
#[doc = "Represents the state of the request"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum RequestState {
#[serde(rename = "open")]
Open,
#[serde(rename = "accepted")]
Accepted,
#[serde(rename = "rejected")]
Rejected,
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionRequestEvent {
#[doc = ""]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub extension: Option<PublishedExtension>,
#[doc = ""]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub host: Option<ExtensionHost>,
#[doc = "Name of the collection for which the extension was requested"]
#[serde(rename = "hostName", default, skip_serializing_if = "Option::is_none")]
pub host_name: Option<String>,
#[doc = ""]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub links: Option<ExtensionRequestUrls>,
#[doc = "A request for an extension (to be installed or have a license assigned)"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub request: Option<ExtensionRequest>,
#[doc = "The type of update that was made"]
#[serde(
rename = "updateType",
default,
skip_serializing_if = "Option::is_none"
)]
pub update_type: Option<extension_request_event::UpdateType>,
}
impl ExtensionRequestEvent {
pub fn new() -> Self {
Self::default()
}
}
pub mod extension_request_event {
use super::*;
#[doc = "The type of update that was made"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum UpdateType {
#[serde(rename = "created")]
Created,
#[serde(rename = "approved")]
Approved,
#[serde(rename = "rejected")]
Rejected,
#[serde(rename = "deleted")]
Deleted,
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionRequestUrls {
#[serde(flatten)]
pub extension_urls: ExtensionUrls,
#[doc = "Link to view the extension request"]
#[serde(
rename = "requestPage",
default,
skip_serializing_if = "Option::is_none"
)]
pub request_page: Option<String>,
}
impl ExtensionRequestUrls {
pub fn new() -> Self {
Self::default()
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionRequestsEvent {
#[doc = ""]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub extension: Option<PublishedExtension>,
#[doc = ""]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub host: Option<ExtensionHost>,
#[doc = ""]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub links: Option<ExtensionRequestUrls>,
#[doc = "The extension request object"]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub requests: Vec<ExtensionRequest>,
#[doc = "The type of update that was made"]
#[serde(
rename = "updateType",
default,
skip_serializing_if = "Option::is_none"
)]
pub update_type: Option<extension_requests_event::UpdateType>,
}
impl ExtensionRequestsEvent {
pub fn new() -> Self {
Self::default()
}
}
pub mod extension_requests_event {
use super::*;
#[doc = "The type of update that was made"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum UpdateType {
#[serde(rename = "created")]
Created,
#[serde(rename = "approved")]
Approved,
#[serde(rename = "rejected")]
Rejected,
#[serde(rename = "deleted")]
Deleted,
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionShare {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "isOrg", default, skip_serializing_if = "Option::is_none")]
pub is_org: Option<bool>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
impl ExtensionShare {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "The state of an extension"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionState {
#[serde(flatten)]
pub installed_extension_state: InstalledExtensionState,
#[serde(
rename = "extensionName",
default,
skip_serializing_if = "Option::is_none"
)]
pub extension_name: Option<String>,
#[doc = "The time at which the version was last checked"]
#[serde(
rename = "lastVersionCheck",
default,
with = "crate::date_time::rfc3339::option"
)]
pub last_version_check: Option<time::OffsetDateTime>,
#[serde(
rename = "publisherName",
default,
skip_serializing_if = "Option::is_none"
)]
pub publisher_name: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
impl ExtensionState {
pub fn new() -> Self {
Self::default()
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionStatistic {
#[serde(
rename = "statisticName",
default,
skip_serializing_if = "Option::is_none"
)]
pub statistic_name: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<f64>,
}
impl ExtensionStatistic {
pub fn new() -> Self {
Self::default()
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionUrls {
#[doc = "Url of the extension icon"]
#[serde(
rename = "extensionIcon",
default,
skip_serializing_if = "Option::is_none"
)]
pub extension_icon: Option<String>,
#[doc = "Link to view the extension details page"]
#[serde(
rename = "extensionPage",
default,
skip_serializing_if = "Option::is_none"
)]
pub extension_page: Option<String>,
}
impl ExtensionUrls {
pub fn new() -> Self {
Self::default()
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ExtensionVersion {
#[serde(rename = "assetUri", default, skip_serializing_if = "Option::is_none")]
pub asset_uri: Option<String>,
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub badges: Vec<ExtensionBadge>,
#[serde(
rename = "fallbackAssetUri",
default,
skip_serializing_if = "Option::is_none"
)]
pub fallback_asset_uri: Option<String>,
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub files: Vec<ExtensionFile>,
#[doc = ""]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub flags: Option<String>,
#[serde(
rename = "lastUpdated",
default,
with = "crate::date_time::rfc3339::option"
)]
pub last_updated: Option<time::OffsetDateTime>,
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub properties: Vec<serde_json::Value>,
#[serde(
rename = "targetPlatform",
default,
skip_serializing_if = "Option::is_none"
)]
pub target_platform: Option<String>,
#[serde(
rename = "validationResultMessage",
default,
skip_serializing_if = "Option::is_none"
)]
pub validation_result_message: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
#[serde(
rename = "versionDescription",
default,
skip_serializing_if = "Option::is_none"
)]
pub version_description: Option<String>,
}
impl ExtensionVersion {
pub fn new() -> Self {
Self::default()
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct GraphSubjectBase {
#[doc = "Links"]
#[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
pub links: Option<serde_json::Value>,
#[doc = "The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub descriptor: Option<String>,
#[doc = "This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider."]
#[serde(
rename = "displayName",
default,
skip_serializing_if = "Option::is_none"
)]
pub display_name: Option<String>,
#[doc = "This url is the full route to the source resource of this graph subject."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl GraphSubjectBase {
pub fn new() -> Self {
Self::default()
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct IdentityRef {
#[serde(flatten)]
pub graph_subject_base: GraphSubjectBase,
#[doc = "Deprecated - Can be retrieved by querying the Graph user referenced in the \"self\" entry of the IdentityRef \"_links\" dictionary"]
#[serde(
rename = "directoryAlias",
default,
skip_serializing_if = "Option::is_none"
)]
pub directory_alias: Option<String>,
pub id: String,
#[doc = "Deprecated - Available in the \"avatar\" entry of the IdentityRef \"_links\" dictionary"]
#[serde(rename = "imageUrl", default, skip_serializing_if = "Option::is_none")]
pub image_url: Option<String>,
#[doc = "Deprecated - Can be retrieved by querying the Graph membership state referenced in the \"membershipState\" entry of the GraphUser \"_links\" dictionary"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub inactive: Option<bool>,
#[doc = "Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)"]
#[serde(
rename = "isAadIdentity",
default,
skip_serializing_if = "Option::is_none"
)]
pub is_aad_identity: Option<bool>,
#[doc = "Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType)"]
#[serde(
rename = "isContainer",
default,
skip_serializing_if = "Option::is_none"
)]
pub is_container: Option<bool>,
#[serde(
rename = "isDeletedInOrigin",
default,
skip_serializing_if = "Option::is_none"
)]
pub is_deleted_in_origin: Option<bool>,
#[doc = "Deprecated - not in use in most preexisting implementations of ToIdentityRef"]
#[serde(
rename = "profileUrl",
default,
skip_serializing_if = "Option::is_none"
)]
pub profile_url: Option<String>,
#[doc = "Deprecated - use Domain+PrincipalName instead"]
#[serde(rename = "uniqueName")]
pub unique_name: String,
}
impl IdentityRef {
pub fn new(id: String, unique_name: String) -> Self {
Self {
graph_subject_base: GraphSubjectBase::default(),
directory_alias: None,
id,
image_url: None,
inactive: None,
is_aad_identity: None,
is_container: None,
is_deleted_in_origin: None,
profile_url: None,
unique_name,
}
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct InstallationTarget {
#[serde(
rename = "productArchitecture",
default,
skip_serializing_if = "Option::is_none"
)]
pub product_architecture: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub target: Option<String>,
#[serde(
rename = "targetVersion",
default,
skip_serializing_if = "Option::is_none"
)]
pub target_version: Option<String>,
}
impl InstallationTarget {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Represents a VSTS extension along with its installation state"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct InstalledExtension {
#[serde(flatten)]
pub extension_manifest: ExtensionManifest,
#[doc = "The friendly extension id for this extension - unique for a given publisher."]
#[serde(
rename = "extensionId",
default,
skip_serializing_if = "Option::is_none"
)]
pub extension_id: Option<String>,
#[doc = "The display name of the extension."]
#[serde(
rename = "extensionName",
default,
skip_serializing_if = "Option::is_none"
)]
pub extension_name: Option<String>,
#[doc = "This is the set of files available from the extension."]
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub files: Vec<ExtensionFile>,
#[doc = "Extension flags relevant to contribution consumers"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub flags: Option<String>,
#[doc = "The state of an installed extension"]
#[serde(
rename = "installState",
default,
skip_serializing_if = "Option::is_none"
)]
pub install_state: Option<InstalledExtensionState>,
#[doc = "This represents the date/time the extensions was last updated in the gallery. This doesnt mean this version was updated the value represents changes to any and all versions of the extension."]
#[serde(
rename = "lastPublished",
default,
with = "crate::date_time::rfc3339::option"
)]
pub last_published: Option<time::OffsetDateTime>,
#[doc = "Unique id of the publisher of this extension"]
#[serde(
rename = "publisherId",
default,
skip_serializing_if = "Option::is_none"
)]
pub publisher_id: Option<String>,
#[doc = "The display name of the publisher"]
#[serde(
rename = "publisherName",
default,
skip_serializing_if = "Option::is_none"
)]
pub publisher_name: Option<String>,
#[doc = "Unique id for this extension (the same id is used for all versions of a single extension)"]
#[serde(
rename = "registrationId",
default,
skip_serializing_if = "Option::is_none"
)]
pub registration_id: Option<String>,
#[doc = "Version of this extension"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
impl InstalledExtension {
pub fn new() -> Self {
Self::default()
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct InstalledExtensionList {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub count: Option<i32>,
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub value: Vec<InstalledExtension>,
}
impl InstalledExtensionList {
pub fn new() -> Self {
Self::default()
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct InstalledExtensionQuery {
#[serde(
rename = "assetTypes",
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub asset_types: Vec<String>,
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub monikers: Vec<ExtensionIdentifier>,
}
impl InstalledExtensionQuery {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "The state of an installed extension"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct InstalledExtensionState {
#[doc = "States of an installed extension"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub flags: Option<String>,
#[doc = "List of installation issues"]
#[serde(
rename = "installationIssues",
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub installation_issues: Vec<InstalledExtensionStateIssue>,
#[doc = "The time at which this installation was last updated"]
#[serde(
rename = "lastUpdated",
default,
with = "crate::date_time::rfc3339::option"
)]
pub last_updated: Option<time::OffsetDateTime>,
}
impl InstalledExtensionState {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Represents an installation issue"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct InstalledExtensionStateIssue {
#[doc = "The error message"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[doc = "Source of the installation issue, for example \"Demands\""]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub source: Option<String>,
#[doc = "Installation issue type (Warning, Error)"]
#[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
pub type_: Option<installed_extension_state_issue::Type>,
}
impl InstalledExtensionStateIssue {
pub fn new() -> Self {
Self::default()
}
}
pub mod installed_extension_state_issue {
use super::*;
#[doc = "Installation issue type (Warning, Error)"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "warning")]
Warning,
#[serde(rename = "error")]
Error,
}
}
#[doc = "Represents a JSON object."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JObject {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub item: Option<String>,
#[doc = "Gets the node type for this JToken."]
#[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
impl JObject {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Maps a contribution to a licensing behavior"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct LicensingOverride {
#[doc = "How the inclusion of this contribution should change based on licensing"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub behavior: Option<licensing_override::Behavior>,
#[doc = "Fully qualified contribution id which we want to define licensing behavior for"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
}
impl LicensingOverride {
pub fn new() -> Self {
Self::default()
}
}
pub mod licensing_override {
use super::*;
#[doc = "How the inclusion of this contribution should change based on licensing"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum Behavior {
#[serde(rename = "onlyIfLicensed")]
OnlyIfLicensed,
#[serde(rename = "onlyIfUnlicensed")]
OnlyIfUnlicensed,
#[serde(rename = "alwaysInclude")]
AlwaysInclude,
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PublishedExtension {
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub categories: Vec<String>,
#[serde(
rename = "deploymentType",
default,
skip_serializing_if = "Option::is_none"
)]
pub deployment_type: Option<published_extension::DeploymentType>,
#[serde(
rename = "displayName",
default,
skip_serializing_if = "Option::is_none"
)]
pub display_name: Option<String>,
#[serde(
rename = "extensionId",
default,
skip_serializing_if = "Option::is_none"
)]
pub extension_id: Option<String>,
#[serde(
rename = "extensionName",
default,
skip_serializing_if = "Option::is_none"
)]
pub extension_name: Option<String>,
#[doc = ""]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub flags: Option<String>,
#[serde(
rename = "installationTargets",
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub installation_targets: Vec<InstallationTarget>,
#[serde(
rename = "lastUpdated",
default,
with = "crate::date_time::rfc3339::option"
)]
pub last_updated: Option<time::OffsetDateTime>,
#[serde(
rename = "longDescription",
default,
skip_serializing_if = "Option::is_none"
)]
pub long_description: Option<String>,
#[doc = "Date on which the extension was first uploaded."]
#[serde(
rename = "publishedDate",
default,
with = "crate::date_time::rfc3339::option"
)]
pub published_date: Option<time::OffsetDateTime>,
#[doc = "High-level information about the publisher, like id's and names"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub publisher: Option<PublisherFacts>,
#[doc = "Date on which the extension first went public."]
#[serde(
rename = "releaseDate",
default,
with = "crate::date_time::rfc3339::option"
)]
pub release_date: Option<time::OffsetDateTime>,
#[serde(
rename = "sharedWith",
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub shared_with: Vec<ExtensionShare>,
#[serde(
rename = "shortDescription",
default,
skip_serializing_if = "Option::is_none"
)]
pub short_description: Option<String>,
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub statistics: Vec<ExtensionStatistic>,
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub tags: Vec<String>,
#[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub versions: Vec<ExtensionVersion>,
}
impl PublishedExtension {
pub fn new() -> Self {
Self::default()
}
}
pub mod published_extension {
use super::*;
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum DeploymentType {
#[serde(rename = "exe")]
Exe,
#[serde(rename = "msi")]
Msi,
#[serde(rename = "vsix")]
Vsix,
#[serde(rename = "referralLink")]
ReferralLink,
}
}
#[doc = "High-level information about the publisher, like id's and names"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PublisherFacts {
#[serde(
rename = "displayName",
default,
skip_serializing_if = "Option::is_none"
)]
pub display_name: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub domain: Option<String>,
#[doc = ""]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub flags: Option<String>,
#[serde(
rename = "isDomainVerified",
default,
skip_serializing_if = "Option::is_none"
)]
pub is_domain_verified: Option<bool>,
#[serde(
rename = "publisherId",
default,
skip_serializing_if = "Option::is_none"
)]
pub publisher_id: Option<String>,
#[serde(
rename = "publisherName",
default,
skip_serializing_if = "Option::is_none"
)]
pub publisher_name: Option<String>,
}
impl PublisherFacts {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "The class to represent a collection of REST reference links."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ReferenceLinks {
#[doc = "The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub links: Option<serde_json::Value>,
}
impl ReferenceLinks {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "A request for an extension (to be installed or have a license assigned)"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct RequestedExtension {
#[doc = "The unique name of the extension"]
#[serde(
rename = "extensionName",
default,
skip_serializing_if = "Option::is_none"
)]
pub extension_name: Option<String>,
#[doc = "A list of each request for the extension"]
#[serde(
rename = "extensionRequests",
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::serde::deserialize_null_default"
)]
pub extension_requests: Vec<ExtensionRequest>,
#[doc = "DisplayName of the publisher that owns the extension being published."]
#[serde(
rename = "publisherDisplayName",
default,
skip_serializing_if = "Option::is_none"
)]
pub publisher_display_name: Option<String>,
#[doc = "Represents the Publisher of the requested extension"]
#[serde(
rename = "publisherName",
default,
skip_serializing_if = "Option::is_none"
)]
pub publisher_name: Option<String>,
#[doc = "The total number of requests for an extension"]
#[serde(
rename = "requestCount",
default,
skip_serializing_if = "Option::is_none"
)]
pub request_count: Option<i32>,
}
impl RequestedExtension {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Entry for a specific data provider's resulting data"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ResolvedDataProvider {
#[doc = "The total time the data provider took to resolve its data (in milliseconds)"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub duration: Option<f32>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub error: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
}
impl ResolvedDataProvider {
pub fn new() -> Self {
Self::default()
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct Scope {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
impl Scope {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Information about the extension"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct SupportedExtension {
#[doc = "Unique Identifier for this extension"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub extension: Option<String>,
#[doc = "Unique Identifier for this publisher"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub publisher: Option<String>,
#[doc = "Supported version for this extension"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
impl SupportedExtension {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Represents the extension policy applied to a given user"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct UserExtensionPolicy {
#[doc = "User display name that this policy refers to"]
#[serde(
rename = "displayName",
default,
skip_serializing_if = "Option::is_none"
)]
pub display_name: Option<String>,
#[doc = "Policy with a set of permissions on extension operations"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub permissions: Option<ExtensionPolicy>,
#[doc = "User id that this policy refers to"]
#[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
pub user_id: Option<String>,
}
impl UserExtensionPolicy {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "This class is used to serialized collections as a single JSON object on the wire, to avoid serializing JSON arrays directly to the client, which can be a security hole"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct VssJsonCollectionWrapper {
#[serde(flatten)]
pub vss_json_collection_wrapper_base: VssJsonCollectionWrapperBase,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
impl VssJsonCollectionWrapper {
pub fn new() -> Self {
Self::default()
}
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct VssJsonCollectionWrapperBase {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub count: Option<i32>,
}
impl VssJsonCollectionWrapperBase {
pub fn new() -> Self {
Self::default()
}
}