azure_devops_rust_api 0.7.2

Rust API library for Azure DevOps
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
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![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 BuildPackage {
    #[doc = "Display name of the feed."]
    #[serde(rename = "feedName", default, skip_serializing_if = "Option::is_none")]
    pub feed_name: Option<String>,
    #[doc = "Package version description."]
    #[serde(
        rename = "packageDescription",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub package_description: Option<String>,
    #[doc = "Display name of the package."]
    #[serde(
        rename = "packageName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub package_name: Option<String>,
    #[doc = "Version of the package."]
    #[serde(
        rename = "packageVersion",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub package_version: Option<String>,
    #[doc = "TFS project id."]
    #[serde(rename = "projectId", default, skip_serializing_if = "Option::is_none")]
    pub project_id: Option<String>,
    #[doc = "Type of the package."]
    #[serde(
        rename = "protocolType",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub protocol_type: Option<String>,
}
impl BuildPackage {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "A container for artifacts."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct Feed {
    #[serde(flatten)]
    pub feed_core: FeedCore,
    #[doc = "Links"]
    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
    pub links: Option<serde_json::Value>,
    #[doc = "If set, this feed supports generation of package badges."]
    #[serde(
        rename = "badgesEnabled",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub badges_enabled: Option<bool>,
    #[doc = "The view that the feed administrator has indicated is the default experience for readers."]
    #[serde(
        rename = "defaultViewId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub default_view_id: Option<String>,
    #[doc = "The date that this feed was deleted."]
    #[serde(
        rename = "deletedDate",
        default,
        with = "crate::date_time::rfc3339::option"
    )]
    pub deleted_date: Option<time::OffsetDateTime>,
    #[doc = "A description for the feed.  Descriptions must not exceed 255 characters."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[doc = "If set, the feed will hide all deleted/unpublished versions"]
    #[serde(
        rename = "hideDeletedPackageVersions",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub hide_deleted_package_versions: Option<bool>,
    #[doc = "The date that this feed was permanently deleted."]
    #[serde(
        rename = "permanentDeletedDate",
        default,
        with = "crate::date_time::rfc3339::option"
    )]
    pub permanent_deleted_date: Option<time::OffsetDateTime>,
    #[doc = "Explicit permissions for the feed."]
    #[serde(
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub permissions: Vec<FeedPermission>,
    #[doc = "The date that this feed is scheduled to be permanently deleted."]
    #[serde(
        rename = "scheduledPermanentDeleteDate",
        default,
        with = "crate::date_time::rfc3339::option"
    )]
    pub scheduled_permanent_delete_date: Option<time::OffsetDateTime>,
    #[doc = "If set, time that the UpstreamEnabled property was changed. Will be null if UpstreamEnabled was never changed after Feed creation."]
    #[serde(
        rename = "upstreamEnabledChangedDate",
        default,
        with = "crate::date_time::rfc3339::option"
    )]
    pub upstream_enabled_changed_date: Option<time::OffsetDateTime>,
    #[doc = "The URL of the base feed in GUID form."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
}
impl Feed {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct FeedBatchData {
    #[doc = ""]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub data: Option<FeedBatchOperationData>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub operation: Option<feed_batch_data::Operation>,
}
impl FeedBatchData {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod feed_batch_data {
    use super::*;
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Operation {
        #[serde(rename = "saveCachedPackages")]
        SaveCachedPackages,
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct FeedBatchOperationData {}
impl FeedBatchOperationData {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "A container that encapsulates the state of the feed after a create, update, or delete."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct FeedChange {
    #[doc = "The type of operation."]
    #[serde(
        rename = "changeType",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub change_type: Option<feed_change::ChangeType>,
    #[doc = "A container for artifacts."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub feed: Option<Feed>,
    #[doc = "A token that identifies the next change in the log of changes."]
    #[serde(
        rename = "feedContinuationToken",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub feed_continuation_token: Option<i64>,
    #[doc = "A token that identifies the latest package change for this feed.  This can be used to quickly determine if there have been any changes to packages in a specific feed."]
    #[serde(
        rename = "latestPackageContinuationToken",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub latest_package_continuation_token: Option<i64>,
}
impl FeedChange {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod feed_change {
    use super::*;
    #[doc = "The type of operation."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum ChangeType {
        #[serde(rename = "addOrUpdate")]
        AddOrUpdate,
        #[serde(rename = "delete")]
        Delete,
        #[serde(rename = "permanentDelete")]
        PermanentDelete,
    }
}
#[doc = "A result set containing the feed changes for the range that was requested."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct FeedChangesResponse {
    #[doc = "The class to represent a collection of REST reference links."]
    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
    pub links: Option<ReferenceLinks>,
    #[doc = "The number of changes in this set."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub count: Option<i32>,
    #[doc = "A container that encapsulates the state of the feed after a create, update, or delete."]
    #[serde(
        rename = "feedChanges",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub feed_changes: Vec<FeedChange>,
    #[doc = "When iterating through the log of changes this value indicates the value that should be used for the next continuation token."]
    #[serde(
        rename = "nextFeedContinuationToken",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub next_feed_continuation_token: Option<i64>,
}
impl FeedChangesResponse {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "An object that contains all of the settings for a specific feed."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct FeedCore {
    #[doc = "Supported capabilities of a feed."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub capabilities: Option<feed_core::Capabilities>,
    #[doc = "This will either be the feed GUID or the feed GUID and view GUID depending on how the feed was accessed."]
    #[serde(
        rename = "fullyQualifiedId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub fully_qualified_id: Option<String>,
    #[doc = "Full name of the view, in feed@view format."]
    #[serde(
        rename = "fullyQualifiedName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub fully_qualified_name: Option<String>,
    #[doc = "A GUID that uniquely identifies this feed."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[doc = "If set, all packages in the feed are immutable.  It is important to note that feed views are immutable; therefore, this flag will always be set for views."]
    #[serde(
        rename = "isReadOnly",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub is_read_only: Option<bool>,
    #[doc = "A name for the feed. feed names must follow these rules: <list type=\"bullet\"><item><description> Must not exceed 64 characters </description></item><item><description> Must not contain whitespaces </description></item><item><description> Must not start with an underscore or a period </description></item><item><description> Must not end with a period </description></item><item><description> Must not contain any of the following illegal characters: <!\\[CDATA\\[ @, ~, ;, {, }, \\\\, +, =, <, >, |, /, \\\\\\\\, ?, :, &, $, *, \\\", #, \\[, \\] \\]\\]></description></item></list>"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[doc = ""]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub project: Option<ProjectReference>,
    #[doc = "OBSOLETE: This should always be true.  Setting to false will override all sources in UpstreamSources."]
    #[serde(
        rename = "upstreamEnabled",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub upstream_enabled: Option<bool>,
    #[doc = "A list of sources that this feed will fetch packages from.  An empty list indicates that this feed will not search any additional sources for packages."]
    #[serde(
        rename = "upstreamSources",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub upstream_sources: Vec<UpstreamSource>,
    #[doc = "A view on top of a feed."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub view: Option<FeedView>,
    #[doc = "View Id."]
    #[serde(rename = "viewId", default, skip_serializing_if = "Option::is_none")]
    pub view_id: Option<String>,
    #[doc = "View name."]
    #[serde(rename = "viewName", default, skip_serializing_if = "Option::is_none")]
    pub view_name: Option<String>,
}
impl FeedCore {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod feed_core {
    use super::*;
    #[doc = "Supported capabilities of a feed."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Capabilities {
        #[serde(rename = "none")]
        None,
        #[serde(rename = "upstreamV2")]
        UpstreamV2,
        #[serde(rename = "underMaintenance")]
        UnderMaintenance,
        #[serde(rename = "defaultCapabilities")]
        DefaultCapabilities,
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct FeedList {
    #[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<Feed>,
}
impl FeedList {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Permissions for a feed."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct FeedPermission {
    #[doc = "Display name for the identity."]
    #[serde(
        rename = "displayName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub display_name: Option<String>,
    #[doc = "An Identity descriptor is a wrapper for the identity type (Windows SID, Passport) along with a unique identifier such as the SID or PUID."]
    #[serde(
        rename = "identityDescriptor",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub identity_descriptor: Option<IdentityDescriptor>,
    #[doc = "Id of the identity associated with this role."]
    #[serde(
        rename = "identityId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub identity_id: Option<String>,
    #[doc = "Boolean indicating whether the role is inherited or set directly."]
    #[serde(
        rename = "isInheritedRole",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub is_inherited_role: Option<bool>,
    #[doc = "The role for this identity on a feed."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub role: Option<feed_permission::Role>,
}
impl FeedPermission {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod feed_permission {
    use super::*;
    #[doc = "The role for this identity on a feed."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Role {
        #[serde(rename = "custom")]
        Custom,
        #[serde(rename = "none")]
        None,
        #[serde(rename = "reader")]
        Reader,
        #[serde(rename = "contributor")]
        Contributor,
        #[serde(rename = "administrator")]
        Administrator,
        #[serde(rename = "collaborator")]
        Collaborator,
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct FeedPermissionList {
    #[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<FeedPermission>,
}
impl FeedPermissionList {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Retention policy settings."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct FeedRetentionPolicy {
    #[doc = "This attribute is deprecated and is not honoured by retention"]
    #[serde(
        rename = "ageLimitInDays",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub age_limit_in_days: Option<i32>,
    #[doc = "Maximum versions to preserve per package and package type."]
    #[serde(
        rename = "countLimit",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub count_limit: Option<i32>,
    #[doc = "Number of days to preserve a package version after its latest download."]
    #[serde(
        rename = "daysToKeepRecentlyDownloadedPackages",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub days_to_keep_recently_downloaded_packages: Option<i32>,
}
impl FeedRetentionPolicy {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Update a feed definition with these new values."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct FeedUpdate {
    #[doc = "If set, the feed will allow upload of packages that exist on the upstream"]
    #[serde(
        rename = "allowUpstreamNameConflict",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub allow_upstream_name_conflict: Option<bool>,
    #[doc = "If set, this feed supports generation of package badges."]
    #[serde(
        rename = "badgesEnabled",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub badges_enabled: Option<bool>,
    #[doc = "The view that the feed administrator has indicated is the default experience for readers."]
    #[serde(
        rename = "defaultViewId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub default_view_id: Option<String>,
    #[doc = "A description for the feed.  Descriptions must not exceed 255 characters."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[doc = "If set, feed will hide all deleted/unpublished versions"]
    #[serde(
        rename = "hideDeletedPackageVersions",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub hide_deleted_package_versions: Option<bool>,
    #[doc = "A GUID that uniquely identifies this feed."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[doc = "A name for the feed. feed names must follow these rules: <list type=\"bullet\"><item><description> Must not exceed 64 characters </description></item><item><description> Must not contain whitespaces </description></item><item><description> Must not start with an underscore or a period </description></item><item><description> Must not end with a period </description></item><item><description> Must not contain any of the following illegal characters: <!\\[CDATA\\[ @, ~, ;, {, }, \\\\, +, =, <, >, |, /, \\\\\\\\, ?, :, &, $, *, \\\", #, \\[, \\] \\]\\]></description></item></list>"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[doc = "OBSOLETE: If set, the feed can proxy packages from an upstream feed"]
    #[serde(
        rename = "upstreamEnabled",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub upstream_enabled: Option<bool>,
    #[doc = "A list of sources that this feed will fetch packages from.  An empty list indicates that this feed will not search any additional sources for packages."]
    #[serde(
        rename = "upstreamSources",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub upstream_sources: Vec<UpstreamSource>,
}
impl FeedUpdate {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "A view on top of a feed."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct FeedView {
    #[doc = "Links"]
    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
    pub links: Option<serde_json::Value>,
    #[doc = "Id of the view."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[doc = "Name of the view."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[doc = "Type of view."]
    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
    pub type_: Option<feed_view::Type>,
    #[doc = "Url of the view."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
    #[doc = "Visibility status of the view."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub visibility: Option<feed_view::Visibility>,
}
impl FeedView {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod feed_view {
    use super::*;
    #[doc = "Type of view."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Type {
        #[serde(rename = "none")]
        None,
        #[serde(rename = "release")]
        Release,
        #[serde(rename = "implicit")]
        Implicit,
    }
    #[doc = "Visibility status of the view."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Visibility {
        #[serde(rename = "private")]
        Private,
        #[serde(rename = "collection")]
        Collection,
        #[serde(rename = "organization")]
        Organization,
        #[serde(rename = "aadTenant")]
        AadTenant,
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct FeedViewList {
    #[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<FeedView>,
}
impl FeedViewList {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Permissions for feed service-wide operations such as the creation of new feeds."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct GlobalPermission {
    #[doc = "An Identity descriptor is a wrapper for the identity type (Windows SID, Passport) along with a unique identifier such as the SID or PUID."]
    #[serde(
        rename = "identityDescriptor",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub identity_descriptor: Option<IdentityDescriptor>,
    #[doc = "IdentityId corresponding to the IdentityDescriptor"]
    #[serde(
        rename = "identityId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub identity_id: Option<String>,
    #[doc = "Role associated with the Identity."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub role: Option<global_permission::Role>,
}
impl GlobalPermission {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod global_permission {
    use super::*;
    #[doc = "Role associated with the Identity."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Role {
        #[serde(rename = "custom")]
        Custom,
        #[serde(rename = "none")]
        None,
        #[serde(rename = "feedCreator")]
        FeedCreator,
        #[serde(rename = "administrator")]
        Administrator,
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct GlobalPermissionList {
    #[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<GlobalPermission>,
}
impl GlobalPermissionList {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "An Identity descriptor is a wrapper for the identity type (Windows SID, Passport) along with a unique identifier such as the SID or PUID."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct IdentityDescriptor {
    #[doc = "The unique identifier for this identity, not exceeding 256 chars, which will be persisted."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub identifier: Option<String>,
    #[doc = "Type of descriptor (for example, Windows, Passport, etc.)."]
    #[serde(
        rename = "identityType",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub identity_type: Option<String>,
}
impl IdentityDescriptor {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "The JSON model for JSON Patch Operations"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JsonPatchDocument {}
impl JsonPatchDocument {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "The JSON model for a JSON Patch operation"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JsonPatchOperation {
    #[doc = "The path to copy from for the Move/Copy operation."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub from: Option<String>,
    #[doc = "The patch operation"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub op: Option<json_patch_operation::Op>,
    #[doc = "The path for the operation. In the case of an array, a zero based index can be used to specify the position in the array (e.g. /biscuits/0/name). The \"-\" character can be used instead of an index to insert at the end of the array (e.g. /biscuits/-)."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub path: Option<String>,
    #[doc = "The value for the operation. This is either a primitive or a JToken."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub value: Option<serde_json::Value>,
}
impl JsonPatchOperation {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod json_patch_operation {
    use super::*;
    #[doc = "The patch operation"]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Op {
        #[serde(rename = "add")]
        Add,
        #[serde(rename = "remove")]
        Remove,
        #[serde(rename = "replace")]
        Replace,
        #[serde(rename = "move")]
        Move,
        #[serde(rename = "copy")]
        Copy,
        #[serde(rename = "test")]
        Test,
    }
}
#[doc = "Core data about any package, including its id and version information and basic state."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct MinimalPackageVersion {
    #[doc = "Upstream source this package was ingested from."]
    #[serde(
        rename = "directUpstreamSourceId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub direct_upstream_source_id: Option<String>,
    #[doc = "Id for the package."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[doc = "\\[Obsolete\\] Used for legacy scenarios and may be removed in future versions."]
    #[serde(
        rename = "isCachedVersion",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub is_cached_version: Option<bool>,
    #[doc = "True if this package has been deleted."]
    #[serde(rename = "isDeleted", default, skip_serializing_if = "Option::is_none")]
    pub is_deleted: Option<bool>,
    #[doc = "True if this is the latest version of the package by package type sort order."]
    #[serde(rename = "isLatest", default, skip_serializing_if = "Option::is_none")]
    pub is_latest: Option<bool>,
    #[doc = "(NuGet Only) True if this package is listed."]
    #[serde(rename = "isListed", default, skip_serializing_if = "Option::is_none")]
    pub is_listed: Option<bool>,
    #[doc = "Normalized version using normalization rules specific to a package type."]
    #[serde(
        rename = "normalizedVersion",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub normalized_version: Option<String>,
    #[doc = "Package description."]
    #[serde(
        rename = "packageDescription",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub package_description: Option<String>,
    #[doc = "UTC Date the package was published to the service."]
    #[serde(
        rename = "publishDate",
        default,
        with = "crate::date_time::rfc3339::option"
    )]
    pub publish_date: Option<time::OffsetDateTime>,
    #[doc = "Internal storage id."]
    #[serde(rename = "storageId", default, skip_serializing_if = "Option::is_none")]
    pub storage_id: Option<String>,
    #[doc = "Display version."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub version: Option<String>,
    #[doc = "List of views containing this package version."]
    #[serde(
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub views: Vec<FeedView>,
}
impl MinimalPackageVersion {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Reference for an async operation."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct OperationReference {
    #[doc = "Unique identifier for the operation."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[doc = "Unique identifier for the plugin."]
    #[serde(rename = "pluginId", default, skip_serializing_if = "Option::is_none")]
    pub plugin_id: Option<String>,
    #[doc = "The current status of the operation."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<operation_reference::Status>,
    #[doc = "URL to get the full operation object."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
}
impl OperationReference {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod operation_reference {
    use super::*;
    #[doc = "The current status of the operation."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Status {
        #[serde(rename = "notSet")]
        NotSet,
        #[serde(rename = "queued")]
        Queued,
        #[serde(rename = "inProgress")]
        InProgress,
        #[serde(rename = "cancelled")]
        Cancelled,
        #[serde(rename = "succeeded")]
        Succeeded,
        #[serde(rename = "failed")]
        Failed,
    }
}
#[doc = "A package, which is a container for one or more package versions."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct Package {
    #[doc = "Links"]
    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
    pub links: Option<serde_json::Value>,
    #[doc = "Id of the package."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[doc = "Used for legacy scenarios and may be removed in future versions."]
    #[serde(rename = "isCached", default, skip_serializing_if = "Option::is_none")]
    pub is_cached: Option<bool>,
    #[doc = "The display name of the package."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[doc = "The normalized name representing the identity of this package within its package type."]
    #[serde(
        rename = "normalizedName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub normalized_name: Option<String>,
    #[doc = "Type of the package."]
    #[serde(
        rename = "protocolType",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub protocol_type: Option<String>,
    #[doc = "\\[Obsolete\\] - this field is unused and will be removed in a future release."]
    #[serde(rename = "starCount", default, skip_serializing_if = "Option::is_none")]
    pub star_count: Option<i32>,
    #[doc = "Url for this package."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
    #[doc = "All versions for this package within its feed."]
    #[serde(
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub versions: Vec<MinimalPackageVersion>,
}
impl Package {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "A single change to a feed's packages."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PackageChange {
    #[doc = "A package, which is a container for one or more package versions."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub package: Option<Package>,
    #[doc = "A change to a single package version."]
    #[serde(
        rename = "packageVersionChange",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub package_version_change: Option<PackageVersionChange>,
}
impl PackageChange {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "A set of change operations to a feed's packages."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PackageChangesResponse {
    #[doc = "Links"]
    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
    pub links: Option<serde_json::Value>,
    #[doc = "Number of changes in this batch."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub count: Option<i32>,
    #[doc = "Token that should be used in future calls for this feed to retrieve new changes."]
    #[serde(
        rename = "nextPackageContinuationToken",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub next_package_continuation_token: Option<i64>,
    #[doc = "List of changes."]
    #[serde(
        rename = "packageChanges",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub package_changes: Vec<PackageChange>,
}
impl PackageChangesResponse {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "A dependency on another package version."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PackageDependency {
    #[doc = "Dependency package group (an optional classification within some package types)."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub group: Option<String>,
    #[doc = "Dependency package name."]
    #[serde(
        rename = "packageName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub package_name: Option<String>,
    #[doc = "Dependency package version range."]
    #[serde(
        rename = "versionRange",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub version_range: Option<String>,
}
impl PackageDependency {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "A package file for a specific package version, only relevant to package types that contain multiple files per version."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PackageFile {
    #[doc = "Hierarchical representation of files."]
    #[serde(
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub children: Vec<PackageFile>,
    #[doc = "File name."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[doc = "Extended metadata for a specific package type."]
    #[serde(
        rename = "protocolMetadata",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub protocol_metadata: Option<ProtocolMetadata>,
}
impl PackageFile {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PackageList {
    #[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<Package>,
}
impl PackageList {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "All metrics for a certain package id"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PackageMetrics {
    #[doc = "Total count of downloads per package id."]
    #[serde(
        rename = "downloadCount",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub download_count: Option<f64>,
    #[doc = "Number of downloads per unique user per package id."]
    #[serde(
        rename = "downloadUniqueUsers",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub download_unique_users: Option<f64>,
    #[doc = "UTC date and time when package was last downloaded."]
    #[serde(
        rename = "lastDownloaded",
        default,
        with = "crate::date_time::rfc3339::option"
    )]
    pub last_downloaded: Option<time::OffsetDateTime>,
    #[doc = "Package id."]
    #[serde(rename = "packageId", default, skip_serializing_if = "Option::is_none")]
    pub package_id: Option<String>,
}
impl PackageMetrics {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PackageMetricsList {
    #[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<PackageMetrics>,
}
impl PackageMetricsList {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Query to get package metrics"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PackageMetricsQuery {
    #[doc = "List of package ids"]
    #[serde(
        rename = "packageIds",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub package_ids: Vec<String>,
}
impl PackageMetricsQuery {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "A specific version of a package."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PackageVersion {
    #[serde(flatten)]
    pub minimal_package_version: MinimalPackageVersion,
    #[doc = "Links"]
    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
    pub links: Option<serde_json::Value>,
    #[doc = "Package version author."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub author: Option<String>,
    #[doc = "UTC date that this package version was deleted."]
    #[serde(
        rename = "deletedDate",
        default,
        with = "crate::date_time::rfc3339::option"
    )]
    pub deleted_date: Option<time::OffsetDateTime>,
    #[doc = "List of dependencies for this package version."]
    #[serde(
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub dependencies: Vec<PackageDependency>,
    #[doc = "Package version description."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[doc = "Files associated with this package version, only relevant for multi-file package types."]
    #[serde(
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub files: Vec<PackageFile>,
    #[doc = "Other versions of this package."]
    #[serde(
        rename = "otherVersions",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub other_versions: Vec<MinimalPackageVersion>,
    #[doc = "Extended metadata for a specific package type."]
    #[serde(
        rename = "protocolMetadata",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub protocol_metadata: Option<ProtocolMetadata>,
    #[doc = "List of upstream sources through which a package version moved to land in this feed."]
    #[serde(
        rename = "sourceChain",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub source_chain: Vec<UpstreamSource>,
    #[doc = "Package version summary."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub summary: Option<String>,
    #[doc = "Package version tags."]
    #[serde(
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub tags: Vec<String>,
    #[doc = "Package version url."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
}
impl PackageVersion {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "A change to a single package version."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PackageVersionChange {
    #[doc = "The type of change that was performed."]
    #[serde(
        rename = "changeType",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub change_type: Option<package_version_change::ChangeType>,
    #[doc = "Token marker for this change, allowing the caller to send this value back to the service and receive changes beyond this one."]
    #[serde(
        rename = "continuationToken",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub continuation_token: Option<i64>,
    #[doc = "A specific version of a package."]
    #[serde(
        rename = "packageVersion",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub package_version: Option<PackageVersion>,
}
impl PackageVersionChange {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod package_version_change {
    use super::*;
    #[doc = "The type of change that was performed."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum ChangeType {
        #[serde(rename = "addOrUpdate")]
        AddOrUpdate,
        #[serde(rename = "delete")]
        Delete,
        #[serde(rename = "permanentDelete")]
        PermanentDelete,
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PackageVersionList {
    #[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<PackageVersion>,
}
impl PackageVersionList {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "All metrics for a certain package version id"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PackageVersionMetrics {
    #[doc = "Total count of downloads per package version id."]
    #[serde(
        rename = "downloadCount",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub download_count: Option<f64>,
    #[doc = "Number of downloads per unique user per package version id."]
    #[serde(
        rename = "downloadUniqueUsers",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub download_unique_users: Option<f64>,
    #[doc = "UTC date and time when package version was last downloaded."]
    #[serde(
        rename = "lastDownloaded",
        default,
        with = "crate::date_time::rfc3339::option"
    )]
    pub last_downloaded: Option<time::OffsetDateTime>,
    #[doc = "Package id."]
    #[serde(rename = "packageId", default, skip_serializing_if = "Option::is_none")]
    pub package_id: Option<String>,
    #[doc = "Package version id."]
    #[serde(
        rename = "packageVersionId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub package_version_id: Option<String>,
}
impl PackageVersionMetrics {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PackageVersionMetricsList {
    #[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<PackageVersionMetrics>,
}
impl PackageVersionMetricsList {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Query to get package version metrics"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PackageVersionMetricsQuery {
    #[doc = "List of package version ids"]
    #[serde(
        rename = "packageVersionIds",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub package_version_ids: Vec<String>,
}
impl PackageVersionMetricsQuery {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Provenance for a published package version"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PackageVersionProvenance {
    #[doc = "Name or Id of the feed."]
    #[serde(rename = "feedId", default, skip_serializing_if = "Option::is_none")]
    pub feed_id: Option<String>,
    #[doc = "Id of the package (GUID Id, not name)."]
    #[serde(rename = "packageId", default, skip_serializing_if = "Option::is_none")]
    pub package_id: Option<String>,
    #[doc = "Id of the package version (GUID Id, not name)."]
    #[serde(
        rename = "packageVersionId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub package_version_id: Option<String>,
    #[doc = "Data about the origin of a published package"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub provenance: Option<Provenance>,
}
impl PackageVersionProvenance {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ProjectReference {
    #[doc = "Gets or sets id of the project."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[doc = "Gets or sets name of the project."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[doc = "Gets or sets visibility of the project."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub visibility: Option<String>,
}
impl ProjectReference {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Extended metadata for a specific package type."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ProtocolMetadata {
    #[doc = "Extended metadata for a specific package type, formatted to the associated schema version definition."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub data: Option<serde_json::Value>,
    #[doc = "Schema version."]
    #[serde(
        rename = "schemaVersion",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub schema_version: Option<i32>,
}
impl ProtocolMetadata {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Data about the origin of a published package"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct Provenance {
    #[doc = "Other provenance data."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub data: Option<serde_json::Value>,
    #[doc = "Type of provenance source, for example \"InternalBuild\", \"InternalRelease\""]
    #[serde(
        rename = "provenanceSource",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub provenance_source: Option<String>,
    #[doc = "Identity of user that published the package"]
    #[serde(
        rename = "publisherUserIdentity",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub publisher_user_identity: Option<String>,
    #[doc = "HTTP User-Agent used when pushing the package."]
    #[serde(rename = "userAgent", default, skip_serializing_if = "Option::is_none")]
    pub user_agent: Option<String>,
}
impl Provenance {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "A single package version within the recycle bin."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct RecycleBinPackageVersion {
    #[serde(flatten)]
    pub package_version: PackageVersion,
    #[doc = "UTC date on which the package will automatically be removed from the recycle bin and permanently deleted."]
    #[serde(
        rename = "scheduledPermanentDeleteDate",
        default,
        with = "crate::date_time::rfc3339::option"
    )]
    pub scheduled_permanent_delete_date: Option<time::OffsetDateTime>,
}
impl RecycleBinPackageVersion {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct RecycleBinPackageVersionList {
    #[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<RecycleBinPackageVersion>,
}
impl RecycleBinPackageVersionList {
    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 = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct SaveCachedPackagesData {
    #[serde(flatten)]
    pub feed_batch_operation_data: FeedBatchOperationData,
    #[serde(
        rename = "normalizedPackageNames",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub normalized_package_names: Vec<String>,
    #[serde(
        rename = "viewsForPromotion",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub views_for_promotion: Vec<String>,
}
impl SaveCachedPackagesData {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct SessionRequest {
    #[doc = "Generic property bag to store data about the session"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub data: Option<serde_json::Value>,
    #[doc = "The feed name or id for the session"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub feed: Option<String>,
    #[doc = "The type of session If a known value is provided, the Data dictionary will be validated for the presence of properties required by that type"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub source: Option<String>,
}
impl SessionRequest {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct SessionResponse {
    #[doc = "The unique identifier for the session"]
    #[serde(rename = "sessionId", default, skip_serializing_if = "Option::is_none")]
    pub session_id: Option<String>,
    #[doc = "The name for the session"]
    #[serde(
        rename = "sessionName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub session_name: Option<String>,
}
impl SessionResponse {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Upstream source definition, including its Identity, package type, and other associated information."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct UpstreamSource {
    #[doc = "UTC date that this upstream was deleted."]
    #[serde(
        rename = "deletedDate",
        default,
        with = "crate::date_time::rfc3339::option"
    )]
    pub deleted_date: Option<time::OffsetDateTime>,
    #[doc = "Locator for connecting to the upstream source in a user friendly format, that may potentially change over time"]
    #[serde(
        rename = "displayLocation",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub display_location: Option<String>,
    #[doc = "Identity of the upstream source."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[doc = "For an internal upstream type, track the Azure DevOps organization that contains it."]
    #[serde(
        rename = "internalUpstreamCollectionId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub internal_upstream_collection_id: Option<String>,
    #[doc = "For an internal upstream type, track the feed id being referenced."]
    #[serde(
        rename = "internalUpstreamFeedId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub internal_upstream_feed_id: Option<String>,
    #[doc = "For an internal upstream type, track the project of the feed being referenced."]
    #[serde(
        rename = "internalUpstreamProjectId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub internal_upstream_project_id: Option<String>,
    #[doc = "For an internal upstream type, track the view of the feed being referenced."]
    #[serde(
        rename = "internalUpstreamViewId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub internal_upstream_view_id: Option<String>,
    #[doc = "Consistent locator for connecting to the upstream source."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub location: Option<String>,
    #[doc = "Display name."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[doc = "Package type associated with the upstream source."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub protocol: Option<String>,
    #[doc = "The identity of the service endpoint that holds credentials to use when accessing the upstream."]
    #[serde(
        rename = "serviceEndpointId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub service_endpoint_id: Option<String>,
    #[doc = "Specifies the projectId of the Service Endpoint."]
    #[serde(
        rename = "serviceEndpointProjectId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub service_endpoint_project_id: Option<String>,
    #[doc = "Specifies the status of the upstream."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<upstream_source::Status>,
    #[doc = "Provides a human-readable reason for the status of the upstream."]
    #[serde(
        rename = "statusDetails",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub status_details: Vec<UpstreamStatusDetail>,
    #[doc = "Source type, such as Public or Internal."]
    #[serde(
        rename = "upstreamSourceType",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub upstream_source_type: Option<upstream_source::UpstreamSourceType>,
}
impl UpstreamSource {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod upstream_source {
    use super::*;
    #[doc = "Specifies the status of the upstream."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Status {
        #[serde(rename = "ok")]
        Ok,
        #[serde(rename = "disabled")]
        Disabled,
    }
    #[doc = "Source type, such as Public or Internal."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum UpstreamSourceType {
        #[serde(rename = "public")]
        Public,
        #[serde(rename = "internal")]
        Internal,
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct UpstreamStatusDetail {
    #[doc = "Provides a human-readable reason for the status of the upstream."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub reason: Option<String>,
}
impl UpstreamStatusDetail {
    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()
    }
}