azure_svc_blobstorage/package_2021_12/
models.rs

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
#![allow(non_camel_case_types)]
#![allow(unused_imports)]
use serde::de::{value, Deserializer, IntoDeserializer};
use serde::{Deserialize, Serialize, Serializer};
use std::str::FromStr;
#[doc = "An Access policy"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AccessPolicy {
    #[doc = "the date-time the policy is active"]
    #[serde(rename = "Start", default, with = "azure_core::date::rfc3339::option")]
    pub start: Option<time::OffsetDateTime>,
    #[doc = "the date-time the policy expires"]
    #[serde(rename = "Expiry", default, with = "azure_core::date::rfc3339::option")]
    pub expiry: Option<time::OffsetDateTime>,
    #[doc = "the permissions for the acl policy"]
    #[serde(rename = "Permission", default, skip_serializing_if = "Option::is_none")]
    pub permission: Option<String>,
}
impl AccessPolicy {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(remote = "AccessTier")]
pub enum AccessTier {
    P4,
    P6,
    P10,
    P15,
    P20,
    P30,
    P40,
    P50,
    P60,
    P70,
    P80,
    Hot,
    Cool,
    Archive,
    Premium,
    Cold,
    #[serde(skip_deserializing)]
    UnknownValue(String),
}
impl FromStr for AccessTier {
    type Err = value::Error;
    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Self::deserialize(s.into_deserializer())
    }
}
impl<'de> Deserialize<'de> for AccessTier {
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: Deserializer<'de>,
    {
        let s = String::deserialize(deserializer)?;
        let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
        Ok(deserialized)
    }
}
impl Serialize for AccessTier {
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: Serializer,
    {
        match self {
            Self::P4 => serializer.serialize_unit_variant("AccessTier", 0u32, "P4"),
            Self::P6 => serializer.serialize_unit_variant("AccessTier", 1u32, "P6"),
            Self::P10 => serializer.serialize_unit_variant("AccessTier", 2u32, "P10"),
            Self::P15 => serializer.serialize_unit_variant("AccessTier", 3u32, "P15"),
            Self::P20 => serializer.serialize_unit_variant("AccessTier", 4u32, "P20"),
            Self::P30 => serializer.serialize_unit_variant("AccessTier", 5u32, "P30"),
            Self::P40 => serializer.serialize_unit_variant("AccessTier", 6u32, "P40"),
            Self::P50 => serializer.serialize_unit_variant("AccessTier", 7u32, "P50"),
            Self::P60 => serializer.serialize_unit_variant("AccessTier", 8u32, "P60"),
            Self::P70 => serializer.serialize_unit_variant("AccessTier", 9u32, "P70"),
            Self::P80 => serializer.serialize_unit_variant("AccessTier", 10u32, "P80"),
            Self::Hot => serializer.serialize_unit_variant("AccessTier", 11u32, "Hot"),
            Self::Cool => serializer.serialize_unit_variant("AccessTier", 12u32, "Cool"),
            Self::Archive => serializer.serialize_unit_variant("AccessTier", 13u32, "Archive"),
            Self::Premium => serializer.serialize_unit_variant("AccessTier", 14u32, "Premium"),
            Self::Cold => serializer.serialize_unit_variant("AccessTier", 15u32, "Cold"),
            Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
        }
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(remote = "ArchiveStatus")]
pub enum ArchiveStatus {
    #[serde(rename = "rehydrate-pending-to-hot")]
    RehydratePendingToHot,
    #[serde(rename = "rehydrate-pending-to-cool")]
    RehydratePendingToCool,
    #[serde(rename = "rehydrate-pending-to-cold")]
    RehydratePendingToCold,
    #[serde(skip_deserializing)]
    UnknownValue(String),
}
impl FromStr for ArchiveStatus {
    type Err = value::Error;
    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Self::deserialize(s.into_deserializer())
    }
}
impl<'de> Deserialize<'de> for ArchiveStatus {
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: Deserializer<'de>,
    {
        let s = String::deserialize(deserializer)?;
        let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
        Ok(deserialized)
    }
}
impl Serialize for ArchiveStatus {
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: Serializer,
    {
        match self {
            Self::RehydratePendingToHot => serializer.serialize_unit_variant("ArchiveStatus", 0u32, "rehydrate-pending-to-hot"),
            Self::RehydratePendingToCool => serializer.serialize_unit_variant("ArchiveStatus", 1u32, "rehydrate-pending-to-cool"),
            Self::RehydratePendingToCold => serializer.serialize_unit_variant("ArchiveStatus", 2u32, "rehydrate-pending-to-cold"),
            Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
        }
    }
}
#[doc = "Groups the settings used for formatting the response if the response should be Arrow formatted."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ArrowConfiguration {
    #[serde(rename = "Schema")]
    pub schema: arrow_configuration::Schema,
}
impl ArrowConfiguration {
    pub fn new(schema: arrow_configuration::Schema) -> Self {
        Self { schema }
    }
}
pub mod arrow_configuration {
    use super::*;
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
    pub struct Schema {
        #[serde(rename = "$value", default, skip_serializing_if = "Vec::is_empty")]
        pub items: Vec<ArrowField>,
    }
}
#[doc = "Groups settings regarding specific field of an arrow schema"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ArrowField {
    #[serde(rename = "Type")]
    pub type_: String,
    #[serde(rename = "Name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "Precision", default, skip_serializing_if = "Option::is_none")]
    pub precision: Option<i64>,
    #[serde(rename = "Scale", default, skip_serializing_if = "Option::is_none")]
    pub scale: Option<i64>,
}
impl ArrowField {
    pub fn new(type_: String) -> Self {
        Self {
            type_,
            name: None,
            precision: None,
            scale: None,
        }
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct BlobFlatListSegment {
    #[serde(rename = "BlobItems")]
    pub blob_items: Vec<BlobItemInternal>,
}
impl BlobFlatListSegment {
    pub fn new(blob_items: Vec<BlobItemInternal>) -> Self {
        Self { blob_items }
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct BlobHierarchyListSegment {
    #[serde(
        rename = "BlobPrefixes",
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub blob_prefixes: Vec<BlobPrefix>,
    #[serde(rename = "BlobItems")]
    pub blob_items: Vec<BlobItemInternal>,
}
impl BlobHierarchyListSegment {
    pub fn new(blob_items: Vec<BlobItemInternal>) -> Self {
        Self {
            blob_prefixes: Vec::new(),
            blob_items,
        }
    }
}
#[doc = "An Azure Storage blob"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct BlobItemInternal {
    #[serde(rename = "Name")]
    pub name: BlobName,
    #[serde(rename = "Deleted")]
    pub deleted: bool,
    #[serde(rename = "Snapshot")]
    pub snapshot: String,
    #[serde(rename = "VersionId", default, skip_serializing_if = "Option::is_none")]
    pub version_id: Option<String>,
    #[serde(rename = "IsCurrentVersion", default, skip_serializing_if = "Option::is_none")]
    pub is_current_version: Option<bool>,
    #[doc = "Properties of a blob"]
    #[serde(rename = "Properties")]
    pub properties: BlobPropertiesInternal,
    #[serde(rename = "Metadata", default, skip_serializing_if = "Option::is_none")]
    pub metadata: Option<BlobMetadata>,
    #[doc = "Blob tags"]
    #[serde(rename = "Tags", default, skip_serializing_if = "Option::is_none")]
    pub tags: Option<BlobTags>,
    #[serde(rename = "OrMetadata", default, skip_serializing_if = "Option::is_none")]
    pub or_metadata: Option<ObjectReplicationMetadata>,
    #[serde(rename = "HasVersionsOnly", default, skip_serializing_if = "Option::is_none")]
    pub has_versions_only: Option<bool>,
}
impl BlobItemInternal {
    pub fn new(name: BlobName, deleted: bool, snapshot: String, properties: BlobPropertiesInternal) -> Self {
        Self {
            name,
            deleted,
            snapshot,
            version_id: None,
            is_current_version: None,
            properties,
            metadata: None,
            tags: None,
            or_metadata: None,
            has_versions_only: None,
        }
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct BlobMetadata {
    #[serde(rename = "@Encrypted", default, skip_serializing_if = "Option::is_none")]
    pub encrypted: Option<String>,
}
impl BlobMetadata {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct BlobName {
    #[doc = "Indicates if the blob name is encoded."]
    #[serde(rename = "@Encoded", default, skip_serializing_if = "Option::is_none")]
    pub encoded: Option<bool>,
    #[doc = "The name of the blob."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub content: Option<String>,
}
impl BlobName {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct BlobPrefix {
    #[serde(rename = "Name")]
    pub name: BlobName,
}
impl BlobPrefix {
    pub fn new(name: BlobName) -> Self {
        Self { name }
    }
}
#[doc = "Properties of a blob"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct BlobPropertiesInternal {
    #[serde(rename = "Creation-Time", default, with = "azure_core::date::rfc1123::option")]
    pub creation_time: Option<time::OffsetDateTime>,
    #[serde(rename = "Last-Modified", with = "azure_core::date::rfc1123")]
    pub last_modified: time::OffsetDateTime,
    #[serde(rename = "Etag")]
    pub etag: String,
    #[doc = "Size in bytes"]
    #[serde(rename = "Content-Length", default, skip_serializing_if = "Option::is_none")]
    pub content_length: Option<i64>,
    #[serde(rename = "Content-Type", default, skip_serializing_if = "Option::is_none")]
    pub content_type: Option<String>,
    #[serde(rename = "Content-Encoding", default, skip_serializing_if = "Option::is_none")]
    pub content_encoding: Option<String>,
    #[serde(rename = "Content-Language", default, skip_serializing_if = "Option::is_none")]
    pub content_language: Option<String>,
    #[serde(rename = "Content-MD5", default, skip_serializing_if = "Option::is_none")]
    pub content_md5: Option<String>,
    #[serde(rename = "Content-Disposition", default, skip_serializing_if = "Option::is_none")]
    pub content_disposition: Option<String>,
    #[serde(rename = "Cache-Control", default, skip_serializing_if = "Option::is_none")]
    pub cache_control: Option<String>,
    #[serde(rename = "x-ms-blob-sequence-number", default, skip_serializing_if = "Option::is_none")]
    pub x_ms_blob_sequence_number: Option<i64>,
    #[serde(
        rename = "BlobType",
        default,
        skip_serializing_if = "Option::is_none",
        with = "azure_core::xml::text_content"
    )]
    pub blob_type: Option<blob_properties_internal::BlobType>,
    #[serde(
        rename = "LeaseStatus",
        default,
        skip_serializing_if = "Option::is_none",
        with = "azure_core::xml::text_content"
    )]
    pub lease_status: Option<LeaseStatus>,
    #[serde(
        rename = "LeaseState",
        default,
        skip_serializing_if = "Option::is_none",
        with = "azure_core::xml::text_content"
    )]
    pub lease_state: Option<LeaseState>,
    #[serde(
        rename = "LeaseDuration",
        default,
        skip_serializing_if = "Option::is_none",
        with = "azure_core::xml::text_content"
    )]
    pub lease_duration: Option<LeaseDuration>,
    #[serde(rename = "CopyId", default, skip_serializing_if = "Option::is_none")]
    pub copy_id: Option<String>,
    #[serde(
        rename = "CopyStatus",
        default,
        skip_serializing_if = "Option::is_none",
        with = "azure_core::xml::text_content"
    )]
    pub copy_status: Option<CopyStatus>,
    #[serde(rename = "CopySource", default, skip_serializing_if = "Option::is_none")]
    pub copy_source: Option<String>,
    #[serde(rename = "CopyProgress", default, skip_serializing_if = "Option::is_none")]
    pub copy_progress: Option<String>,
    #[serde(rename = "CopyCompletionTime", default, with = "azure_core::date::rfc1123::option")]
    pub copy_completion_time: Option<time::OffsetDateTime>,
    #[serde(rename = "CopyStatusDescription", default, skip_serializing_if = "Option::is_none")]
    pub copy_status_description: Option<String>,
    #[serde(rename = "ServerEncrypted", default, skip_serializing_if = "Option::is_none")]
    pub server_encrypted: Option<bool>,
    #[serde(rename = "IncrementalCopy", default, skip_serializing_if = "Option::is_none")]
    pub incremental_copy: Option<bool>,
    #[serde(rename = "DestinationSnapshot", default, skip_serializing_if = "Option::is_none")]
    pub destination_snapshot: Option<String>,
    #[serde(rename = "DeletedTime", default, with = "azure_core::date::rfc1123::option")]
    pub deleted_time: Option<time::OffsetDateTime>,
    #[serde(rename = "RemainingRetentionDays", default, skip_serializing_if = "Option::is_none")]
    pub remaining_retention_days: Option<i64>,
    #[serde(
        rename = "AccessTier",
        default,
        skip_serializing_if = "Option::is_none",
        with = "azure_core::xml::text_content"
    )]
    pub access_tier: Option<AccessTier>,
    #[serde(rename = "AccessTierInferred", default, skip_serializing_if = "Option::is_none")]
    pub access_tier_inferred: Option<bool>,
    #[serde(
        rename = "ArchiveStatus",
        default,
        skip_serializing_if = "Option::is_none",
        with = "azure_core::xml::text_content"
    )]
    pub archive_status: Option<ArchiveStatus>,
    #[serde(rename = "CustomerProvidedKeySha256", default, skip_serializing_if = "Option::is_none")]
    pub customer_provided_key_sha256: Option<String>,
    #[doc = "The name of the encryption scope under which the blob is encrypted."]
    #[serde(rename = "EncryptionScope", default, skip_serializing_if = "Option::is_none")]
    pub encryption_scope: Option<String>,
    #[serde(rename = "AccessTierChangeTime", default, with = "azure_core::date::rfc1123::option")]
    pub access_tier_change_time: Option<time::OffsetDateTime>,
    #[serde(rename = "TagCount", default, skip_serializing_if = "Option::is_none")]
    pub tag_count: Option<i64>,
    #[serde(rename = "Expiry-Time", default, with = "azure_core::date::rfc1123::option")]
    pub expiry_time: Option<time::OffsetDateTime>,
    #[serde(rename = "Sealed", default, skip_serializing_if = "Option::is_none")]
    pub sealed: Option<bool>,
    #[doc = "If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are High and Standard."]
    #[serde(
        rename = "RehydratePriority",
        default,
        skip_serializing_if = "Option::is_none",
        with = "azure_core::xml::text_content"
    )]
    pub rehydrate_priority: Option<RehydratePriority>,
    #[serde(rename = "LastAccessTime", default, with = "azure_core::date::rfc1123::option")]
    pub last_access_time: Option<time::OffsetDateTime>,
    #[serde(rename = "ImmutabilityPolicyUntilDate", default, with = "azure_core::date::rfc1123::option")]
    pub immutability_policy_until_date: Option<time::OffsetDateTime>,
    #[serde(
        rename = "ImmutabilityPolicyMode",
        default,
        skip_serializing_if = "Option::is_none",
        with = "azure_core::xml::text_content"
    )]
    pub immutability_policy_mode: Option<blob_properties_internal::ImmutabilityPolicyMode>,
    #[serde(rename = "LegalHold", default, skip_serializing_if = "Option::is_none")]
    pub legal_hold: Option<bool>,
}
impl BlobPropertiesInternal {
    pub fn new(last_modified: time::OffsetDateTime, etag: String) -> Self {
        Self {
            creation_time: None,
            last_modified,
            etag,
            content_length: None,
            content_type: None,
            content_encoding: None,
            content_language: None,
            content_md5: None,
            content_disposition: None,
            cache_control: None,
            x_ms_blob_sequence_number: None,
            blob_type: None,
            lease_status: None,
            lease_state: None,
            lease_duration: None,
            copy_id: None,
            copy_status: None,
            copy_source: None,
            copy_progress: None,
            copy_completion_time: None,
            copy_status_description: None,
            server_encrypted: None,
            incremental_copy: None,
            destination_snapshot: None,
            deleted_time: None,
            remaining_retention_days: None,
            access_tier: None,
            access_tier_inferred: None,
            archive_status: None,
            customer_provided_key_sha256: None,
            encryption_scope: None,
            access_tier_change_time: None,
            tag_count: None,
            expiry_time: None,
            sealed: None,
            rehydrate_priority: None,
            last_access_time: None,
            immutability_policy_until_date: None,
            immutability_policy_mode: None,
            legal_hold: None,
        }
    }
}
pub mod blob_properties_internal {
    use super::*;
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum BlobType {
        BlockBlob,
        PageBlob,
        AppendBlob,
    }
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum ImmutabilityPolicyMode {
        Mutable,
        Unlocked,
        Locked,
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct BlobTag {
    #[serde(rename = "Key")]
    pub key: String,
    #[serde(rename = "Value")]
    pub value: String,
}
impl BlobTag {
    pub fn new(key: String, value: String) -> Self {
        Self { key, value }
    }
}
#[doc = "Blob tags"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct BlobTags {
    #[serde(rename = "TagSet", default, skip_serializing_if = "Option::is_none")]
    pub tag_set: Option<blob_tags::TagSet>,
}
impl BlobTags {
    pub fn new() -> Self {
        Self { tag_set: None }
    }
}
pub mod blob_tags {
    use super::*;
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
    pub struct TagSet {
        #[serde(rename = "$value", default, skip_serializing_if = "Vec::is_empty")]
        pub items: Vec<BlobTag>,
    }
}
#[doc = "Represents a single block in a block blob.  It describes the block's ID and size."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Block {
    #[doc = "The base64 encoded block ID."]
    #[serde(rename = "Name")]
    pub name: String,
    #[doc = "The block size in bytes."]
    #[serde(rename = "Size")]
    pub size: i64,
}
impl Block {
    pub fn new(name: String, size: i64) -> Self {
        Self { name, size }
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct BlockList {
    #[serde(rename = "CommittedBlocks", default, skip_serializing_if = "Option::is_none")]
    pub committed_blocks: Option<block_list::CommittedBlocks>,
    #[serde(rename = "UncommittedBlocks", default, skip_serializing_if = "Option::is_none")]
    pub uncommitted_blocks: Option<block_list::UncommittedBlocks>,
}
impl BlockList {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod block_list {
    use super::*;
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
    pub struct CommittedBlocks {
        #[serde(rename = "$value", default, skip_serializing_if = "Vec::is_empty")]
        pub items: Vec<Block>,
    }
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
    pub struct UncommittedBlocks {
        #[serde(rename = "$value", default, skip_serializing_if = "Vec::is_empty")]
        pub items: Vec<Block>,
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct BlockLookupList {
    #[serde(
        rename = "Committed",
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub committed: Vec<String>,
    #[serde(
        rename = "Uncommitted",
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub uncommitted: Vec<String>,
    #[serde(
        rename = "Latest",
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub latest: Vec<String>,
}
impl BlockLookupList {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ClearRange {
    #[serde(rename = "Start")]
    pub start: i64,
    #[serde(rename = "End")]
    pub end: i64,
}
impl ClearRange {
    pub fn new(start: i64, end: i64) -> Self {
        Self { start, end }
    }
}
#[doc = "An Azure Storage container"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ContainerItem {
    #[serde(rename = "Name")]
    pub name: String,
    #[serde(rename = "Deleted", default, skip_serializing_if = "Option::is_none")]
    pub deleted: Option<bool>,
    #[serde(rename = "Version", default, skip_serializing_if = "Option::is_none")]
    pub version: Option<String>,
    #[doc = "Properties of a container"]
    #[serde(rename = "Properties")]
    pub properties: ContainerProperties,
    #[serde(rename = "Metadata", default, skip_serializing_if = "Option::is_none")]
    pub metadata: Option<ContainerMetadata>,
}
impl ContainerItem {
    pub fn new(name: String, properties: ContainerProperties) -> Self {
        Self {
            name,
            deleted: None,
            version: None,
            properties,
            metadata: None,
        }
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ContainerMetadata {}
impl ContainerMetadata {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Properties of a container"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ContainerProperties {
    #[serde(rename = "Last-Modified", with = "azure_core::date::rfc1123")]
    pub last_modified: time::OffsetDateTime,
    #[serde(rename = "Etag")]
    pub etag: String,
    #[serde(
        rename = "LeaseStatus",
        default,
        skip_serializing_if = "Option::is_none",
        with = "azure_core::xml::text_content"
    )]
    pub lease_status: Option<LeaseStatus>,
    #[serde(
        rename = "LeaseState",
        default,
        skip_serializing_if = "Option::is_none",
        with = "azure_core::xml::text_content"
    )]
    pub lease_state: Option<LeaseState>,
    #[serde(
        rename = "LeaseDuration",
        default,
        skip_serializing_if = "Option::is_none",
        with = "azure_core::xml::text_content"
    )]
    pub lease_duration: Option<LeaseDuration>,
    #[serde(
        rename = "PublicAccess",
        default,
        skip_serializing_if = "Option::is_none",
        with = "azure_core::xml::text_content"
    )]
    pub public_access: Option<PublicAccessType>,
    #[serde(rename = "HasImmutabilityPolicy", default, skip_serializing_if = "Option::is_none")]
    pub has_immutability_policy: Option<bool>,
    #[serde(rename = "HasLegalHold", default, skip_serializing_if = "Option::is_none")]
    pub has_legal_hold: Option<bool>,
    #[serde(rename = "DefaultEncryptionScope", default, skip_serializing_if = "Option::is_none")]
    pub default_encryption_scope: Option<String>,
    #[serde(rename = "DenyEncryptionScopeOverride", default, skip_serializing_if = "Option::is_none")]
    pub deny_encryption_scope_override: Option<bool>,
    #[serde(rename = "DeletedTime", default, with = "azure_core::date::rfc1123::option")]
    pub deleted_time: Option<time::OffsetDateTime>,
    #[serde(rename = "RemainingRetentionDays", default, skip_serializing_if = "Option::is_none")]
    pub remaining_retention_days: Option<i64>,
    #[doc = "Indicates if version level worm is enabled on this container."]
    #[serde(rename = "ImmutableStorageWithVersioningEnabled", default, skip_serializing_if = "Option::is_none")]
    pub immutable_storage_with_versioning_enabled: Option<bool>,
}
impl ContainerProperties {
    pub fn new(last_modified: time::OffsetDateTime, etag: String) -> Self {
        Self {
            last_modified,
            etag,
            lease_status: None,
            lease_state: None,
            lease_duration: None,
            public_access: None,
            has_immutability_policy: None,
            has_legal_hold: None,
            default_encryption_scope: None,
            deny_encryption_scope_override: None,
            deleted_time: None,
            remaining_retention_days: None,
            immutable_storage_with_versioning_enabled: None,
        }
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum CopyStatus {
    #[serde(rename = "pending")]
    Pending,
    #[serde(rename = "success")]
    Success,
    #[serde(rename = "aborted")]
    Aborted,
    #[serde(rename = "failed")]
    Failed,
}
#[doc = "CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct CorsRule {
    #[doc = "The origin domains that are permitted to make a request against the storage service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard character '*' to allow all origin domains to make requests via CORS."]
    #[serde(rename = "AllowedOrigins")]
    pub allowed_origins: String,
    #[doc = "The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated)"]
    #[serde(rename = "AllowedMethods")]
    pub allowed_methods: String,
    #[doc = "the request headers that the origin domain may specify on the CORS request."]
    #[serde(rename = "AllowedHeaders")]
    pub allowed_headers: String,
    #[doc = "The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer"]
    #[serde(rename = "ExposedHeaders")]
    pub exposed_headers: String,
    #[doc = "The maximum amount time that a browser should cache the preflight OPTIONS request."]
    #[serde(rename = "MaxAgeInSeconds")]
    pub max_age_in_seconds: i64,
}
impl CorsRule {
    pub fn new(
        allowed_origins: String,
        allowed_methods: String,
        allowed_headers: String,
        exposed_headers: String,
        max_age_in_seconds: i64,
    ) -> Self {
        Self {
            allowed_origins,
            allowed_methods,
            allowed_headers,
            exposed_headers,
            max_age_in_seconds,
        }
    }
}
#[doc = "Groups the settings used for interpreting the blob data if the blob is delimited text formatted."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DelimitedTextConfiguration {
    #[doc = "The string used to separate columns."]
    #[serde(rename = "ColumnSeparator", default, skip_serializing_if = "Option::is_none")]
    pub column_separator: Option<String>,
    #[doc = "The string used to quote a specific field."]
    #[serde(rename = "FieldQuote", default, skip_serializing_if = "Option::is_none")]
    pub field_quote: Option<String>,
    #[doc = "The string used to separate records."]
    #[serde(rename = "RecordSeparator", default, skip_serializing_if = "Option::is_none")]
    pub record_separator: Option<String>,
    #[doc = "The string used as an escape character."]
    #[serde(rename = "EscapeChar", default, skip_serializing_if = "Option::is_none")]
    pub escape_char: Option<String>,
    #[doc = "Represents whether the data has headers."]
    #[serde(rename = "HasHeaders", default, skip_serializing_if = "Option::is_none")]
    pub has_headers: Option<bool>,
}
impl DelimitedTextConfiguration {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Error codes returned by the service"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(remote = "ErrorCode")]
pub enum ErrorCode {
    AccountAlreadyExists,
    AccountBeingCreated,
    AccountIsDisabled,
    AuthenticationFailed,
    AuthorizationFailure,
    ConditionHeadersNotSupported,
    ConditionNotMet,
    EmptyMetadataKey,
    InsufficientAccountPermissions,
    InternalError,
    InvalidAuthenticationInfo,
    InvalidHeaderValue,
    InvalidHttpVerb,
    InvalidInput,
    InvalidMd5,
    InvalidMetadata,
    InvalidQueryParameterValue,
    InvalidRange,
    InvalidResourceName,
    InvalidUri,
    InvalidXmlDocument,
    InvalidXmlNodeValue,
    Md5Mismatch,
    MetadataTooLarge,
    MissingContentLengthHeader,
    MissingRequiredQueryParameter,
    MissingRequiredHeader,
    MissingRequiredXmlNode,
    MultipleConditionHeadersNotSupported,
    OperationTimedOut,
    OutOfRangeInput,
    OutOfRangeQueryParameterValue,
    RequestBodyTooLarge,
    ResourceTypeMismatch,
    RequestUrlFailedToParse,
    ResourceAlreadyExists,
    ResourceNotFound,
    ServerBusy,
    UnsupportedHeader,
    UnsupportedXmlNode,
    UnsupportedQueryParameter,
    UnsupportedHttpVerb,
    AppendPositionConditionNotMet,
    BlobAlreadyExists,
    BlobImmutableDueToPolicy,
    BlobNotFound,
    BlobOverwritten,
    BlobTierInadequateForContentLength,
    BlobUsesCustomerSpecifiedEncryption,
    BlockCountExceedsLimit,
    BlockListTooLong,
    CannotChangeToLowerTier,
    CannotVerifyCopySource,
    ContainerAlreadyExists,
    ContainerBeingDeleted,
    ContainerDisabled,
    ContainerNotFound,
    ContentLengthLargerThanTierLimit,
    CopyAcrossAccountsNotSupported,
    CopyIdMismatch,
    FeatureVersionMismatch,
    IncrementalCopyBlobMismatch,
    IncrementalCopyOfEarlierVersionSnapshotNotAllowed,
    IncrementalCopySourceMustBeSnapshot,
    InfiniteLeaseDurationRequired,
    InvalidBlobOrBlock,
    InvalidBlobTier,
    InvalidBlobType,
    InvalidBlockId,
    InvalidBlockList,
    InvalidOperation,
    InvalidPageRange,
    InvalidSourceBlobType,
    InvalidSourceBlobUrl,
    InvalidVersionForPageBlobOperation,
    LeaseAlreadyPresent,
    LeaseAlreadyBroken,
    LeaseIdMismatchWithBlobOperation,
    LeaseIdMismatchWithContainerOperation,
    LeaseIdMismatchWithLeaseOperation,
    LeaseIdMissing,
    LeaseIsBreakingAndCannotBeAcquired,
    LeaseIsBreakingAndCannotBeChanged,
    LeaseIsBrokenAndCannotBeRenewed,
    LeaseLost,
    LeaseNotPresentWithBlobOperation,
    LeaseNotPresentWithContainerOperation,
    LeaseNotPresentWithLeaseOperation,
    MaxBlobSizeConditionNotMet,
    NoAuthenticationInformation,
    NoPendingCopyOperation,
    OperationNotAllowedOnIncrementalCopyBlob,
    PendingCopyOperation,
    PreviousSnapshotCannotBeNewer,
    PreviousSnapshotNotFound,
    PreviousSnapshotOperationNotSupported,
    SequenceNumberConditionNotMet,
    SequenceNumberIncrementTooLarge,
    SnapshotCountExceeded,
    SnapshotOperationRateExceeded,
    SnapshotsPresent,
    SourceConditionNotMet,
    SystemInUse,
    TargetConditionNotMet,
    UnauthorizedBlobOverwrite,
    BlobBeingRehydrated,
    BlobArchived,
    BlobNotArchived,
    #[serde(rename = "AuthorizationSourceIPMismatch")]
    AuthorizationSourceIpMismatch,
    AuthorizationProtocolMismatch,
    AuthorizationPermissionMismatch,
    AuthorizationServiceMismatch,
    AuthorizationResourceTypeMismatch,
    #[serde(skip_deserializing)]
    UnknownValue(String),
}
impl FromStr for ErrorCode {
    type Err = value::Error;
    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Self::deserialize(s.into_deserializer())
    }
}
impl<'de> Deserialize<'de> for ErrorCode {
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: Deserializer<'de>,
    {
        let s = String::deserialize(deserializer)?;
        let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
        Ok(deserialized)
    }
}
impl Serialize for ErrorCode {
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: Serializer,
    {
        match self {
            Self::AccountAlreadyExists => serializer.serialize_unit_variant("ErrorCode", 0u32, "AccountAlreadyExists"),
            Self::AccountBeingCreated => serializer.serialize_unit_variant("ErrorCode", 1u32, "AccountBeingCreated"),
            Self::AccountIsDisabled => serializer.serialize_unit_variant("ErrorCode", 2u32, "AccountIsDisabled"),
            Self::AuthenticationFailed => serializer.serialize_unit_variant("ErrorCode", 3u32, "AuthenticationFailed"),
            Self::AuthorizationFailure => serializer.serialize_unit_variant("ErrorCode", 4u32, "AuthorizationFailure"),
            Self::ConditionHeadersNotSupported => serializer.serialize_unit_variant("ErrorCode", 5u32, "ConditionHeadersNotSupported"),
            Self::ConditionNotMet => serializer.serialize_unit_variant("ErrorCode", 6u32, "ConditionNotMet"),
            Self::EmptyMetadataKey => serializer.serialize_unit_variant("ErrorCode", 7u32, "EmptyMetadataKey"),
            Self::InsufficientAccountPermissions => serializer.serialize_unit_variant("ErrorCode", 8u32, "InsufficientAccountPermissions"),
            Self::InternalError => serializer.serialize_unit_variant("ErrorCode", 9u32, "InternalError"),
            Self::InvalidAuthenticationInfo => serializer.serialize_unit_variant("ErrorCode", 10u32, "InvalidAuthenticationInfo"),
            Self::InvalidHeaderValue => serializer.serialize_unit_variant("ErrorCode", 11u32, "InvalidHeaderValue"),
            Self::InvalidHttpVerb => serializer.serialize_unit_variant("ErrorCode", 12u32, "InvalidHttpVerb"),
            Self::InvalidInput => serializer.serialize_unit_variant("ErrorCode", 13u32, "InvalidInput"),
            Self::InvalidMd5 => serializer.serialize_unit_variant("ErrorCode", 14u32, "InvalidMd5"),
            Self::InvalidMetadata => serializer.serialize_unit_variant("ErrorCode", 15u32, "InvalidMetadata"),
            Self::InvalidQueryParameterValue => serializer.serialize_unit_variant("ErrorCode", 16u32, "InvalidQueryParameterValue"),
            Self::InvalidRange => serializer.serialize_unit_variant("ErrorCode", 17u32, "InvalidRange"),
            Self::InvalidResourceName => serializer.serialize_unit_variant("ErrorCode", 18u32, "InvalidResourceName"),
            Self::InvalidUri => serializer.serialize_unit_variant("ErrorCode", 19u32, "InvalidUri"),
            Self::InvalidXmlDocument => serializer.serialize_unit_variant("ErrorCode", 20u32, "InvalidXmlDocument"),
            Self::InvalidXmlNodeValue => serializer.serialize_unit_variant("ErrorCode", 21u32, "InvalidXmlNodeValue"),
            Self::Md5Mismatch => serializer.serialize_unit_variant("ErrorCode", 22u32, "Md5Mismatch"),
            Self::MetadataTooLarge => serializer.serialize_unit_variant("ErrorCode", 23u32, "MetadataTooLarge"),
            Self::MissingContentLengthHeader => serializer.serialize_unit_variant("ErrorCode", 24u32, "MissingContentLengthHeader"),
            Self::MissingRequiredQueryParameter => serializer.serialize_unit_variant("ErrorCode", 25u32, "MissingRequiredQueryParameter"),
            Self::MissingRequiredHeader => serializer.serialize_unit_variant("ErrorCode", 26u32, "MissingRequiredHeader"),
            Self::MissingRequiredXmlNode => serializer.serialize_unit_variant("ErrorCode", 27u32, "MissingRequiredXmlNode"),
            Self::MultipleConditionHeadersNotSupported => {
                serializer.serialize_unit_variant("ErrorCode", 28u32, "MultipleConditionHeadersNotSupported")
            }
            Self::OperationTimedOut => serializer.serialize_unit_variant("ErrorCode", 29u32, "OperationTimedOut"),
            Self::OutOfRangeInput => serializer.serialize_unit_variant("ErrorCode", 30u32, "OutOfRangeInput"),
            Self::OutOfRangeQueryParameterValue => serializer.serialize_unit_variant("ErrorCode", 31u32, "OutOfRangeQueryParameterValue"),
            Self::RequestBodyTooLarge => serializer.serialize_unit_variant("ErrorCode", 32u32, "RequestBodyTooLarge"),
            Self::ResourceTypeMismatch => serializer.serialize_unit_variant("ErrorCode", 33u32, "ResourceTypeMismatch"),
            Self::RequestUrlFailedToParse => serializer.serialize_unit_variant("ErrorCode", 34u32, "RequestUrlFailedToParse"),
            Self::ResourceAlreadyExists => serializer.serialize_unit_variant("ErrorCode", 35u32, "ResourceAlreadyExists"),
            Self::ResourceNotFound => serializer.serialize_unit_variant("ErrorCode", 36u32, "ResourceNotFound"),
            Self::ServerBusy => serializer.serialize_unit_variant("ErrorCode", 37u32, "ServerBusy"),
            Self::UnsupportedHeader => serializer.serialize_unit_variant("ErrorCode", 38u32, "UnsupportedHeader"),
            Self::UnsupportedXmlNode => serializer.serialize_unit_variant("ErrorCode", 39u32, "UnsupportedXmlNode"),
            Self::UnsupportedQueryParameter => serializer.serialize_unit_variant("ErrorCode", 40u32, "UnsupportedQueryParameter"),
            Self::UnsupportedHttpVerb => serializer.serialize_unit_variant("ErrorCode", 41u32, "UnsupportedHttpVerb"),
            Self::AppendPositionConditionNotMet => serializer.serialize_unit_variant("ErrorCode", 42u32, "AppendPositionConditionNotMet"),
            Self::BlobAlreadyExists => serializer.serialize_unit_variant("ErrorCode", 43u32, "BlobAlreadyExists"),
            Self::BlobImmutableDueToPolicy => serializer.serialize_unit_variant("ErrorCode", 44u32, "BlobImmutableDueToPolicy"),
            Self::BlobNotFound => serializer.serialize_unit_variant("ErrorCode", 45u32, "BlobNotFound"),
            Self::BlobOverwritten => serializer.serialize_unit_variant("ErrorCode", 46u32, "BlobOverwritten"),
            Self::BlobTierInadequateForContentLength => {
                serializer.serialize_unit_variant("ErrorCode", 47u32, "BlobTierInadequateForContentLength")
            }
            Self::BlobUsesCustomerSpecifiedEncryption => {
                serializer.serialize_unit_variant("ErrorCode", 48u32, "BlobUsesCustomerSpecifiedEncryption")
            }
            Self::BlockCountExceedsLimit => serializer.serialize_unit_variant("ErrorCode", 49u32, "BlockCountExceedsLimit"),
            Self::BlockListTooLong => serializer.serialize_unit_variant("ErrorCode", 50u32, "BlockListTooLong"),
            Self::CannotChangeToLowerTier => serializer.serialize_unit_variant("ErrorCode", 51u32, "CannotChangeToLowerTier"),
            Self::CannotVerifyCopySource => serializer.serialize_unit_variant("ErrorCode", 52u32, "CannotVerifyCopySource"),
            Self::ContainerAlreadyExists => serializer.serialize_unit_variant("ErrorCode", 53u32, "ContainerAlreadyExists"),
            Self::ContainerBeingDeleted => serializer.serialize_unit_variant("ErrorCode", 54u32, "ContainerBeingDeleted"),
            Self::ContainerDisabled => serializer.serialize_unit_variant("ErrorCode", 55u32, "ContainerDisabled"),
            Self::ContainerNotFound => serializer.serialize_unit_variant("ErrorCode", 56u32, "ContainerNotFound"),
            Self::ContentLengthLargerThanTierLimit => {
                serializer.serialize_unit_variant("ErrorCode", 57u32, "ContentLengthLargerThanTierLimit")
            }
            Self::CopyAcrossAccountsNotSupported => serializer.serialize_unit_variant("ErrorCode", 58u32, "CopyAcrossAccountsNotSupported"),
            Self::CopyIdMismatch => serializer.serialize_unit_variant("ErrorCode", 59u32, "CopyIdMismatch"),
            Self::FeatureVersionMismatch => serializer.serialize_unit_variant("ErrorCode", 60u32, "FeatureVersionMismatch"),
            Self::IncrementalCopyBlobMismatch => serializer.serialize_unit_variant("ErrorCode", 61u32, "IncrementalCopyBlobMismatch"),
            Self::IncrementalCopyOfEarlierVersionSnapshotNotAllowed => {
                serializer.serialize_unit_variant("ErrorCode", 62u32, "IncrementalCopyOfEarlierVersionSnapshotNotAllowed")
            }
            Self::IncrementalCopySourceMustBeSnapshot => {
                serializer.serialize_unit_variant("ErrorCode", 63u32, "IncrementalCopySourceMustBeSnapshot")
            }
            Self::InfiniteLeaseDurationRequired => serializer.serialize_unit_variant("ErrorCode", 64u32, "InfiniteLeaseDurationRequired"),
            Self::InvalidBlobOrBlock => serializer.serialize_unit_variant("ErrorCode", 65u32, "InvalidBlobOrBlock"),
            Self::InvalidBlobTier => serializer.serialize_unit_variant("ErrorCode", 66u32, "InvalidBlobTier"),
            Self::InvalidBlobType => serializer.serialize_unit_variant("ErrorCode", 67u32, "InvalidBlobType"),
            Self::InvalidBlockId => serializer.serialize_unit_variant("ErrorCode", 68u32, "InvalidBlockId"),
            Self::InvalidBlockList => serializer.serialize_unit_variant("ErrorCode", 69u32, "InvalidBlockList"),
            Self::InvalidOperation => serializer.serialize_unit_variant("ErrorCode", 70u32, "InvalidOperation"),
            Self::InvalidPageRange => serializer.serialize_unit_variant("ErrorCode", 71u32, "InvalidPageRange"),
            Self::InvalidSourceBlobType => serializer.serialize_unit_variant("ErrorCode", 72u32, "InvalidSourceBlobType"),
            Self::InvalidSourceBlobUrl => serializer.serialize_unit_variant("ErrorCode", 73u32, "InvalidSourceBlobUrl"),
            Self::InvalidVersionForPageBlobOperation => {
                serializer.serialize_unit_variant("ErrorCode", 74u32, "InvalidVersionForPageBlobOperation")
            }
            Self::LeaseAlreadyPresent => serializer.serialize_unit_variant("ErrorCode", 75u32, "LeaseAlreadyPresent"),
            Self::LeaseAlreadyBroken => serializer.serialize_unit_variant("ErrorCode", 76u32, "LeaseAlreadyBroken"),
            Self::LeaseIdMismatchWithBlobOperation => {
                serializer.serialize_unit_variant("ErrorCode", 77u32, "LeaseIdMismatchWithBlobOperation")
            }
            Self::LeaseIdMismatchWithContainerOperation => {
                serializer.serialize_unit_variant("ErrorCode", 78u32, "LeaseIdMismatchWithContainerOperation")
            }
            Self::LeaseIdMismatchWithLeaseOperation => {
                serializer.serialize_unit_variant("ErrorCode", 79u32, "LeaseIdMismatchWithLeaseOperation")
            }
            Self::LeaseIdMissing => serializer.serialize_unit_variant("ErrorCode", 80u32, "LeaseIdMissing"),
            Self::LeaseIsBreakingAndCannotBeAcquired => {
                serializer.serialize_unit_variant("ErrorCode", 81u32, "LeaseIsBreakingAndCannotBeAcquired")
            }
            Self::LeaseIsBreakingAndCannotBeChanged => {
                serializer.serialize_unit_variant("ErrorCode", 82u32, "LeaseIsBreakingAndCannotBeChanged")
            }
            Self::LeaseIsBrokenAndCannotBeRenewed => {
                serializer.serialize_unit_variant("ErrorCode", 83u32, "LeaseIsBrokenAndCannotBeRenewed")
            }
            Self::LeaseLost => serializer.serialize_unit_variant("ErrorCode", 84u32, "LeaseLost"),
            Self::LeaseNotPresentWithBlobOperation => {
                serializer.serialize_unit_variant("ErrorCode", 85u32, "LeaseNotPresentWithBlobOperation")
            }
            Self::LeaseNotPresentWithContainerOperation => {
                serializer.serialize_unit_variant("ErrorCode", 86u32, "LeaseNotPresentWithContainerOperation")
            }
            Self::LeaseNotPresentWithLeaseOperation => {
                serializer.serialize_unit_variant("ErrorCode", 87u32, "LeaseNotPresentWithLeaseOperation")
            }
            Self::MaxBlobSizeConditionNotMet => serializer.serialize_unit_variant("ErrorCode", 88u32, "MaxBlobSizeConditionNotMet"),
            Self::NoAuthenticationInformation => serializer.serialize_unit_variant("ErrorCode", 89u32, "NoAuthenticationInformation"),
            Self::NoPendingCopyOperation => serializer.serialize_unit_variant("ErrorCode", 90u32, "NoPendingCopyOperation"),
            Self::OperationNotAllowedOnIncrementalCopyBlob => {
                serializer.serialize_unit_variant("ErrorCode", 91u32, "OperationNotAllowedOnIncrementalCopyBlob")
            }
            Self::PendingCopyOperation => serializer.serialize_unit_variant("ErrorCode", 92u32, "PendingCopyOperation"),
            Self::PreviousSnapshotCannotBeNewer => serializer.serialize_unit_variant("ErrorCode", 93u32, "PreviousSnapshotCannotBeNewer"),
            Self::PreviousSnapshotNotFound => serializer.serialize_unit_variant("ErrorCode", 94u32, "PreviousSnapshotNotFound"),
            Self::PreviousSnapshotOperationNotSupported => {
                serializer.serialize_unit_variant("ErrorCode", 95u32, "PreviousSnapshotOperationNotSupported")
            }
            Self::SequenceNumberConditionNotMet => serializer.serialize_unit_variant("ErrorCode", 96u32, "SequenceNumberConditionNotMet"),
            Self::SequenceNumberIncrementTooLarge => {
                serializer.serialize_unit_variant("ErrorCode", 97u32, "SequenceNumberIncrementTooLarge")
            }
            Self::SnapshotCountExceeded => serializer.serialize_unit_variant("ErrorCode", 98u32, "SnapshotCountExceeded"),
            Self::SnapshotOperationRateExceeded => serializer.serialize_unit_variant("ErrorCode", 99u32, "SnapshotOperationRateExceeded"),
            Self::SnapshotsPresent => serializer.serialize_unit_variant("ErrorCode", 100u32, "SnapshotsPresent"),
            Self::SourceConditionNotMet => serializer.serialize_unit_variant("ErrorCode", 101u32, "SourceConditionNotMet"),
            Self::SystemInUse => serializer.serialize_unit_variant("ErrorCode", 102u32, "SystemInUse"),
            Self::TargetConditionNotMet => serializer.serialize_unit_variant("ErrorCode", 103u32, "TargetConditionNotMet"),
            Self::UnauthorizedBlobOverwrite => serializer.serialize_unit_variant("ErrorCode", 104u32, "UnauthorizedBlobOverwrite"),
            Self::BlobBeingRehydrated => serializer.serialize_unit_variant("ErrorCode", 105u32, "BlobBeingRehydrated"),
            Self::BlobArchived => serializer.serialize_unit_variant("ErrorCode", 106u32, "BlobArchived"),
            Self::BlobNotArchived => serializer.serialize_unit_variant("ErrorCode", 107u32, "BlobNotArchived"),
            Self::AuthorizationSourceIpMismatch => serializer.serialize_unit_variant("ErrorCode", 108u32, "AuthorizationSourceIPMismatch"),
            Self::AuthorizationProtocolMismatch => serializer.serialize_unit_variant("ErrorCode", 109u32, "AuthorizationProtocolMismatch"),
            Self::AuthorizationPermissionMismatch => {
                serializer.serialize_unit_variant("ErrorCode", 110u32, "AuthorizationPermissionMismatch")
            }
            Self::AuthorizationServiceMismatch => serializer.serialize_unit_variant("ErrorCode", 111u32, "AuthorizationServiceMismatch"),
            Self::AuthorizationResourceTypeMismatch => {
                serializer.serialize_unit_variant("ErrorCode", 112u32, "AuthorizationResourceTypeMismatch")
            }
            Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
        }
    }
}
#[doc = "Blob info from a Filter Blobs API call"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct FilterBlobItem {
    #[serde(rename = "Name")]
    pub name: String,
    #[serde(rename = "ContainerName")]
    pub container_name: String,
    #[doc = "Blob tags"]
    #[serde(rename = "Tags", default, skip_serializing_if = "Option::is_none")]
    pub tags: Option<BlobTags>,
    #[serde(rename = "VersionId", default, skip_serializing_if = "Option::is_none")]
    pub version_id: Option<String>,
    #[serde(rename = "IsCurrentVersion", default, skip_serializing_if = "Option::is_none")]
    pub is_current_version: Option<bool>,
}
impl FilterBlobItem {
    pub fn new(name: String, container_name: String) -> Self {
        Self {
            name,
            container_name,
            tags: None,
            version_id: None,
            is_current_version: None,
        }
    }
}
#[doc = "The result of a Filter Blobs API call"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct FilterBlobSegment {
    #[serde(rename = "@ServiceEndpoint")]
    pub service_endpoint: String,
    #[serde(rename = "Where")]
    pub where_: String,
    #[serde(rename = "Blobs")]
    pub blobs: filter_blob_segment::Blobs,
    #[serde(rename = "NextMarker", default, skip_serializing_if = "Option::is_none")]
    pub next_marker: Option<String>,
}
impl FilterBlobSegment {
    pub fn new(service_endpoint: String, where_: String, blobs: filter_blob_segment::Blobs) -> Self {
        Self {
            service_endpoint,
            where_,
            blobs,
            next_marker: None,
        }
    }
}
pub mod filter_blob_segment {
    use super::*;
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
    pub struct Blobs {
        #[serde(rename = "$value", default, skip_serializing_if = "Vec::is_empty")]
        pub items: Vec<FilterBlobItem>,
    }
}
#[doc = "Geo-Replication information for the Secondary Storage Service"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct GeoReplication {
    #[doc = "The status of the secondary location"]
    #[serde(rename = "Status", with = "azure_core::xml::text_content")]
    pub status: geo_replication::Status,
    #[doc = "A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or may not be available for reads."]
    #[serde(rename = "LastSyncTime", with = "azure_core::date::rfc1123")]
    pub last_sync_time: time::OffsetDateTime,
}
impl GeoReplication {
    pub fn new(status: geo_replication::Status, last_sync_time: time::OffsetDateTime) -> Self {
        Self { status, last_sync_time }
    }
}
pub mod geo_replication {
    use super::*;
    #[doc = "The status of the secondary location"]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    #[serde(remote = "Status")]
    pub enum Status {
        #[serde(rename = "live")]
        Live,
        #[serde(rename = "bootstrap")]
        Bootstrap,
        #[serde(rename = "unavailable")]
        Unavailable,
        #[serde(skip_deserializing)]
        UnknownValue(String),
    }
    impl FromStr for Status {
        type Err = value::Error;
        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
            Self::deserialize(s.into_deserializer())
        }
    }
    impl<'de> Deserialize<'de> for Status {
        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
        where
            D: Deserializer<'de>,
        {
            let s = String::deserialize(deserializer)?;
            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
            Ok(deserialized)
        }
    }
    impl Serialize for Status {
        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
        where
            S: Serializer,
        {
            match self {
                Self::Live => serializer.serialize_unit_variant("Status", 0u32, "live"),
                Self::Bootstrap => serializer.serialize_unit_variant("Status", 1u32, "bootstrap"),
                Self::Unavailable => serializer.serialize_unit_variant("Status", 2u32, "unavailable"),
                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
            }
        }
    }
}
#[doc = "json text configuration"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JsonTextConfiguration {
    #[doc = "The string used to separate records."]
    #[serde(rename = "RecordSeparator", default, skip_serializing_if = "Option::is_none")]
    pub record_separator: Option<String>,
}
impl JsonTextConfiguration {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Key information"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct KeyInfo {
    #[doc = "The date-time the key is active in ISO 8601 UTC time"]
    #[serde(rename = "Start")]
    pub start: String,
    #[doc = "The date-time the key expires in ISO 8601 UTC time"]
    #[serde(rename = "Expiry")]
    pub expiry: String,
}
impl KeyInfo {
    pub fn new(start: String, expiry: String) -> Self {
        Self { start, expiry }
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum LeaseDuration {
    #[serde(rename = "infinite")]
    Infinite,
    #[serde(rename = "fixed")]
    Fixed,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum LeaseState {
    #[serde(rename = "available")]
    Available,
    #[serde(rename = "leased")]
    Leased,
    #[serde(rename = "expired")]
    Expired,
    #[serde(rename = "breaking")]
    Breaking,
    #[serde(rename = "broken")]
    Broken,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum LeaseStatus {
    #[serde(rename = "locked")]
    Locked,
    #[serde(rename = "unlocked")]
    Unlocked,
}
#[doc = "An enumeration of blobs"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ListBlobsFlatSegmentResponse {
    #[serde(rename = "@ServiceEndpoint")]
    pub service_endpoint: String,
    #[serde(rename = "@ContainerName")]
    pub container_name: String,
    #[serde(rename = "Prefix", default, skip_serializing_if = "Option::is_none")]
    pub prefix: Option<String>,
    #[serde(rename = "Marker", default, skip_serializing_if = "Option::is_none")]
    pub marker: Option<String>,
    #[serde(rename = "MaxResults", default, skip_serializing_if = "Option::is_none")]
    pub max_results: Option<i64>,
    #[serde(rename = "Blobs", default, skip_serializing_if = "Option::is_none")]
    pub blobs: Option<BlobFlatListSegment>,
    #[serde(rename = "NextMarker", default, skip_serializing_if = "Option::is_none")]
    pub next_marker: Option<String>,
}
impl azure_core::Continuable for ListBlobsFlatSegmentResponse {
    type Continuation = String;
    fn continuation(&self) -> Option<Self::Continuation> {
        self.next_marker.clone().filter(|value| !value.is_empty())
    }
}
impl ListBlobsFlatSegmentResponse {
    pub fn new(service_endpoint: String, container_name: String) -> Self {
        Self {
            service_endpoint,
            container_name,
            prefix: None,
            marker: None,
            max_results: None,
            blobs: None,
            next_marker: None,
        }
    }
}
#[doc = "An enumeration of blobs"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ListBlobsHierarchySegmentResponse {
    #[serde(rename = "@ServiceEndpoint")]
    pub service_endpoint: String,
    #[serde(rename = "@ContainerName")]
    pub container_name: String,
    #[serde(rename = "Prefix", default, skip_serializing_if = "Option::is_none")]
    pub prefix: Option<String>,
    #[serde(rename = "Marker", default, skip_serializing_if = "Option::is_none")]
    pub marker: Option<String>,
    #[serde(rename = "MaxResults", default, skip_serializing_if = "Option::is_none")]
    pub max_results: Option<i64>,
    #[serde(rename = "Delimiter", default, skip_serializing_if = "Option::is_none")]
    pub delimiter: Option<String>,
    #[serde(rename = "Blobs", default, skip_serializing_if = "Option::is_none")]
    pub blobs: Option<BlobHierarchyListSegment>,
    #[serde(rename = "NextMarker", default, skip_serializing_if = "Option::is_none")]
    pub next_marker: Option<String>,
}
impl azure_core::Continuable for ListBlobsHierarchySegmentResponse {
    type Continuation = String;
    fn continuation(&self) -> Option<Self::Continuation> {
        self.next_marker.clone().filter(|value| !value.is_empty())
    }
}
impl ListBlobsHierarchySegmentResponse {
    pub fn new(service_endpoint: String, container_name: String) -> Self {
        Self {
            service_endpoint,
            container_name,
            prefix: None,
            marker: None,
            max_results: None,
            delimiter: None,
            blobs: None,
            next_marker: None,
        }
    }
}
#[doc = "An enumeration of containers"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ListContainersSegmentResponse {
    #[serde(rename = "@ServiceEndpoint")]
    pub service_endpoint: String,
    #[serde(rename = "Prefix", default, skip_serializing_if = "Option::is_none")]
    pub prefix: Option<String>,
    #[serde(rename = "Marker", default, skip_serializing_if = "Option::is_none")]
    pub marker: Option<String>,
    #[serde(rename = "MaxResults", default, skip_serializing_if = "Option::is_none")]
    pub max_results: Option<i64>,
    #[serde(rename = "Containers", default, skip_serializing_if = "Option::is_none")]
    pub containers: Option<list_containers_segment_response::Containers>,
    #[serde(rename = "NextMarker", default, skip_serializing_if = "Option::is_none")]
    pub next_marker: Option<String>,
}
impl azure_core::Continuable for ListContainersSegmentResponse {
    type Continuation = String;
    fn continuation(&self) -> Option<Self::Continuation> {
        self.next_marker.clone().filter(|value| !value.is_empty())
    }
}
impl ListContainersSegmentResponse {
    pub fn new(service_endpoint: String) -> Self {
        Self {
            service_endpoint,
            prefix: None,
            marker: None,
            max_results: None,
            containers: None,
            next_marker: None,
        }
    }
}
pub mod list_containers_segment_response {
    use super::*;
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
    pub struct Containers {
        #[serde(rename = "$value", default, skip_serializing_if = "Vec::is_empty")]
        pub items: Vec<ContainerItem>,
    }
}
#[doc = "Azure Analytics Logging settings."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Logging {
    #[doc = "The version of Storage Analytics to configure."]
    #[serde(rename = "Version")]
    pub version: String,
    #[doc = "Indicates whether all delete requests should be logged."]
    #[serde(rename = "Delete")]
    pub delete: bool,
    #[doc = "Indicates whether all read requests should be logged."]
    #[serde(rename = "Read")]
    pub read: bool,
    #[doc = "Indicates whether all write requests should be logged."]
    #[serde(rename = "Write")]
    pub write: bool,
    #[doc = "the retention policy which determines how long the associated data should persist"]
    #[serde(rename = "RetentionPolicy")]
    pub retention_policy: RetentionPolicy,
}
impl Logging {
    pub fn new(version: String, delete: bool, read: bool, write: bool, retention_policy: RetentionPolicy) -> Self {
        Self {
            version,
            delete,
            read,
            write,
            retention_policy,
        }
    }
}
#[doc = "a summary of request statistics grouped by API in hour or minute aggregates for blobs"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Metrics {
    #[doc = "The version of Storage Analytics to configure."]
    #[serde(rename = "Version", default, skip_serializing_if = "Option::is_none")]
    pub version: Option<String>,
    #[doc = "Indicates whether metrics are enabled for the Blob service."]
    #[serde(rename = "Enabled")]
    pub enabled: bool,
    #[doc = "Indicates whether metrics should generate summary statistics for called API operations."]
    #[serde(rename = "IncludeAPIs", default, skip_serializing_if = "Option::is_none")]
    pub include_ap_is: Option<bool>,
    #[doc = "the retention policy which determines how long the associated data should persist"]
    #[serde(rename = "RetentionPolicy", default, skip_serializing_if = "Option::is_none")]
    pub retention_policy: Option<RetentionPolicy>,
}
impl Metrics {
    pub fn new(enabled: bool) -> Self {
        Self {
            version: None,
            enabled,
            include_ap_is: None,
            retention_policy: None,
        }
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ObjectReplicationMetadata {}
impl ObjectReplicationMetadata {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "the list of pages"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PageList {
    #[serde(
        rename = "PageRange",
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub page_range: Vec<PageRange>,
    #[serde(
        rename = "ClearRange",
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub clear_range: Vec<ClearRange>,
    #[serde(rename = "NextMarker", default, skip_serializing_if = "Option::is_none")]
    pub next_marker: Option<String>,
}
impl azure_core::Continuable for PageList {
    type Continuation = String;
    fn continuation(&self) -> Option<Self::Continuation> {
        self.next_marker.clone().filter(|value| !value.is_empty())
    }
}
impl PageList {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct PageRange {
    #[serde(rename = "Start")]
    pub start: i64,
    #[serde(rename = "End")]
    pub end: i64,
}
impl PageRange {
    pub fn new(start: i64, end: i64) -> Self {
        Self { start, end }
    }
}
#[doc = "parquet configuration"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ParquetConfiguration {}
impl ParquetConfiguration {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(remote = "PublicAccessType")]
pub enum PublicAccessType {
    #[serde(rename = "container")]
    Container,
    #[serde(rename = "blob")]
    Blob,
    #[serde(skip_deserializing)]
    UnknownValue(String),
}
impl FromStr for PublicAccessType {
    type Err = value::Error;
    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Self::deserialize(s.into_deserializer())
    }
}
impl<'de> Deserialize<'de> for PublicAccessType {
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: Deserializer<'de>,
    {
        let s = String::deserialize(deserializer)?;
        let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
        Ok(deserialized)
    }
}
impl Serialize for PublicAccessType {
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: Serializer,
    {
        match self {
            Self::Container => serializer.serialize_unit_variant("PublicAccessType", 0u32, "container"),
            Self::Blob => serializer.serialize_unit_variant("PublicAccessType", 1u32, "blob"),
            Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
        }
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct QueryFormat {
    #[doc = "The quick query format type."]
    #[serde(rename = "Type", with = "azure_core::xml::text_content")]
    pub type_: QueryType,
    #[doc = "Groups the settings used for interpreting the blob data if the blob is delimited text formatted."]
    #[serde(rename = "DelimitedTextConfiguration", default, skip_serializing_if = "Option::is_none")]
    pub delimited_text_configuration: Option<DelimitedTextConfiguration>,
    #[doc = "json text configuration"]
    #[serde(rename = "JsonTextConfiguration", default, skip_serializing_if = "Option::is_none")]
    pub json_text_configuration: Option<JsonTextConfiguration>,
    #[doc = "Groups the settings used for formatting the response if the response should be Arrow formatted."]
    #[serde(rename = "ArrowConfiguration", default, skip_serializing_if = "Option::is_none")]
    pub arrow_configuration: Option<ArrowConfiguration>,
    #[doc = "parquet configuration"]
    #[serde(rename = "ParquetTextConfiguration", default, skip_serializing_if = "Option::is_none")]
    pub parquet_text_configuration: Option<ParquetConfiguration>,
}
impl QueryFormat {
    pub fn new(type_: QueryType) -> Self {
        Self {
            type_,
            delimited_text_configuration: None,
            json_text_configuration: None,
            arrow_configuration: None,
            parquet_text_configuration: None,
        }
    }
}
#[doc = "Groups the set of query request settings."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct QueryRequest {
    #[doc = "Required. The type of the provided query expression."]
    #[serde(rename = "QueryType", with = "azure_core::xml::text_content")]
    pub query_type: query_request::QueryType,
    #[doc = "The query expression in SQL. The maximum size of the query expression is 256KiB."]
    #[serde(rename = "Expression")]
    pub expression: String,
    #[serde(rename = "InputSerialization", default, skip_serializing_if = "Option::is_none")]
    pub input_serialization: Option<QuerySerialization>,
    #[serde(rename = "OutputSerialization", default, skip_serializing_if = "Option::is_none")]
    pub output_serialization: Option<QuerySerialization>,
}
impl QueryRequest {
    pub fn new(query_type: query_request::QueryType, expression: String) -> Self {
        Self {
            query_type,
            expression,
            input_serialization: None,
            output_serialization: None,
        }
    }
}
pub mod query_request {
    use super::*;
    #[doc = "Required. The type of the provided query expression."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum QueryType {
        #[serde(rename = "SQL")]
        Sql,
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct QuerySerialization {
    #[serde(rename = "Format")]
    pub format: QueryFormat,
}
impl QuerySerialization {
    pub fn new(format: QueryFormat) -> Self {
        Self { format }
    }
}
#[doc = "The quick query format type."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum QueryType {
    #[serde(rename = "delimited")]
    Delimited,
    #[serde(rename = "json")]
    Json,
    #[serde(rename = "arrow")]
    Arrow,
    #[serde(rename = "parquet")]
    Parquet,
}
#[doc = "If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are High and Standard."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(remote = "RehydratePriority")]
pub enum RehydratePriority {
    High,
    Standard,
    #[serde(skip_deserializing)]
    UnknownValue(String),
}
impl FromStr for RehydratePriority {
    type Err = value::Error;
    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Self::deserialize(s.into_deserializer())
    }
}
impl<'de> Deserialize<'de> for RehydratePriority {
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: Deserializer<'de>,
    {
        let s = String::deserialize(deserializer)?;
        let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
        Ok(deserialized)
    }
}
impl Serialize for RehydratePriority {
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: Serializer,
    {
        match self {
            Self::High => serializer.serialize_unit_variant("RehydratePriority", 0u32, "High"),
            Self::Standard => serializer.serialize_unit_variant("RehydratePriority", 1u32, "Standard"),
            Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
        }
    }
}
#[doc = "the retention policy which determines how long the associated data should persist"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct RetentionPolicy {
    #[doc = "Indicates whether a retention policy is enabled for the storage service"]
    #[serde(rename = "Enabled")]
    pub enabled: bool,
    #[doc = "Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older than this value will be deleted"]
    #[serde(rename = "Days", default, skip_serializing_if = "Option::is_none")]
    pub days: Option<i64>,
    #[doc = "Indicates whether permanent delete is allowed on this storage account."]
    #[serde(rename = "AllowPermanentDelete", default, skip_serializing_if = "Option::is_none")]
    pub allow_permanent_delete: Option<bool>,
}
impl RetentionPolicy {
    pub fn new(enabled: bool) -> Self {
        Self {
            enabled,
            days: None,
            allow_permanent_delete: None,
        }
    }
}
#[doc = "signed identifier"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct SignedIdentifier {
    #[doc = "a unique id"]
    #[serde(rename = "Id")]
    pub id: String,
    #[doc = "An Access policy"]
    #[serde(rename = "AccessPolicy")]
    pub access_policy: AccessPolicy,
}
impl SignedIdentifier {
    pub fn new(id: String, access_policy: AccessPolicy) -> Self {
        Self { id, access_policy }
    }
}
pub type SignedIdentifiers = Vec<SignedIdentifier>;
#[doc = "The properties that enable an account to host a static website"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct StaticWebsite {
    #[doc = "Indicates whether this account is hosting a static website"]
    #[serde(rename = "Enabled")]
    pub enabled: bool,
    #[doc = "The default name of the index page under each directory"]
    #[serde(rename = "IndexDocument", default, skip_serializing_if = "Option::is_none")]
    pub index_document: Option<String>,
    #[doc = "The absolute path of the custom 404 page"]
    #[serde(rename = "ErrorDocument404Path", default, skip_serializing_if = "Option::is_none")]
    pub error_document404_path: Option<String>,
    #[doc = "Absolute path of the default index page"]
    #[serde(rename = "DefaultIndexDocumentPath", default, skip_serializing_if = "Option::is_none")]
    pub default_index_document_path: Option<String>,
}
impl StaticWebsite {
    pub fn new(enabled: bool) -> Self {
        Self {
            enabled,
            index_document: None,
            error_document404_path: None,
            default_index_document_path: None,
        }
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct StorageError {
    #[serde(rename = "Message", default, skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
}
impl azure_core::Continuable for StorageError {
    type Continuation = String;
    fn continuation(&self) -> Option<Self::Continuation> {
        None
    }
}
impl StorageError {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Storage Service Properties."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct StorageServiceProperties {
    #[doc = "Azure Analytics Logging settings."]
    #[serde(rename = "Logging", default, skip_serializing_if = "Option::is_none")]
    pub logging: Option<Logging>,
    #[doc = "a summary of request statistics grouped by API in hour or minute aggregates for blobs"]
    #[serde(rename = "HourMetrics", default, skip_serializing_if = "Option::is_none")]
    pub hour_metrics: Option<Metrics>,
    #[doc = "a summary of request statistics grouped by API in hour or minute aggregates for blobs"]
    #[serde(rename = "MinuteMetrics", default, skip_serializing_if = "Option::is_none")]
    pub minute_metrics: Option<Metrics>,
    #[doc = "The set of CORS rules."]
    #[serde(rename = "Cors", default, skip_serializing_if = "Option::is_none")]
    pub cors: Option<storage_service_properties::Cors>,
    #[doc = "The default version to use for requests to the Blob service if an incoming request's version is not specified. Possible values include version 2008-10-27 and all more recent versions"]
    #[serde(rename = "DefaultServiceVersion", default, skip_serializing_if = "Option::is_none")]
    pub default_service_version: Option<String>,
    #[doc = "the retention policy which determines how long the associated data should persist"]
    #[serde(rename = "DeleteRetentionPolicy", default, skip_serializing_if = "Option::is_none")]
    pub delete_retention_policy: Option<RetentionPolicy>,
    #[doc = "The properties that enable an account to host a static website"]
    #[serde(rename = "StaticWebsite", default, skip_serializing_if = "Option::is_none")]
    pub static_website: Option<StaticWebsite>,
}
impl StorageServiceProperties {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod storage_service_properties {
    use super::*;
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
    pub struct Cors {
        #[serde(rename = "$value", default, skip_serializing_if = "Vec::is_empty")]
        pub items: Vec<CorsRule>,
    }
}
#[doc = "Stats for the storage service."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct StorageServiceStats {
    #[doc = "Geo-Replication information for the Secondary Storage Service"]
    #[serde(rename = "GeoReplication", default, skip_serializing_if = "Option::is_none")]
    pub geo_replication: Option<GeoReplication>,
}
impl StorageServiceStats {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "A user delegation key"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct UserDelegationKey {
    #[doc = "The Azure Active Directory object ID in GUID format."]
    #[serde(rename = "SignedOid")]
    pub signed_oid: String,
    #[doc = "The Azure Active Directory tenant ID in GUID format"]
    #[serde(rename = "SignedTid")]
    pub signed_tid: String,
    #[doc = "The date-time the key is active"]
    #[serde(rename = "SignedStart", with = "azure_core::date::rfc3339")]
    pub signed_start: time::OffsetDateTime,
    #[doc = "The date-time the key expires"]
    #[serde(rename = "SignedExpiry", with = "azure_core::date::rfc3339")]
    pub signed_expiry: time::OffsetDateTime,
    #[doc = "Abbreviation of the Azure Storage service that accepts the key"]
    #[serde(rename = "SignedService")]
    pub signed_service: String,
    #[doc = "The service version that created the key"]
    #[serde(rename = "SignedVersion")]
    pub signed_version: String,
    #[doc = "The key as a base64 string"]
    #[serde(rename = "Value")]
    pub value: String,
}
impl UserDelegationKey {
    pub fn new(
        signed_oid: String,
        signed_tid: String,
        signed_start: time::OffsetDateTime,
        signed_expiry: time::OffsetDateTime,
        signed_service: String,
        signed_version: String,
        value: String,
    ) -> Self {
        Self {
            signed_oid,
            signed_tid,
            signed_start,
            signed_expiry,
            signed_service,
            signed_version,
            value,
        }
    }
}