1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
//! # App Execution.
//!
//! Control app launch, execution, and termination.
//!
//! Your app interacts with the system during normal execution by calling system APIs.
//! However, you need to communicate information about how to execute your app before you
//! have access to these API calls. For example, you may need to specify under what
//! conditions your app can launch, the environment that it should launch into,
//! and what should happen when it terminates. You add keys to your app’s Information
//! Property List file to manage its execution.
//!
//! ## Framework
//! * Bundle Resources

use crate::{serialize_enum_option, serialize_vec_enum_option};
use serde::{Deserialize, Serialize};
use std::collections::BTreeMap;

/// Launch
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct Launch {
    /// The name of the bundle’s main executable class.
    ///
    /// The system uses the class identified by this key to set the principalClass
    /// property of a bundle when it’s loaded.
    ///
    /// Xcode sets the default value of this key to NSApplication for macOS apps, and to
    /// UIApplication for iOS and tvOS apps. For other types of bundles, you must set
    /// this key in The Info.plist File.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(rename = "NSPrincipalClass", skip_serializing_if = "Option::is_none")]
    pub principal_class: Option<String>,
    /// The name of the class that implements the complication data source protocol.
    ///
    /// Xcode automatically includes this key in the information property list when you
    /// modify the WatchKit extension’s data source (General > Complication
    /// Configuration > Data Source class).
    ///
    /// ## Availability
    /// * watchOS 2.0+
    ///
    /// ## Framework
    /// * WatchKit
    #[serde(
        rename = "CLKComplicationPrincipalClass",
        skip_serializing_if = "Option::is_none"
    )]
    pub complication_principal_class: Option<Vec<String>>,
    /// The name of the bundle’s executable file.
    ///
    /// For an app, this key is the executable. For a loadable bundle, it's the binary
    /// that's loaded dynamically by the bundle. For a framework, it's the shared
    /// library framework and must have the same name as the framework but without the
    /// .framework extension.
    ///
    /// macOS uses this key to locate the bundle’s executable or shared library in cases
    /// where the user renames the app or bundle directory.
    ///
    /// ## Availability
    /// * iOS 2.0+
    /// * macOS 10.0+
    /// * tvOS 9.0+
    /// * watchOS 2.0+
    ///
    /// ## Framework
    /// * Core Foundation
    #[serde(rename = "CFBundleExecutable", skip_serializing_if = "Option::is_none")]
    pub bundle_executable: Option<String>,
    /// Environment variables to set before launching the app.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * Core Services
    #[serde(rename = "LSEnvironment", skip_serializing_if = "Option::is_none")]
    pub environment: Option<DefaultDictionary>,
    /// Application shortcut items.
    ///
    /// ## Availability
    /// * iOS 9.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "UIApplicationShortcutItems",
        skip_serializing_if = "Option::is_none"
    )]
    pub application_shortcut_items: Option<Vec<ApplicationShortcutItem>>,
}

/// Application Shortcut Item
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct ApplicationShortcutItem {
    #[serde(
        rename = "UIApplicationShortcutItemIconFile",
        skip_serializing_if = "Option::is_none"
    )]
    pub icon_file: Option<String>,
    #[serde(
        rename = "UIApplicationShortcutItemIconSymbolName",
        skip_serializing_if = "Option::is_none"
    )]
    pub symbol_name: Option<String>,
    #[serde(
        rename = "UIApplicationShortcutItemIconType",
        skip_serializing_if = "Option::is_none"
    )]
    pub icon_type: Option<String>,
    #[serde(
        rename = "UIApplicationShortcutItemSubtitle",
        skip_serializing_if = "Option::is_none"
    )]
    pub subtitle: Option<String>,
    #[serde(rename = "UIApplicationShortcutItemTitle")]
    pub title: String,
    #[serde(rename = "UIApplicationShortcutItemType")]
    pub item_type: String,
    #[serde(
        rename = "UIApplicationShortcutItemUserInfo",
        skip_serializing_if = "Option::is_none"
    )]
    pub user_info: Option<BTreeMap<String, String>>,
}

/// Launch Conditions
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct LaunchConditions {
    /// The device-related features that your app requires to run.
    ///
    /// The App Store prevents customers from installing an app on a device that doesn’t
    /// support the required capabilities for that app. Use this key to declare the
    /// capabilities your app requires. For a list of the features that different
    /// devices support, see Required Device Capabilities.
    ///
    /// You typically use an array for the key’s associated value. The presence in that
    /// array of any of the above possible values indicates that the app requires the
    /// corresponding feature. Omit a value to indicate that the app doesn’t require
    /// the feature, but it can be present.
    ///
    /// Alternatively, you can use a dictionary as the associated value for the
    /// UIRequiredDeviceCapabilities key. In that case, use the values above as the
    /// dictionary’s keys, each with an associated Boolean value. Set the value to true to
    /// require the corresponding feature. Set the value to false to indicate that the
    /// feature must not be present on the device. Omit the feature from the
    /// dictionary to indicate that your app neither requires nor disallows it.
    ///
    /// Specify only the features that your app absolutely requires. If your app can
    /// accommodate missing features by avoiding the code paths that use those
    /// features, don’t include the corresponding key.
    ///
    /// ## Availability
    /// * iOS 3.0+
    /// * tvOS 9.0+
    /// * watchOS 2.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "UIRequiredDeviceCapabilities",
        skip_serializing_if = "Option::is_none",
        serialize_with = "serialize_vec_enum_option"
    )]
    pub required_device_capabilities: Option<Vec<DeviceCapabilities>>,
    /// A Boolean value indicating whether more than one user can launch the app
    /// simultaneously.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * Core Services
    #[serde(
        rename = "LSMultipleInstancesProhibited",
        skip_serializing_if = "Option::is_none"
    )]
    pub multiple_instances_prohibited: Option<bool>,
    /// An array of the architectures that the app supports, arranged according to their
    /// preferred usage.
    ///
    /// Use this key to prioritize the execution of a specific architecture in a universal
    /// binary. This key contains an array of strings, with each string specifying the
    /// name of a supported architecture. The order of the strings in the array
    /// represents your preference for executing the app. For example, if you specify the
    /// x86_64 architecture first for a universal app, the system runs that app under
    /// Rosetta translation on Apple silicon. For more information about
    /// Rosetta translation, see About the Rosetta Translation Environment.
    ///
    /// ## Availability
    /// * macOS 10.1+
    ///
    /// ## Framework
    /// * Core Services
    #[serde(
        rename = "LSArchitecturePriority",
        skip_serializing_if = "Option::is_none",
        serialize_with = "serialize_enum_option"
    )]
    pub architecture_priority: Option<ArchitecturePriority>,
    /// A Boolean value that indicates whether to require the execution of the app’s
    /// native architecture when multiple architectures are available.
    ///
    /// When an app supports multiple architectures, the presence of this key causes the
    /// system to choose the native architecture over ones that require translation.
    /// For example, this key prevents the system from using the Rosetta translation
    /// process to execute the Intel portion of a universal app on Apple silicon.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * Core Services
    #[serde(
        rename = "LSRequiresNativeExecution",
        skip_serializing_if = "Option::is_none"
    )]
    pub requires_native_execution: Option<bool>,
    /// A Boolean value indicating whether the user can install and run the watchOS app
    /// independently of its iOS companion app.
    ///
    /// Xcode automatically includes this key in the WatchKit extension’s information
    /// property list and sets its value to true when you create a project using the
    /// iOS App with Watch App template. When you set the value of this key to true, the
    /// app doesn’t need its iOS companion app to operate properly. Users can choose
    /// to install the iOS app, the watchOS app, or both.
    ///
    /// ## Availability
    /// * watchOS 6.0+
    ///
    /// ## Framework
    /// * WatchKit
    #[serde(
        rename = "WKRunsIndependentlyOfCompanionApp",
        skip_serializing_if = "Option::is_none"
    )]
    pub runs_independently_of_companion_app: Option<bool>,
    /// A Boolean value indicating whether the app is a watch-only app.
    ///
    /// Xcode automatically includes this key in the WatchKit extension’s information
    /// property list and sets its value to true when you create a project using the
    /// Watch App template. When you set the value of this key to true, the app is only
    /// available on Apple Watch, with no related iOS app.
    ///
    /// ## Availability
    /// * watchOS 6.0+
    ///
    /// ## Framework
    /// * WatchKit
    #[serde(rename = "WKWatchOnly", skip_serializing_if = "Option::is_none")]
    pub watch_only: Option<bool>,
    /// A Boolean value that indicates whether a watchOS app should opt out of
    /// automatically launching when its companion iOS app starts playing audio
    /// content.
    ///
    /// If your watchOS app does not act as a remote control for the iOS app, set this key
    /// to true in your WatchKit extension’s information property list.
    ///
    /// ## Availability
    /// * watchOS 5.0+
    ///
    /// ## Framework
    /// * WatchKit
    #[serde(
        rename = "PUICAutoLaunchAudioOptOut",
        skip_serializing_if = "Option::is_none"
    )]
    pub auto_launch_audio_opt_out: Option<bool>,
    /// The complication families that the app can provide data for.
    ///
    /// To add this key to the information property list, enable the desired families in
    /// the WatchKit extension’s Complication Configuration settings.
    #[deprecated(
        since = "watchOS 2.0–7.0",
        note = "In watchOS 7 and later, use getComplicationDescriptors(handler:) to define the supported complication families."
    )]
    #[serde(
        rename = "CLKComplicationSupportedFamilies",
        skip_serializing_if = "Option::is_none",
        serialize_with = "serialize_vec_enum_option"
    )]
    pub complication_supported_families: Option<Vec<ComplicationSupportedFamilies>>,
}

/// Extensions and Services
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct ExtensionsAndServices {
    /// The properties of an app extension.
    ///
    /// ## Availability
    /// * iOS 8.0+
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(rename = "NSExtension", skip_serializing_if = "Option::is_none")]
    pub extension: Option<Extension>,
    /// The services provided by an app.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(rename = "NSServices", skip_serializing_if = "Option::is_none")]
    pub services: Option<Vec<Service>>,
    /// The name of your watchOS app’s extension delegate.
    ///
    /// This key provides the name of a class that adopts the WKExtensionDelegate
    /// protocol. Xcode automatically includes this key in the WatchKit extension’s
    /// information property list when you create a watchOS project from a template.
    /// You only modify this value when you rename or replace the extension delegate.
    ///
    /// ## Availability
    /// * watchOS 2.0+
    ///
    /// ## Framework
    /// * WatchKit
    #[serde(
        rename = "WKExtensionDelegateClassName",
        skip_serializing_if = "Option::is_none"
    )]
    pub extension_delegate_class_name: Option<String>,
    /// The bundle ID of the widget that's available as a Home screen quick action in apps
    /// that have more than one widget.
    ///
    /// ## Availability
    /// * iOS 10.0+
    /// * tvOS 9.0+
    /// * watchOS 2.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "UIApplicationShortcutWidget",
        skip_serializing_if = "Option::is_none"
    )]
    pub application_shortcut_widget: Option<String>,
}

/// App Clips
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct AppClips {
    /// A collection of keys that an App Clip uses to get additional capabilities.
    ///
    /// ## Availability
    /// * iOS 14.0+
    ///
    /// ## Framework
    /// * App Clip
    #[serde(rename = "NSAppClip", skip_serializing_if = "Option::is_none")]
    pub app_clip: Option<AppClip>,
}

/// Background Execution
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct BackgroundExecution {
    /// Services provided by an app that require it to run in the background.
    ///
    /// ## Availability
    /// * iOS 4.0+
    /// * watchOS 4.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "UIBackgroundModes",
        skip_serializing_if = "Option::is_none",
        serialize_with = "serialize_vec_enum_option"
    )]
    pub ui_background_modes: Option<Vec<UiBackgroundMode>>,
    /// The services a watchOS app provides that require it to continue running in the
    /// background.
    ///
    /// You can only enable one of the extended runtime session modes (self-care,
    /// mindfulness, physical-therapy, or alarm). However, you can enable both an
    /// extended runtime session mode and the workout-processing mode. If you set the
    /// background modes using Xcode’s Signing & Capabilities tab, Xcode insures that
    /// these values are set properly.
    ///
    /// ## Availability
    /// * watchOS 3.0+
    ///
    /// ## Framework
    /// * WatchKit
    #[serde(
        rename = "WKBackgroundModes",
        skip_serializing_if = "Option::is_none",
        serialize_with = "serialize_vec_enum_option"
    )]
    pub wk_background_modes: Option<Vec<WkBackgroundMode>>,
    /// An array of strings containing developer-specified task identifiers in reverse URL
    /// notation.
    ///
    /// ## Availability
    /// * iOS 13.0+
    /// * tvOS 13.0+
    ///
    /// ## Framework
    /// * Background Tasks
    #[serde(
        rename = "BGTaskSchedulerPermittedIdentifiers",
        skip_serializing_if = "Option::is_none"
    )]
    pub task_scheduler_permitted_identifiers: Option<Vec<String>>,
    /// A Boolean value indicating whether the app runs only in the background.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * Core Services
    #[serde(rename = "LSBackgroundOnly", skip_serializing_if = "Option::is_none")]
    pub background_only: Option<bool>,
}

/// Endpoint Security
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct EndpointSecurity {
    ///
    /// ## Availability
    /// * macOS 10.15+
    ///
    /// ## Framework
    /// * Endpoint Security
    #[serde(
        rename = "NSEndpointSecurityEarlyBoot",
        skip_serializing_if = "Option::is_none"
    )]
    pub endpoint_security_early_boot: Option<bool>,
    ///
    /// ## Availability
    /// * macOS 10.15+
    ///
    /// ## Framework
    /// * Endpoint Security
    #[serde(
        rename = "NSEndpointSecurityRebootRequired",
        skip_serializing_if = "Option::is_none"
    )]
    pub endpoint_security_reboot_required: Option<bool>,
}

/// Plugin Support
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct PluginSupport {
    /// The name of the app's plugin bundle.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(rename = "NSDockTilePlugIn", skip_serializing_if = "Option::is_none")]
    pub dock_tile_plugin: Option<String>,
}

/// Plugin Configuration
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct PluginConfiguration {
    /// The function to use when dynamically registering a plugin.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * Core Foundation
    #[serde(
        rename = "CFPlugInDynamicRegisterFunction",
        skip_serializing_if = "Option::is_none"
    )]
    pub plugin_dynamic_register_function: Option<String>,
    /// A Boolean value indicating whether the host loads this plugin.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * Core Foundation
    #[serde(
        rename = "CFPlugInDynamicRegistration",
        skip_serializing_if = "Option::is_none"
    )]
    pub plugin_dynamic_registration: Option<bool>,
    /// The interfaces supported by the plugin for static registration.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * Core Foundation
    #[serde(rename = "CFPlugInFactories", skip_serializing_if = "Option::is_none")]
    pub plugin_factories: Option<BTreeMap<String, String>>,
    /// One or more groups of interfaces supported by the plugin for static registration.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * Core Foundation
    #[serde(rename = "CFPlugInTypes", skip_serializing_if = "Option::is_none")]
    pub plugin_types: Option<BTreeMap<String, String>>,
    /// The name of the function to call to unload the plugin code from memory.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * Core Foundation
    #[serde(
        rename = "CFPlugInUnloadFunction",
        skip_serializing_if = "Option::is_none"
    )]
    pub plugin_unload_function: Option<String>,
}

/// Termination
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct Termination {
    /// A Boolean value indicating whether the app is notified when a child process dies.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * Core Foundation
    #[serde(rename = "LSGetAppDiedEvents", skip_serializing_if = "Option::is_none")]
    pub get_app_died_events: Option<bool>,
    /// A Boolean value indicating whether the system may terminate the app to log out or
    /// shut down more quickly.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(
        rename = "NSSupportsSuddenTermination",
        skip_serializing_if = "Option::is_none"
    )]
    pub supports_sudden_termination: Option<bool>,
    /// Deprecated: A Boolean value indicating whether the app terminates, rather than
    /// moves to the background, when the app quits.
    ///
    /// ## Availability
    /// * iOS 4.0–13.0
    /// * tvOS 9.0–13.0
    /// * watchOS 2.0–6.0
    ///
    /// ## Framework
    /// * UIKit
    #[deprecated(
        since = "iOS 4.0–13.0, tvOS 9.0–13.0, watchOS 2.0–6.0",
        note = "The system now automatically suspends apps leaving the foreground when they don’t require background execution.
                For more information, see About the Background Execution Sequence."
    )]
    #[serde(
        rename = "UIApplicationExitsOnSuspend",
        skip_serializing_if = "Option::is_none"
    )]
    pub application_exits_on_suspend: Option<bool>,
}

/// WK Background Mode
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
pub enum WkBackgroundMode {
    /// Allows an active workout session to run in the background.
    #[serde(rename = "workout-processing")]
    WorkoutProcessing,
    /// Enables extended runtime sessions for brief activities focusing on health or
    /// emotional well-being.
    #[serde(rename = "self-care")]
    SelfCare,
    /// Enables extended runtime sessions for silent meditation.
    #[serde(rename = "mindfulness")]
    Mindfulness,
    /// Enables extended runtime sessions for stretching, strengthening, or
    /// range-of-motion exercises.
    #[serde(rename = "physical-therapy")]
    PhysicalTherapy,
    /// Enables extended runtime sessions for smart alarms.
    #[serde(rename = "alarm")]
    Alarm,
}

/// UI Background Mode
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
pub enum UiBackgroundMode {
    #[serde(rename = "audio")]
    Audio,
    #[serde(rename = "location")]
    Location,
    #[serde(rename = "voip")]
    Voip,
    #[serde(rename = "external-accessory")]
    ExternalAccessory,
    #[serde(rename = "bluetooth-central")]
    BluetoothCentral,
    #[serde(rename = "bluetooth-peripheral")]
    BluetoothPeripheral,
    #[serde(rename = "fetch")]
    Fetch,
    #[serde(rename = "remote-notification")]
    RemoteNotification,
    #[serde(rename = "processing")]
    Processing,
}

/// App Clip
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct AppClip {
    /// A Boolean value that indicates whether an App Clip can schedule or receive
    /// notifications for a limited amount of time.
    ///
    /// Set the corresponding value to true to enable your App Clip to schedule or receive
    /// notifications for up to 8 hours after each launch. For more information, see
    /// Enabling Notifications in App Clips.
    ///
    /// ## Availability
    /// * iOS 14.0+
    ///
    /// ## Framework
    /// * App Clip
    #[serde(
        rename = "NSAppClipRequestEphemeralUserNotification",
        skip_serializing_if = "Option::is_none"
    )]
    pub request_ephemeral_user_notification: Option<bool>,
    /// A Boolean value that indicates whether an App Clip can confirm the user’s
    /// location.
    ///
    /// Set the value to true to allow your App Clip to confirm the user’s location. For
    /// more information, see Responding to Invocations.
    ///
    /// ## Availability
    /// * iOS 14.0+
    ///
    /// ## Framework
    /// * App Clip
    #[serde(
        rename = "NSAppClipRequestLocationConfirmation",
        skip_serializing_if = "Option::is_none"
    )]
    pub request_location_confirmation: Option<bool>,
}

/// Extension
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct Extension {
    /// The names of the intents that an extension supports.
    ///
    /// ## Availability
    /// * iOS 10.0+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(rename = "IntentsSupported", skip_serializing_if = "Option::is_none")]
    pub intents_supported: Option<Vec<String>>,
    /// A dictionary that specifies the minimum size of the floating window in which Final
    /// Cut Pro hosts the extension view.
    ///
    /// ## Availability
    /// * ProVideo Workflow Extensions 1.0+
    ///
    /// ## Framework
    /// * ProExtension
    #[serde(
        rename = "ProExtensionAttributes",
        skip_serializing_if = "Option::is_none"
    )]
    pub pro_extension_attributes: Option<BTreeMap<String, String>>,
    /// The name of the class with the principal implementation of your extension.
    ///
    /// The Compressor app instantiates the class specified in the
    /// ProExtensionPrincipalClass key to convert source files to the output format
    /// your extension supports.
    ///
    /// ## Availability
    /// * ProVideo Workflow Extensions 1.0+
    /// * ProVideo Encoder Extensions 1.0+
    ///
    /// ## Framework
    /// * ProExtension
    #[serde(
        rename = "ProExtensionPrincipalClass",
        skip_serializing_if = "Option::is_none"
    )]
    pub pro_extension_principal_class: Option<String>,
    /// The name of the principal view controller class of your extension.
    ///
    /// This key provides the name of the primary view controller class of your extension
    /// that adopts the NSViewController protocol. When you create an extension, the
    /// Xcode template automatically includes this key in the workflow extension
    /// information property list. You only modify the value of this key when you rename
    /// the primary view controller class in your extension.
    ///
    /// ## Availability
    /// * ProVideo Workflow Extensions 1.0+
    /// * ProVideo Encoder Extensions 1.0+
    ///
    /// ## Framework
    /// * ProExtension
    #[serde(
        rename = "ProExtensionPrincipalViewControllerClass",
        skip_serializing_if = "Option::is_none"
    )]
    pub pro_extension_principal_view_controller_class: Option<String>,
    /// A UUID string that uniquely identifies your extension to the Compressor app.
    ///
    /// The value for this key is a placeholder UUID the Xcode template generates. Each
    /// extension must have a unique UUID. When you build an extension for the first
    /// time, the build script in the Xcode template replaces the placeholder UUID
    /// with a new UUID. The new UUID fulfills the uniqueness and persistence requirement
    /// for ProExtensionUUID. For subsequent rebuilds, the UUID stays the same because
    /// the Compressor app uses this UUID to differentiate between previously
    /// saved and newly discovered extensions.
    ///
    /// ## Availability
    /// * ProVideo Workflow Extensions 1.0+
    /// * ProVideo Encoder Extensions 1.0+
    ///
    /// ## Framework
    /// * ProExtension
    #[serde(rename = "ProExtensionUUID", skip_serializing_if = "Option::is_none")]
    pub pro_extension_uuid: Option<String>,
    /// Account Authentication Modification. The rules the system satisfies when
    /// generating a strong password for your extension during an automatic upgrade.
    ///
    /// ## Availability
    /// * iOS 14.0+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "ASAccountAuthenticationModificationPasswordGenerationRequirements",
        skip_serializing_if = "Option::is_none"
    )]
    pub password_generation_requirements: Option<String>,
    /// Account Authentication Modification. A Boolean value that indicates whether the
    /// extension supports upgrading a user’s password to a strong password.
    ///
    /// ## Availability
    /// * iOS 14.0+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "ASAccountAuthenticationModificationSupportsStrongPasswordUpgrade",
        skip_serializing_if = "Option::is_none"
    )]
    pub supports_strong_password_upgrade: Option<bool>,
    /// Account Authentication Modification. A Boolean value that indicates whether the
    /// extension supports upgrading from using password authentication to using Sign
    /// in with Apple.
    ///
    /// ## Availability
    /// * iOS 14.0+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "ASAccountAuthenticationModificationSupportsUpgradeToSignInWithApple",
        skip_serializing_if = "Option::is_none"
    )]
    pub supports_upgrade_to_sign_in_with_apple: Option<bool>,
    /// A Boolean value indicating whether the Action extension is presented in full
    /// screen.
    ///
    /// ## Availability
    /// * iOS 8.0+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionActionWantsFullScreenPresentation",
        skip_serializing_if = "Option::is_none"
    )]
    pub extension_action_wants_full_screen_presentation: Option<bool>,
    /// Properties of an app extension.
    ///
    /// ## Availability
    /// * iOS 8.0+
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionAttributes",
        skip_serializing_if = "Option::is_none"
    )]
    pub extension_attributes: Option<ExtensionAttributes>,
    /// The name of the app extension’s main storyboard file.
    ///
    /// This key is mutually exclusive with NSExtensionPrincipalClass. Typically, Xcode
    /// sets the value of this key when creating an App Extension target in your
    /// project. If you change the name of your storyboard file, remember to update the
    /// value of this key.
    ///
    /// ## Availability
    /// * iOS 8.0+
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionMainStoryboard",
        skip_serializing_if = "Option::is_none"
    )]
    pub extension_main_storyboard: Option<String>,
    /// A Boolean value indicating whether the app extension ignores appearance changes
    /// made by the host app.
    ///
    /// ## Availability
    /// * iOS 10.0+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionOverridesHostUIAppearance",
        skip_serializing_if = "Option::is_none"
    )]
    pub extension_overrides_host_ui_appearance: Option<bool>,
    /// The extension point that supports an app extension.
    ///
    /// ## Availability
    /// * iOS 8.0+
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionPointIdentifier",
        skip_serializing_if = "Option::is_none",
        serialize_with = "serialize_enum_option"
    )]
    pub extension_point_identifier: Option<ExtensionPointIdentifier>,
    /// The custom class that implements an app extension’s primary view or functionality.
    ///
    /// This key is mutually exclusive with NSExtensionMainStoryboard. Typically, Xcode
    /// sets the value of this key when creating an App Extension target in your
    /// project. If you change the name of the specified class, remember to update the
    /// value of this key.
    ///
    /// ## Availability
    /// * iOS 8.0+
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionPrincipalClass",
        skip_serializing_if = "Option::is_none"
    )]
    pub extension_principal_class: Option<String>,
    /// The content scripts for a Safari extension.
    ///
    /// ## Availability
    /// * macOS 10.11.5+
    ///
    /// ## Framework
    /// * Safari Services
    #[serde(
        rename = "SFSafariContentScript",
        skip_serializing_if = "Option::is_none"
    )]
    pub safari_content_script: Option<Vec<SafariContentScript>>,
    /// The context menu items for a Safari extension.
    ///
    /// ## Availability
    /// * macOS 10.11.5+
    ///
    /// ## Framework
    /// * Safari Services
    #[serde(
        rename = "SFSafariContextMenu",
        skip_serializing_if = "Option::is_none"
    )]
    pub safari_context_menu: Option<Vec<SafariContextMenu>>,
    /// The style sheet for a Safari extension.
    ///
    /// ## Availability
    /// * macOS 10.11.5+
    ///
    /// ## Framework
    /// * Safari Services
    #[serde(rename = "SFSafariStyleSheet", skip_serializing_if = "Option::is_none")]
    pub safari_style_sheet: Option<Vec<SafariStyleSheet>>,
    /// The items to add to the toolbar for a Safari extension.
    ///
    /// ## Availability
    /// * macOS 10.11.5+
    ///
    /// ## Framework
    /// * Safari Services
    #[serde(
        rename = "SFSafariToolbarItem",
        skip_serializing_if = "Option::is_none"
    )]
    pub safari_toolbar_item: Option<SafariToolbarItem>,
    /// The webpages a Safari extension can access.
    ///
    /// ## Availability
    /// * macOS 10.11.5+
    ///
    /// ## Framework
    /// * Safari Services
    #[serde(
        rename = "SFSafariWebsiteAccess",
        skip_serializing_if = "Option::is_none"
    )]
    pub safari_website_access: Option<SafariWebsiteAccess>,
}

/// Safari Website Access
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct SafariWebsiteAccess {
    /// The domains that a Safari extension is allowed access to.
    ///
    /// ## Availability
    /// * macOS 10.11.5+
    ///
    /// ## Framework
    /// * Safari Services
    #[serde(rename = "Allowed Domains", skip_serializing_if = "Option::is_none")]
    pub allowed_domains: Option<Vec<String>>,
    /// The level of a Safari extension’s website access.
    ///
    /// ## Availability
    /// * macOS 10.11.5+
    ///
    /// ## Framework
    /// * Safari Services
    #[serde(rename = "Level", skip_serializing_if = "Option::is_none")]
    pub level: Option<SafariWebsiteAccessLevel>,
}

/// Safari Website Access Level
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
pub enum SafariWebsiteAccessLevel {
    #[serde(rename = "None")]
    None,
    #[serde(rename = "All")]
    All,
    #[serde(rename = "Some")]
    Some,
}

/// Safari Toolbar Item
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct SafariToolbarItem {
    /// The properties of an app extension's toolbar item that's been added to the Safari
    /// window.
    ///
    /// ## Availability
    /// * macOS 10.11.5+
    ///
    /// ## Framework
    /// * Safari Services
    #[serde(rename = "Action", skip_serializing_if = "Option::is_none")]
    pub action: Option<String>,
    /// The identifier for a Safari extension's toolbar item.
    ///
    /// ## Availability
    /// * macOS 10.11.5+
    ///
    /// ## Framework
    /// * Safari Services
    #[serde(rename = "Identifier", skip_serializing_if = "Option::is_none")]
    pub identifier: Option<String>,
    /// An image that represents a Safari extension's toolbar item.
    ///
    /// ## Availability
    /// * macOS 10.11.5+
    ///
    /// ## Framework
    /// * Safari Services
    #[serde(rename = "Image", skip_serializing_if = "Option::is_none")]
    pub image: Option<String>,
    /// The label for the Safari extension's toolbar item.
    ///
    /// ## Availability
    /// * macOS 10.11.5+
    ///
    /// ## Framework
    /// * Safari Services
    #[serde(rename = "Label", skip_serializing_if = "Option::is_none")]
    pub label: Option<String>,
}

/// Safari Style Sheet
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct SafariStyleSheet {
    /// The webpages that the script can be injected into.
    ///
    /// ## Availability
    /// * macOS 10.11.5+
    ///
    /// ## Framework
    /// * Safari Services
    #[serde(
        rename = "Allowed URL Patterns",
        skip_serializing_if = "Option::is_none"
    )]
    pub allowed_url_patterns: Option<Vec<String>>,
    /// The webpages that the script can't be injected into.
    ///
    /// ## Availability
    /// * macOS 10.11.5+
    ///
    /// ## Framework
    /// * Safari Services
    #[serde(
        rename = "Excluded URL Patterns",
        skip_serializing_if = "Option::is_none"
    )]
    pub excluded_url_patterns: Option<Vec<String>>,
    /// The path to the style sheet, relative to the Resources folder in the app
    /// extension's bundle.
    ///
    /// ## Availability
    /// * macOS 10.11.5+
    ///
    /// ## Framework
    /// * Safari Services
    #[serde(rename = "Style Sheet", skip_serializing_if = "Option::is_none")]
    pub style_sheet: Option<String>,
}

/// The context menu items for a Safari extension
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct SafariContextMenu {
    /// The command to send to the app extension when the user selects the context menu
    /// item.
    ///
    /// ## Availability
    /// * macOS 10.11.5+
    ///
    /// ## Framework
    /// * Safari Services
    #[serde(rename = "Command", skip_serializing_if = "Option::is_none")]
    pub command: Option<String>,
    /// The text to display for the context menu item.
    ///
    /// ## Availability
    /// * macOS 10.11.5+
    ///
    /// ## Framework
    /// * Safari Services
    #[serde(rename = "Text", skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
}

/// Safari Content Script
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct SafariContentScript {
    /// The webpages that the script can be injected into.
    ///
    /// ## Availability
    /// * macOS 10.11.5+
    ///
    /// ## Framework
    /// * Safari Services
    #[serde(
        rename = "Allowed URL Patterns",
        skip_serializing_if = "Option::is_none"
    )]
    pub allowed_url_patterns: Option<Vec<String>>,
    /// The webpages that the script can't be injected into.
    ///
    /// ## Availability
    /// * macOS 10.11.5+
    ///
    /// ## Framework
    /// * Safari Services
    #[serde(
        rename = "Excluded URL Patterns",
        skip_serializing_if = "Option::is_none"
    )]
    pub excluded_url_patterns: Option<Vec<String>>,
    /// The path to the content script, relative to the Resources folder in the app
    /// extension's bundle.
    ///
    /// ## Availability
    /// * macOS 10.11.5+
    ///
    /// ## Framework
    /// * Safari Services
    #[serde(rename = "Script", skip_serializing_if = "Option::is_none")]
    pub script: Option<String>,
}

/// Extension Point Identifier
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
pub enum ExtensionPointIdentifier {
    #[serde(rename = "com.apple.ui-services")]
    UiServices,
    #[serde(rename = "com.apple.services")]
    Services,
    #[serde(rename = "com.apple.keyboard-service")]
    KeyboardService,
    #[serde(rename = "com.apple.fileprovider-nonui")]
    FileproviderNonui,
    #[serde(rename = "com.apple.fileprovider-actionsui")]
    FileproviderActionsui,
    #[serde(rename = "com.apple.FinderSync")]
    FinderSync,
    #[serde(rename = "com.apple.identitylookup.message-filter")]
    IdentityLookupMessageFilter,
    #[serde(rename = "com.apple.photo-editing")]
    PhotoEditing,
    #[serde(rename = "com.apple.share-services")]
    ShareServices,
    #[serde(rename = "com.apple.callkit.call-directory")]
    CallkitCallDirectory,
    #[serde(rename = "com.apple.authentication-services-account-authentication-modification-ui")]
    AuthenticationServicesAccountAuthenticationModificationUi,
    #[serde(rename = "com.apple.AudioUnit-UI")]
    AudioUnitUi,
    #[serde(rename = "com.apple.AppSSO.idp-extension")]
    AppSsoIdpExtension,
    #[serde(rename = "com.apple.authentication-services-credential-provider-ui")]
    AuthenticationServicesCredentialProviderUi,
    #[serde(rename = "com.apple.broadcast-services-setupui")]
    BroadcastServicesSetupui,
    #[serde(rename = "com.apple.broadcast-services-upload")]
    BroadcastServicesUpload,
    #[serde(rename = "com.apple.classkit.context-provider")]
    ClasskitContextProvider,
    #[serde(rename = "com.apple.Safari.content-blocker")]
    SafariContentBlocker,
    #[serde(rename = "com.apple.message-payload-provider")]
    MessagePayloadProvider,
    #[serde(rename = "com.apple.intents-service")]
    IntentsService,
    #[serde(rename = "com.apple.intents-ui-service")]
    IntentsUiService,
    #[serde(rename = "com.apple.networkextension.app-proxy")]
    NetworkExtensionAppProxy,
    #[serde(rename = "com.apple.usernotifications.content-extension")]
    UsernotificationsContentExtension,
    #[serde(rename = "com.apple.usernotifications.service")]
    UsernotificationsService,
    #[serde(rename = "com.apple.ctk-tokens")]
    CtkTokens,
    #[serde(rename = "com.apple.photo-project")]
    PhotoProject,
    #[serde(rename = "com.apple.quicklook.preview")]
    QuicklookPreview,
    #[serde(rename = "com.apple.Safari.extension")]
    SafariExtension,
    #[serde(rename = "com.apple.spotlight.index")]
    SpotlightIndex,
    #[serde(rename = "com.apple.quicklook.thumbnail")]
    QuicklookThumbnail,
    #[serde(rename = "com.apple.tv-top-shelf")]
    TvTopShelf,
    #[serde(rename = "com.apple.identitylookup.classification-ui")]
    ClassificationUi,
    #[serde(rename = "com.apple.widgetkit-extension")]
    WidgetkitExtension,
    #[serde(rename = "com.apple.dt.Xcode.extension.source-editor")]
    ExtensionSourceEditor,
}

/// Extension Attributes
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct ExtensionAttributes {
    /// A Boolean value indicating whether the extension appears in the Finder Preview
    /// pane and Quick Actions menu.
    ///
    /// ## Availability
    /// * macOS 10.14+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(
        rename = "NSExtensionServiceAllowsFinderPreviewItem",
        skip_serializing_if = "Option::is_none"
    )]
    pub allows_finder_preview_item: Option<bool>,
    /// A Boolean value indicating whether an Action extension displays an item in a
    /// window’s toolbar.
    ///
    /// ## Availability
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(
        rename = "NSExtensionServiceAllowsToolbarItem",
        skip_serializing_if = "Option::is_none"
    )]
    pub allows_toolbar_item: Option<bool>,
    /// A Boolean value indicating whether the extension appears as a Quick Action in the
    /// Touch Bar.
    ///
    /// ## Availability
    /// * macOS 10.14+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(
        rename = "NSExtensionServiceAllowsTouchBarItem",
        skip_serializing_if = "Option::is_none"
    )]
    pub allows_touch_bar_item: Option<bool>,
    /// The name of an icon for display when the extension appears in the Finder Preview
    /// pane and Quick Actions menu.
    ///
    /// This key is used in conjunction with the NSExtensionServiceAllowsFinderPreviewItem
    /// key.
    ///
    /// Set the NSExtensionServiceFinderPreviewIconName key's value to a system icon name
    /// or the name of an icon in the extension bundle. This icon should be a template
    /// image: a monochromatic image with transparency, anti-aliasing, and no drop
    /// shadow that uses a mask to define its shape. For design guidance, see Human
    /// Interface Guidelines > macOS > Custom Icons. If no icon is specified, a
    /// default icon is used.
    ///
    /// ## Availability
    /// * macOS 10.14+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(
        rename = "NSExtensionServiceFinderPreviewIconName",
        skip_serializing_if = "Option::is_none"
    )]
    pub finder_preview_icon_name: Option<String>,
    /// A name for display when the extension appears in the Finder Preview pane and Quick
    /// Actions menu.
    ///
    /// This key is used in conjunction with the NSExtensionServiceAllowsFinderPreviewItem
    /// key.
    ///
    /// If the NSExtensionServiceFinderPreviewLabel key isn't provided, the extension's
    /// display name is used.
    ///
    /// ## Availability
    /// * macOS 10.14+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(
        rename = "NSExtensionServiceFinderPreviewLabel",
        skip_serializing_if = "Option::is_none"
    )]
    pub finder_preview_label: Option<String>,
    /// The type of task an Action extension performs.
    ///
    /// ## Availability
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(
        rename = "NSExtensionServiceRoleType",
        skip_serializing_if = "Option::is_none",
        serialize_with = "serialize_enum_option"
    )]
    pub role_type: Option<ExtensionServiceRoleType>,
    /// The image for an Action extension’s toolbar item.
    ///
    /// ## Availability
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(
        rename = "NSExtensionServiceToolbarIconFile",
        skip_serializing_if = "Option::is_none"
    )]
    pub toolbar_icon_file: Option<String>,
    /// The label for an Action extension's toolbar item.
    ///
    /// ## Availability
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(
        rename = "NSExtensionServiceToolbarPaletteLabel",
        skip_serializing_if = "Option::is_none"
    )]
    pub toolbar_palette_label: Option<String>,
    /// The color to use for the bezel around the extension when it appears as a Quick
    /// Action in the Touch Bar.
    ///
    /// This key is used in conjunction with the NSExtensionServiceAllowsTouchBarItem key.
    ///
    /// Set the NSExtensionServiceTouchBarBezelColorName key's value to the name of a
    /// color that exists in your extension's asset catalog—a color that matches a
    /// system color is recommended. If no color is specified, a default color is used.
    ///
    /// ## Availability
    /// * macOS 10.14+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(
        rename = "NSExtensionServiceTouchBarBezelColorName",
        skip_serializing_if = "Option::is_none"
    )]
    pub touch_bar_bezel_color_name: Option<String>,
    /// The name of an icon for display when the extension appears as a Quick Action in
    /// the Touch Bar.
    ///
    /// This key is used in conjunction with the NSExtensionServiceAllowsTouchBarItem key.
    ///
    /// Set the NSExtensionServiceTouchBarIconName key's value to a system icon name or
    /// the name of an icon within the extension bundle. This icon should be a
    /// template image: a monochromatic image with transparency, anti-aliasing, and no
    /// drop shadow that uses a mask to define its shape. For design guidance, see
    /// Human Interface Guidelines > macOS > Custom Icons. If no icon is specified,
    /// a default icon is used.
    ///
    /// ## Availability
    /// * macOS 10.14+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(
        rename = "NSExtensionServiceTouchBarIconName",
        skip_serializing_if = "Option::is_none"
    )]
    pub touch_bar_icon_name: Option<String>,
    /// A name for display when the extension appears as a Quick Action in the Touch Bar.
    ///
    /// This key is used in conjunction with the NSExtensionServiceAllowsTouchBarItem key.
    ///
    /// If the NSExtensionServiceTouchBarLabel key isn't provided, the extension's display
    /// name is used.
    ///
    /// ## Availability
    /// * macOS 10.14+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(
        rename = "NSExtensionServiceTouchBarLabel",
        skip_serializing_if = "Option::is_none"
    )]
    pub touch_bar_label: Option<String>,
    /// A Boolean value indicating whether the Action extension is presented in full
    /// screen.
    ///
    /// ## Availability
    /// * iOS 8.0+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionActionWantsFullScreenPresentation",
        skip_serializing_if = "Option::is_none"
    )]
    pub action_wants_full_screen_presentation: Option<bool>,
    /// This key is mutually exclusive with NSExtensionPrincipalClass. If the app
    /// extension’s Info.plist file contains both keys, the system won’t load the
    /// extension.
    ///
    /// ## Availability
    /// * iOS 8.0+
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionMainStoryboard",
        skip_serializing_if = "Option::is_none"
    )]
    pub main_storyboard: Option<String>,
    /// A Boolean value indicating whether the app extension ignores appearance changes
    /// made by the host app.
    ///
    /// ## Availability
    /// * iOS 10.0+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionOverridesHostUIAppearance",
        skip_serializing_if = "Option::is_none"
    )]
    pub overrides_host_ui_appearance: Option<bool>,
    /// The extension point that supports an app extension.
    ///
    /// ## Availability
    /// * iOS 8.0+
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionPointIdentifier",
        skip_serializing_if = "Option::is_none",
        serialize_with = "serialize_enum_option"
    )]
    pub point_identifier: Option<ExtensionPointIdentifier>,
    /// This key is mutually exclusive with NSExtensionMainStoryboard. If the app
    /// extension’s Info.plist file contains both keys, the system won’t load the
    /// extension.
    ///
    /// ## Availability
    /// * iOS 8.0+
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionPrincipalClass",
        skip_serializing_if = "Option::is_none"
    )]
    pub principal_class: Option<String>,
    /// The semantic data types that a Share or Action extension supports.
    ///
    /// ## Availability
    /// * iOS 8.0+
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionActivationRule",
        skip_serializing_if = "Option::is_none"
    )]
    pub activation_rule: Option<ActivationRule>,
    /// The name of a JavaScript file supplied by a Share or Action extension.
    ///
    /// ## Availability
    /// * iOS 8.0+
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionJavaScriptPreprocessingFile",
        skip_serializing_if = "Option::is_none"
    )]
    pub java_script_preprocessing_file: Option<String>,
    /// The names of the intents that an extension supports.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(rename = "IntentsSupported", skip_serializing_if = "Option::is_none")]
    pub intents_supported: Option<Vec<String>>,
    /// Types of media supported by an app extension’s media-playing intents.
    ///
    /// Specify one or more media categories to allow Siri to invoke your app’s intent
    /// handling when a user asks to play media. Use INMediaCategoryGeneral for media
    /// that doesn’t fit into any of the other categories, like white noise or sound
    /// effects.
    ///
    /// To specify this information in Xcode, add INPlayMediaIntent to your extension’s
    /// list of Supported Intents. Then select the relevant media types in the list
    /// that appears.
    ///
    /// ## Availability
    /// * iOS 13.0+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "SupportedMediaCategories",
        skip_serializing_if = "Option::is_none"
    )]
    pub supported_media_categories: Option<Vec<MediaCategories>>,
    /// A Boolean value indicating whether the Photos app gets a list of supported project
    /// types from an extension.
    ///
    /// ## Availability
    /// * macOS 10.14+
    ///
    /// ## Framework
    /// * Photos
    #[serde(
        rename = "PHProjectExtensionDefinesProjectTypes",
        skip_serializing_if = "Option::is_none"
    )]
    pub project_extension_defines_project_types: Option<bool>,
    /// The types of assets a Photo Editing extension can edit.
    ///
    /// ## Availability
    /// * iOS 8.0+
    ///
    /// ## Framework
    /// * Photos
    #[serde(
        rename = "PHSupportedMediaTypes",
        skip_serializing_if = "Option::is_none"
    )]
    pub supported_media_types: Option<Vec<MediaTypes>>,
    /// The server that a Message Filter app extension may defer a query to.
    ///
    /// ## Availability
    /// * iOS 11.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "IDMessageFilterExtensionNetworkURL",
        skip_serializing_if = "Option::is_none"
    )]
    pub id_message_filter_extension_network_url: Option<String>,
    /// The phone number that receives SMS messages when the user reports an SMS message
    /// or a call.
    ///
    /// ## Availability
    /// * iOS 12.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "ILClassificationExtensionSMSReportDestination",
        skip_serializing_if = "Option::is_none"
    )]
    pub classification_extension_sms_report_destination: Option<String>,
    /// A Boolean value indicating whether a custom keyboard displays standard ASCII
    /// characters.
    ///
    /// ## Availability
    /// * iOS 8.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(rename = "IsASCIICapable", skip_serializing_if = "Option::is_none")]
    pub is_ascii_capable: Option<String>,
    /// The contexts that an iMessage app or sticker pack supports.
    ///
    /// ## Availability
    /// * iOS 12.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "MSMessagesAppPresentationContextMessages",
        skip_serializing_if = "Option::is_none"
    )]
    pub messages_app_presentation_context_messages: Option<Vec<ContextMessages>>,
    /// The custom actions for a File Provider extension.
    ///
    /// ## Availability
    /// * iOS 11.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "NSExtensionFileProviderActions",
        skip_serializing_if = "Option::is_none"
    )]
    pub file_provider_actions: Option<Vec<FileProviderAction>>,
    /// The identifier of a shared container that can be accessed by a Document Picker
    /// extension and its associated File Provider extension.
    ///
    /// ## Availability
    /// * iOS 8.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "NSExtensionFileProviderDocumentGroup",
        skip_serializing_if = "Option::is_none"
    )]
    pub file_provider_document_group: Option<String>,
    /// A Boolean value indicating whether a File Provider extension enumerates its
    /// content.
    ///
    /// ## Availability
    /// * iOS 11.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "NSExtensionFileProviderSupportsEnumeration",
        skip_serializing_if = "Option::is_none"
    )]
    pub file_provider_supports_enumeration: Option<bool>,
    /// A Boolean value indicating whether a keyboard extension supports right-to-left
    /// languages.
    ///
    /// ## Availability
    /// * iOS 8.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(rename = "PrefersRightToLeft", skip_serializing_if = "Option::is_none")]
    pub prefers_right_to_left: Option<bool>,
    /// The primary language for a keyboard extension.
    ///
    /// ## Availability
    /// * iOS 8.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(rename = "PrimaryLanguage", skip_serializing_if = "Option::is_none")]
    pub primary_language: Option<String>,
    /// A Boolean value indicating whether a custom keyboard uses a shared container and
    /// accesses the network.
    ///
    /// ## Availability
    /// * iOS 8.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(rename = "RequestsOpenAccess", skip_serializing_if = "Option::is_none")]
    pub requests_open_access: Option<bool>,
    /// The modes that a Document Picker extension supports.
    ///
    /// ## Availability
    /// * iOS 8.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "UIDocumentPickerModes",
        skip_serializing_if = "Option::is_none",
        serialize_with = "serialize_vec_enum_option"
    )]
    pub document_picker_modes: Option<Vec<DocumentPickerModes>>,
    /// The Uniform Type Identifiers that a document picker extension supports.
    ///
    /// ## Availability
    /// * iOS 8.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "UIDocumentPickerSupportedFileTypes",
        skip_serializing_if = "Option::is_none"
    )]
    pub document_picker_supported_file_types: Option<Vec<String>>,
    /// The identifier of a category declared by the app extension.
    ///
    /// ## Availability
    /// * iOS 10.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "UNNotificationExtensionCategory",
        skip_serializing_if = "Option::is_none"
    )]
    pub notification_extension_category: Option<String>,
    /// A Boolean value indicating whether only the app extension's custom view controller
    /// is displayed in the notification interface.
    ///
    /// ## Availability
    /// * iOS 10.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "UNNotificationExtensionDefaultContentHidden",
        skip_serializing_if = "Option::is_none"
    )]
    pub notification_extension_default_content_hidden: Option<bool>,
    /// The initial size of the view controller's view for an app extension, expressed as
    /// a ratio of its height to its width.
    ///
    /// ## Availability
    /// * iOS 10.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "UNNotificationExtensionInitialContentSizeRatio",
        skip_serializing_if = "Option::is_none"
    )]
    pub notification_extension_initial_content_size_ratio: Option<f32>,
    /// A Boolean value indicating whether the title of the app extension's view
    /// controller is used as the title of the notification.
    ///
    /// ## Availability
    /// * iOS 10.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "UNNotificationExtensionOverridesDefaultTitle",
        skip_serializing_if = "Option::is_none"
    )]
    pub notification_extension_overrides_default_title: Option<bool>,
    /// A Boolean value indicating whether user interactions in a custom notification are
    /// enabled.
    ///
    /// ## Availability
    /// * iOS 12.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "UNNotificationExtensionUserInteractionEnabled",
        skip_serializing_if = "Option::is_none"
    )]
    pub notification_extension_user_interaction_enabled: Option<bool>,
}

/// Document Picker Modes
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
pub enum DocumentPickerModes {
    #[serde(rename = "UIDocumentPickerModeImport")]
    Import,
    #[serde(rename = "UIDocumentPickerModeOpen")]
    Open,
    #[serde(rename = "UIDocumentPickerModeExportToService")]
    ExportToService,
    #[serde(rename = "UIDocumentPickerModeMoveToService")]
    MoveToService,
}

/// File Provider Action
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct FileProviderAction {
    /// A predicate that determines whether a File Provider extension action appears in
    /// the context menu.
    ///
    /// ## Availability
    /// * iOS 11.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "NSExtensionFileProviderActionActivationRule",
        skip_serializing_if = "Option::is_none"
    )]
    pub activation_rule: Option<String>,
    /// A unique identifier for a File Provider extension action.
    ///
    /// ## Availability
    /// * iOS 11.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "NSExtensionFileProviderActionIdentifier",
        skip_serializing_if = "Option::is_none"
    )]
    pub identifier: Option<String>,
    /// The localized name for a File Provider extension action that appears in the
    /// context menu.
    ///
    /// ## Availability
    /// * iOS 11.0+
    ///
    /// ## Framework
    /// * UIKit
    #[serde(
        rename = "NSExtensionFileProviderActionName",
        skip_serializing_if = "Option::is_none"
    )]
    pub name: Option<String>,
}

/// Context Messages
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
pub enum ContextMessages {
    #[serde(rename = "MSMessagesAppPresentationContextMessages")]
    Messages,
    #[serde(rename = "MSMessagesAppPresentationContextMedia")]
    Media,
}

/// Media Types
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
pub enum MediaTypes {
    #[serde(rename = "Image")]
    Image,
    #[serde(rename = "Video")]
    Video,
}

/// Media Categories
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
pub enum MediaCategories {
    #[serde(rename = "INMediaCategoryAudiobooks")]
    Audiobooks,
    #[serde(rename = "INMediaCategoryMusic")]
    Music,
    #[serde(rename = "INMediaCategoryGeneral")]
    General,
    #[serde(rename = "INMediaCategoryPodcasts")]
    Podcasts,
    #[serde(rename = "INMediaCategoryRadio")]
    Radio,
}

/// Activation Rule
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct ActivationRule {
    /// The version of the parent extension-activation rule dictionary.
    ///
    /// ## Availability
    /// * iOS 9.0+
    /// * macOS 10.11+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionActivationDictionaryVersion",
        skip_serializing_if = "Option::is_none"
    )]
    pub dictionary_version: Option<i32>,
    /// The maximum number of attachments that the app extension supports.
    ///
    /// ## Availability
    /// * iOS 8.0+
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionActivationSupportsAttachmentsWithMaxCount",
        skip_serializing_if = "Option::is_none"
    )]
    pub supports_attachments_with_max_count: Option<i32>,
    /// The minimum number of attachments that the app extension supports.
    ///
    /// ## Availability
    /// * iOS 8.0+
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionActivationSupportsAttachmentsWithMinCount",
        skip_serializing_if = "Option::is_none"
    )]
    pub supports_attachments_with_min_count: Option<i32>,
    /// The maximum number of all types of files that the app extension supports.
    ///
    /// ## Availability
    /// * iOS 8.0+
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionActivationSupportsFileWithMaxCount",
        skip_serializing_if = "Option::is_none"
    )]
    pub supports_file_with_max_count: Option<i32>,
    /// The maximum number of image files that the app extension supports.
    ///
    /// ## Availability
    /// * iOS 8.0+
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionActivationSupportsImageWithMaxCount",
        skip_serializing_if = "Option::is_none"
    )]
    pub supports_image_with_max_count: Option<i32>,
    /// The maximum number of movie files that the app extension supports.
    ///
    /// ## Availability
    /// * iOS 8.0+
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionActivationSupportsMovieWithMaxCount",
        skip_serializing_if = "Option::is_none"
    )]
    pub supports_movie_with_max_count: Option<i32>,
    /// A Boolean value indicating whether the app extension supports text.
    ///
    /// ## Availability
    /// * iOS 8.0+
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionActivationSupportsText",
        skip_serializing_if = "Option::is_none"
    )]
    pub supports_text: Option<bool>,
    /// The maximum number of webpages that the app extension supports.
    ///
    /// ## Availability
    /// * iOS 8.0+
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionActivationSupportsWebPageWithMaxCount",
        skip_serializing_if = "Option::is_none"
    )]
    pub supports_web_page_with_max_count: Option<i32>,
    /// The maximum number of HTTP URLs that the app extension supports.
    ///
    /// ## Availability
    /// * iOS 8.0+
    /// * macOS 10.10+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionActivationSupportsWebURLWithMaxCount",
        skip_serializing_if = "Option::is_none"
    )]
    pub supports_web_url_with_max_count: Option<i32>,
    /// A Boolean value indicating whether strict or fuzzy matching is used when
    /// determining the asset types an app extension handles.
    ///
    /// ## Availability
    /// * iOS 9.0+
    /// * macOS 10.11+
    ///
    /// ## Framework
    /// * Foundation
    #[serde(
        rename = "NSExtensionActivationUsesStrictMatching",
        skip_serializing_if = "Option::is_none"
    )]
    pub uses_strict_matching: Option<bool>,
}

/// Extension Service Role Type
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
pub enum ExtensionServiceRoleType {
    #[serde(rename = "Editor")]
    Editor,
    #[serde(rename = "Viewer")]
    Viewer,
}

/// Service
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct Service {
    /// A keyboard shortcut that invokes the service menu command.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(rename = "NSKeyEquivalent", skip_serializing_if = "Option::is_none")]
    pub key_equivalent: Option<DefaultDictionary>,
    /// Text for a Services menu item.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(rename = "NSMenuItem")]
    pub menu_item: DefaultDictionary,
    /// An instance method that invokes the service.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(rename = "NSMessage")]
    pub message: String,
    /// The port that the service monitors for incoming requests.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(rename = "NSPortName", skip_serializing_if = "Option::is_none")]
    pub port_name: Option<String>,
    /// The data types that the service returns.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(rename = "NSReturnTypes", skip_serializing_if = "Option::is_none")]
    pub return_types: Option<Vec<String>>,
    /// The data types that the service can read.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(rename = "NSSendTypes", skip_serializing_if = "Option::is_none")]
    pub send_types: Option<Vec<String>>,
    /// The amount of time, in milliseconds, that the system waits for a response from the
    /// service.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(rename = "NSTimeout", skip_serializing_if = "Option::is_none")]
    pub timeout: Option<String>,
    /// A service-specific string value.
    ///
    /// ## Availability
    /// * macOS 10.0+
    ///
    /// ## Framework
    /// * AppKit
    #[serde(rename = "NSUserData", skip_serializing_if = "Option::is_none")]
    pub user_data: Option<BTreeMap<String, String>>,
}

/// Default Dictionary
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)]
pub struct DefaultDictionary {
    pub default: String,
}

/// Complication Supported Families
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
pub enum ComplicationSupportedFamilies {
    #[serde(rename = "CLKComplicationFamilyModularSmall")]
    ModularSmall,
    #[serde(rename = "CLKComplicationFamilyModularLarge")]
    ModularLarge,
    #[serde(rename = "CLKComplicationFamilyUtilitarianSmall")]
    UtilitarianSmall,
    #[serde(rename = "CLKComplicationFamilyUtilitarianSmallFlat")]
    UtilitarianSmallFlat,
    #[serde(rename = "CLKComplicationFamilyUtilitarianLarge")]
    UtilitarianLarge,
    #[serde(rename = "CLKComplicationFamilyCircularSmall")]
    CircularSmall,
    #[serde(rename = "CLKComplicationFamilyExtraLarge")]
    ExtraLarge,
    #[serde(rename = "CLKComplicationFamilyGraphicCorner")]
    GraphicCorner,
    #[serde(rename = "CLKComplicationFamilyGraphicBezel")]
    GraphicBezel,
    #[serde(rename = "CLKComplicationFamilyGraphicCircular")]
    GraphicCircular,
    #[serde(rename = "CLKComplicationFamilyGraphicRectangular")]
    GraphicRectangular,
}

/// Architecture Priority
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
pub enum ArchitecturePriority {
    /// The 32-bit Intel architecture.
    #[serde(rename = "i386")]
    I386,
    /// The 64-bit Intel architecture.
    #[serde(rename = "x86_64")]
    X86_64,
    /// The 64-bit ARM architecture.
    #[serde(rename = "arm64")]
    Arm64,
    /// The 64-bit ARM architecture with pointer authentication code support.
    #[serde(rename = "arm64e")]
    Arm64e,
}

/// Device Capabilities
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
pub enum DeviceCapabilities {
    /// The presence of accelerometers. Use the Core Motion framework to receive
    /// accelerometer events. You don’t need to include this value if your app detects
    /// only device orientation changes. Available in iOS 3.0 and later.
    #[serde(rename = "accelerometer")]
    Accelerometer,
    /// Support for ARKit. Available in iOS 11.0 and later.
    #[serde(rename = "arkit")]
    Arkit,
    /// Compilation for the armv7 instruction set, or as a 32/64-bit universal app.
    /// Available in iOS 3.1 and later.
    #[serde(rename = "armv7")]
    Armv7,
    /// Compilation for the arm64 instruction set. Include this key for all 64-bit apps
    /// and embedded bundles, like extensions and frameworks. Available in iOS 8.0 and
    /// later.
    #[serde(rename = "arm64")]
    Arm64,
    /// Autofocus capabilities in the device’s still camera. You might need to include
    /// this value if your app supports macro photography or requires sharper images
    /// to perform certain image-processing tasks. Available in iOS 3.0 and later.
    #[serde(rename = "auto-focus-camera")]
    AutoFocusCamera,
    /// Bluetooth low-energy hardware. Available in iOS 5.0 and later.
    #[serde(rename = "bluetooth-le")]
    BluetoothLe,
    /// A camera flash. Use the cameraFlashMode property of a UIImagePickerController
    /// instance to control the camera’s flash. Available in iOS 3.0 and later.
    #[serde(rename = "camera-flash")]
    CameraFlash,
    /// A forward-facing camera. Use the cameraDevice property of a
    /// UIImagePickerController instance to select the device’s camera. Available in
    /// iOS 3.0 and later.
    #[serde(rename = "front-facing-camera")]
    FrontFacingCamera,
    /// Access to the Game Center service. Enable the Game Center capability in Xcode to
    /// add this value to your app. Available in iOS 4.1 and later.
    #[serde(rename = "gamekit")]
    Gamekit,
    /// GPS (or AGPS) hardware for tracking locations. If you include this value, you
    /// should also include the location-services value. Require GPS only if your app
    /// needs location data more accurate than the cellular or Wi-Fi radios provide.
    /// Available in iOS 3.0 and later.
    #[serde(rename = "gps")]
    Gps,
    /// A gyroscope. Use the Core Motion framework to retrieve information from gyroscope
    /// hardware. Available in iOS 3.0 and later.
    #[serde(rename = "gyroscope")]
    Gyroscope,
    /// Support for HealthKit. Available in iOS 8.0 and later.
    #[serde(rename = "healthkit")]
    Healthkit,
    /// Performance and capabilities of the A12 Bionic and later chips. Available in iOS
    /// 12.0 and later.
    #[serde(rename = "iphone-ipad-minimum-performance-a12")]
    IphoneIpadMinimumPerformanceA12,
    /// Access to the device’s current location using the Core Location framework. This
    /// value refers to the general location services feature. If you specifically
    /// need GPS-level accuracy, also include the gps feature. Available in iOS 3.0 and
    /// later.
    #[serde(rename = "location-services")]
    LocationServices,
    /// Magnetometer hardware. Apps use this hardware to receive heading-related events
    /// through the Core Location framework. Available in iOS 3.0 and later.
    #[serde(rename = "magnetometer")]
    Magnetometer,
    // Support for graphics processing with Metal. Available in iOS 8.0 and later.
    #[serde(rename = "metal")]
    Metal,
    /// The built-in microphone or accessories that provide a microphone. Available in iOS
    /// 3.0 and later.
    #[serde(rename = "microphone")]
    Microphone,
    /// Near Field Communication (NFC) tag detection and access to messages that contain
    /// NFC Data Exchange Format data. Use the Core NFC framework to detect and read
    /// NFC tags. Available in iOS 11.0 and later.
    #[serde(rename = "nfc")]
    Nfc,
    /// The OpenGL ES 1.1 interface. Available in iOS 3.0 and later.
    #[serde(rename = "opengles-1")]
    Opengles1,
    /// The OpenGL ES 2.0 interface. Available in iOS 3.0 and later.
    #[serde(rename = "opengles-2")]
    Opengles2,
    /// The OpenGL ES 3.0 interface. Available in iOS 7.0 and later.
    #[serde(rename = "opengles-2")]
    Opengles3,
    /// Peer-to-peer connectivity over a Bluetooth network. Available in iOS 3.1 and
    /// later.
    #[serde(rename = "peer-peer")]
    PeerPeer,
    /// The Messages app. You might require this feature if your app opens URLs with the
    /// sms scheme. Available in iOS 3.0 and later.
    #[serde(rename = "sms")]
    Sms,
    /// A camera on the device. Use the UIImagePickerController interface to capture
    /// images from the device’s still camera. Available in iOS 3.0 and later.
    #[serde(rename = "still-camera")]
    StillCamera,
    /// The Phone app. You might require this feature if your app opens URLs with the tel
    /// scheme. Available in iOS 3.0 and later.
    #[serde(rename = "telephony")]
    Telephony,
    /// A camera with video capabilities on the device. Use the UIImagePickerController
    /// interface to capture video from the device’s camera. Available in iOS 3.0 and
    /// later.
    #[serde(rename = "video-camera")]
    VideoCamera,
    /// Networking features related to Wi-Fi access. Available in iOS 3.0 and later.
    #[serde(rename = "wifi")]
    Wifi,
}