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

/// Supportive module holding the ProductBatch struct used in some of the VF structs
pub mod dfc {
    use super::*;

    mod product_batch {
        use super::*;

        /// A lot or batch, defining a resource produced at the same time in the same way. From DataFoodConsortium vocabulary https://datafoodconsortium.gitbook.io/dfc-standard-documentation/.
        ///
        /// ID: http://www.virtual-assembly.org/DataFoodConsortium/BusinessOntology#ProductBatch
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct ProductBatch {
            batch_number: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            expiry_date: Option<DateTime<Utc>>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            production_date: Option<DateTime<Utc>>,
        }

        impl ProductBatch {
            /// Create an empty builder object for ProductBatch
            #[allow(dead_code)]
            pub fn builder() -> ProductBatchBuilder {
                // We avoid using ProductBatchBuilder::default() here because it requires all our generics to derive Default =[
                ProductBatchBuilder {
                    batch_number: None,
                    expiry_date: None,
                    production_date: None,
                }
            }

            /// Turns ProductBatch into ProductBatchBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> ProductBatchBuilder {
                let ProductBatch { batch_number, expiry_date, production_date } = self;
                let mut builder = Self::builder();
                builder = builder.batch_number(batch_number);
                builder = match expiry_date { Some(x) => builder.expiry_date(x), None => builder };
                builder = match production_date { Some(x) => builder.production_date(x), None => builder };
                builder
            }
        }
    }
    pub use product_batch::ProductBatch;

    /// Holds the supporting builder structs for our dfc types. Create a builder via `SomeType::builder()`.
    pub mod builders {
        pub use super::product_batch::ProductBatchBuilder;
    }
}

/// Supportive module containing SpatialThing used in various VF structs
pub mod geo {
    use super::*;

    mod spatial_thing {
        use super::*;

        /// A mappable location.
        ///
        /// ID: http://www.w3.org/2003/01/geo/wgs84_pos#SpatialThing
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct SpatialThing {
            /// The WGS84 altitude of a SpatialThing (decimal meters above the local reference ellipsoid).
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            alt: Option<f64>,
            /// The WGS84 latitude of a SpatialThing (decimal degrees).
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            lat: Option<f64>,
            /// The WGS84 longitude of a SpatialThing (decimal degrees).
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            long: Option<f64>,
            /// A textual address that can be mapped using mapping software.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            mappable_address: Option<String>,
            /// An informal or formal textual identifier for an object. Does not imply uniqueness.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            name: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
        }

        impl SpatialThing {
            /// Create an empty builder object for SpatialThing
            #[allow(dead_code)]
            pub fn builder() -> SpatialThingBuilder {
                // We avoid using SpatialThingBuilder::default() here because it requires all our generics to derive Default =[
                SpatialThingBuilder {
                    alt: None,
                    lat: None,
                    long: None,
                    mappable_address: None,
                    name: None,
                    note: None,
                }
            }

            /// Turns SpatialThing into SpatialThingBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> SpatialThingBuilder {
                let SpatialThing { alt, lat, long, mappable_address, name, note } = self;
                let mut builder = Self::builder();
                builder = match alt { Some(x) => builder.alt(x), None => builder };
                builder = match lat { Some(x) => builder.lat(x), None => builder };
                builder = match long { Some(x) => builder.long(x), None => builder };
                builder = match mappable_address { Some(x) => builder.mappable_address(x), None => builder };
                builder = match name { Some(x) => builder.name(x), None => builder };
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder
            }
        }
    }
    pub use spatial_thing::SpatialThing;

    /// Holds the supporting builder structs for our geo types. Create a builder via `SomeType::builder()`.
    pub mod builders {
        pub use super::spatial_thing::SpatialThingBuilder;
    }
}

/// The main ValueFlows module which holds the VF classes.
/// 
/// This contains the `Agent` struct even through technically `Agent` is defined in the `foaf:` namespace in the schema.
pub mod vf {
    use super::*;

    /// An enum that allows a type union for (Commitment, EconomicEvent)
    #[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
    pub enum CommitmentEconomicEventUnion<COMMITMENT, ECONOMICEVENT> {
        Commitment(COMMITMENT),
        EconomicEvent(ECONOMICEVENT),
    }

    /// An action verb defining the kind of flow and its behavior.
    ///
    /// ID: https://w3id.org/valueflows#Action
    #[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
    pub enum Action {
        /// In processes like repair or modification or testing, the same resource will appear in the output.
        #[serde(rename = "accept")]
        Accept,
        /// For example a design file, neither used nor consumed, the file remains available at all times.
        #[serde(rename = "cite")]
        Cite,
        /// For example an ingredient or component composed into the output, after the process the ingredient is gone.
        #[serde(rename = "consume")]
        Consume,
        /// New service produced and delivered (a service implies that an agent actively receives the service).
        #[serde(rename = "deliver-service")]
        DeliverService,
        /// Transported resource or person leaves the process; the same resource or person appeared in the input.
        #[serde(rename = "dropoff")]
        Dropoff,
        /// Adjusts a quantity down based on a beginning balance or inventory count.
        #[serde(rename = "lower")]
        Lower,
        /// In processes like repair or modification, the same resource will appear in the input.
        #[serde(rename = "modify")]
        Modify,
        /// Change location and possibly identifier, if location is part of the identification, of a resource with no change of agent rights or possession.
        #[serde(rename = "move")]
        Move,
        /// Transported resource or person enters the process; the same resource will appear in the output.
        #[serde(rename = "pickup")]
        Pickup,
        /// New resource was created in that process or an existing stock resource was added to.
        #[serde(rename = "produce")]
        Produce,
        /// Adjusts a quantity up based on a beginning balance or inventory count.
        #[serde(rename = "raise")]
        Raise,
        /// Give full rights and responsibilities plus physical custody.
        #[serde(rename = "transfer")]
        Transfer,
        /// Give full (in the human realm) rights and responsibilities to another agent, without transferring physical custody.
        #[serde(rename = "transfer-all-rights")]
        TransferAllRights,
        /// Give physical custody and control of a resource, without full accounting or ownership rights.
        #[serde(rename = "transfer-custody")]
        TransferCustody,
        /// For example a tool used in process; after the process, the tool still exists.
        #[serde(rename = "use")]
        Use,
        /// Labor power applied to a process.
        #[serde(rename = "work")]
        Work,
    }

    impl Action {
        #[allow(dead_code)]
        pub fn input_output(&self) -> Option<InputOutput> {
            match self {
                Self::Accept => Some(InputOutput::Input),
                Self::Cite => Some(InputOutput::Input),
                Self::Consume => Some(InputOutput::Input),
                Self::DeliverService => Some(InputOutput::Output),
                Self::Dropoff => Some(InputOutput::Output),
                Self::Modify => Some(InputOutput::Output),
                Self::Pickup => Some(InputOutput::Input),
                Self::Produce => Some(InputOutput::Output),
                Self::Use => Some(InputOutput::Input),
                Self::Work => Some(InputOutput::Input),
                _ => None,
            }
        }

        #[allow(dead_code)]
        pub fn pairs_with(&self) -> Option<Action> {
            match self {
                Self::Accept => Some(Action::Modify),
                Self::Dropoff => Some(Action::Pickup),
                Self::Modify => Some(Action::Accept),
                Self::Pickup => Some(Action::Dropoff),
                _ => None,
            }
        }

        #[allow(dead_code)]
        pub fn resource_effect(&self) -> ResourceEffect {
            match self {
                Self::Accept => ResourceEffect::NoEffect,
                Self::Cite => ResourceEffect::NoEffect,
                Self::Consume => ResourceEffect::Decrement,
                Self::DeliverService => ResourceEffect::NoEffect,
                Self::Dropoff => ResourceEffect::NoEffect,
                Self::Lower => ResourceEffect::Decrement,
                Self::Modify => ResourceEffect::NoEffect,
                Self::Move => ResourceEffect::DecrementIncrement,
                Self::Pickup => ResourceEffect::NoEffect,
                Self::Produce => ResourceEffect::Increment,
                Self::Raise => ResourceEffect::Increment,
                Self::Transfer => ResourceEffect::DecrementIncrement,
                Self::TransferAllRights => ResourceEffect::DecrementIncrement,
                Self::TransferCustody => ResourceEffect::DecrementIncrement,
                Self::Use => ResourceEffect::NoEffect,
                Self::Work => ResourceEffect::NoEffect,
            }
        }

    }

    mod agent {
        use super::*;

        /// A person or group or organization with economic agency.
        ///
        /// ID: http://xmlns.com/foaf/0.1/Agent
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct Agent {
            /// The uri to an image relevant to the entity, such as a logo, avatar, photo, diagram, etc.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            image: Option<Url>,
            /// An informal or formal textual identifier for an object. Does not imply uniqueness.
            name: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
            /// The main place an agent is located, often an address where activities occur and mail can be sent. This is usually a mappable geographic location.  It also could be a website address, as in the case of agents who have no physical location.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            primary_location: Option<geo::SpatialThing>,
        }

        impl Agent {
            /// Create an empty builder object for Agent
            #[allow(dead_code)]
            pub fn builder() -> AgentBuilder {
                // We avoid using AgentBuilder::default() here because it requires all our generics to derive Default =[
                AgentBuilder {
                    image: None,
                    name: None,
                    note: None,
                    primary_location: None,
                }
            }

            /// Turns Agent into AgentBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> AgentBuilder {
                let Agent { image, name, note, primary_location } = self;
                let mut builder = Self::builder();
                builder = match image { Some(x) => builder.image(x), None => builder };
                builder = builder.name(name);
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder = match primary_location { Some(x) => builder.primary_location(x), None => builder };
                builder
            }
        }
    }
    pub use agent::Agent;

    mod agent_relationship {
        use super::*;

        /// An ongoing voluntary association between 2 agents of any kind.
        ///
        /// ID: https://w3id.org/valueflows#AgentRelationship
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct AgentRelationship<AGENT, AGENTRELATIONSHIPROLE> {
            /// Grouping around something to create a boundary or context, used for documenting, accounting, planning.
            #[builder(default)]
            in_scope_of: Vec<Url>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
            /// The object of a relationship between 2 agents.  For example, if Mary is a member of a group, then the group is the object.
            object: AGENT,
            /// The role of an economic relationship that exists between 2 agents, such as member, trading partner.
            relationship: AGENTRELATIONSHIPROLE,
            /// The subject of a relationship between 2 agents.  For example, if Mary is a member of a group, then Mary is the subject.
            subject: AGENT,
        }

        impl<AGENT, AGENTRELATIONSHIPROLE> AgentRelationship<AGENT, AGENTRELATIONSHIPROLE> {
            /// Create an empty builder object for AgentRelationship
            #[allow(dead_code)]
            pub fn builder() -> AgentRelationshipBuilder<AGENT, AGENTRELATIONSHIPROLE> {
                // We avoid using AgentRelationshipBuilder::default() here because it requires all our generics to derive Default =[
                AgentRelationshipBuilder {
                    in_scope_of: None,
                    note: None,
                    object: None,
                    relationship: None,
                    subject: None,
                }
            }

            /// Turns AgentRelationship into AgentRelationshipBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> AgentRelationshipBuilder<AGENT, AGENTRELATIONSHIPROLE> {
                let AgentRelationship { in_scope_of, note, object, relationship, subject } = self;
                let mut builder = Self::builder();
                builder = builder.in_scope_of(in_scope_of);
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder = builder.object(object);
                builder = builder.relationship(relationship);
                builder = builder.subject(subject);
                builder
            }
        }
    }
    pub use agent_relationship::AgentRelationship;

    mod agent_relationship_role {
        use super::*;

        /// A relationship role defining the kind of association one agent can have with another.
        ///
        /// ID: https://w3id.org/valueflows#AgentRelationshipRole
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct AgentRelationshipRole {
            /// The human readable name of the role, inverse from the object to the subject. For example, 'has member'.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            inverse_role_label: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
            /// The human readable name of the role, inverse from the object to the subject. For example, 'is member of'.
            role_label: String,
        }

        impl AgentRelationshipRole {
            /// Create an empty builder object for AgentRelationshipRole
            #[allow(dead_code)]
            pub fn builder() -> AgentRelationshipRoleBuilder {
                // We avoid using AgentRelationshipRoleBuilder::default() here because it requires all our generics to derive Default =[
                AgentRelationshipRoleBuilder {
                    inverse_role_label: None,
                    note: None,
                    role_label: None,
                }
            }

            /// Turns AgentRelationshipRole into AgentRelationshipRoleBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> AgentRelationshipRoleBuilder {
                let AgentRelationshipRole { inverse_role_label, note, role_label } = self;
                let mut builder = Self::builder();
                builder = match inverse_role_label { Some(x) => builder.inverse_role_label(x), None => builder };
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder = builder.role_label(role_label);
                builder
            }
        }
    }
    pub use agent_relationship_role::AgentRelationshipRole;

    mod agreement {
        use super::*;

        /// Any type of agreement among economic agents.
        ///
        /// ID: https://w3id.org/valueflows#Agreement
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct Agreement {
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            created: Option<DateTime<Utc>>,
            /// An informal or formal textual identifier for an object. Does not imply uniqueness.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            name: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
        }

        impl Agreement {
            /// Create an empty builder object for Agreement
            #[allow(dead_code)]
            pub fn builder() -> AgreementBuilder {
                // We avoid using AgreementBuilder::default() here because it requires all our generics to derive Default =[
                AgreementBuilder {
                    created: None,
                    name: None,
                    note: None,
                }
            }

            /// Turns Agreement into AgreementBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> AgreementBuilder {
                let Agreement { created, name, note } = self;
                let mut builder = Self::builder();
                builder = match created { Some(x) => builder.created(x), None => builder };
                builder = match name { Some(x) => builder.name(x), None => builder };
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder
            }
        }
    }
    pub use agreement::Agreement;

    mod appreciation {
        use super::*;

        /// A way to tie an economic event that is given in loose fulfilment for another economic event, without commitments or expectations. Supports the gift economy.
        ///
        /// ID: https://w3id.org/valueflows#Appreciation
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct Appreciation<ECONOMICEVENT> {
            /// The economic event being appreciated (gift economy).
            appreciation_of: ECONOMICEVENT,
            /// The economic event implemented in appreciation (gift economy).
            appreciation_with: ECONOMICEVENT,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
        }

        impl<ECONOMICEVENT> Appreciation<ECONOMICEVENT> {
            /// Create an empty builder object for Appreciation
            #[allow(dead_code)]
            pub fn builder() -> AppreciationBuilder<ECONOMICEVENT> {
                // We avoid using AppreciationBuilder::default() here because it requires all our generics to derive Default =[
                AppreciationBuilder {
                    appreciation_of: None,
                    appreciation_with: None,
                    note: None,
                }
            }

            /// Turns Appreciation into AppreciationBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> AppreciationBuilder<ECONOMICEVENT> {
                let Appreciation { appreciation_of, appreciation_with, note } = self;
                let mut builder = Self::builder();
                builder = builder.appreciation_of(appreciation_of);
                builder = builder.appreciation_with(appreciation_with);
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder
            }
        }
    }
    pub use appreciation::Appreciation;

    mod claim {
        use super::*;

        /// A claim for a future economic event(s) in reciprocity for an economic event that already occurred. For example, a claim for payment for goods received.
        ///
        /// ID: https://w3id.org/valueflows#Claim
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct Claim<AGENT, RESOURCESPECIFICATION, ECONOMICEVENT> {
            /// Defines the kind of flow, such as consume, produce, work, transfer, etc.
            action: Action,
            /// Reference to an agreement between agents which specifies the rules, terms, policies, calculations, etc. which govern this flow.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            agreed_in: Option<Url>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            created: Option<DateTime<Utc>>,
            /// The time something is expected to be complete.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            due: Option<DateTime<Utc>>,
            /// The amount and unit of the work or use or citation effort-based action. This is often a time duration, but also could be cycle counts or other measures of effort or usefulness.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            effort_quantity: Option<om2::Measure>,
            /// The commitment or intent or process is complete or not.  This is irrespective of if the original goal has been met, and indicates that no more will be done.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            finished: Option<bool>,
            /// Grouping around something to create a boundary or context, used for documenting, accounting, planning.
            #[builder(default)]
            in_scope_of: Vec<Url>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
            /// The economic agent from whom the intended, committed, or actual economic event is initiated.
            provider: AGENT,
            /// The economic agent whom the intended, committed, or actual economic event is for.
            receiver: AGENT,
            /// References a concept in a common taxonomy or other classification scheme for purposes of categorization or grouping.
            #[builder(default)]
            resource_classified_as: Vec<Url>,
            /// The primary resource specification or definition of an existing or potential economic resource. A resource will have only one, as this specifies exactly what the resource is.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            resource_conforms_to: Option<RESOURCESPECIFICATION>,
            /// The amount and unit of the economic resource counted or inventoried.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            resource_quantity: Option<om2::Measure>,
            /// References an economic event that implied the claim or event, often based on a prior agreement.
            triggered_by: ECONOMICEVENT,
        }

        impl<AGENT, RESOURCESPECIFICATION, ECONOMICEVENT> Claim<AGENT, RESOURCESPECIFICATION, ECONOMICEVENT> {
            /// Create an empty builder object for Claim
            #[allow(dead_code)]
            pub fn builder() -> ClaimBuilder<AGENT, RESOURCESPECIFICATION, ECONOMICEVENT> {
                // We avoid using ClaimBuilder::default() here because it requires all our generics to derive Default =[
                ClaimBuilder {
                    action: None,
                    agreed_in: None,
                    created: None,
                    due: None,
                    effort_quantity: None,
                    finished: None,
                    in_scope_of: None,
                    note: None,
                    provider: None,
                    receiver: None,
                    resource_classified_as: None,
                    resource_conforms_to: None,
                    resource_quantity: None,
                    triggered_by: None,
                }
            }

            /// Turns Claim into ClaimBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> ClaimBuilder<AGENT, RESOURCESPECIFICATION, ECONOMICEVENT> {
                let Claim { action, agreed_in, created, due, effort_quantity, finished, in_scope_of, note, provider, receiver, resource_classified_as, resource_conforms_to, resource_quantity, triggered_by } = self;
                let mut builder = Self::builder();
                builder = builder.action(action);
                builder = match agreed_in { Some(x) => builder.agreed_in(x), None => builder };
                builder = match created { Some(x) => builder.created(x), None => builder };
                builder = match due { Some(x) => builder.due(x), None => builder };
                builder = match effort_quantity { Some(x) => builder.effort_quantity(x), None => builder };
                builder = match finished { Some(x) => builder.finished(x), None => builder };
                builder = builder.in_scope_of(in_scope_of);
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder = builder.provider(provider);
                builder = builder.receiver(receiver);
                builder = builder.resource_classified_as(resource_classified_as);
                builder = match resource_conforms_to { Some(x) => builder.resource_conforms_to(x), None => builder };
                builder = match resource_quantity { Some(x) => builder.resource_quantity(x), None => builder };
                builder = builder.triggered_by(triggered_by);
                builder
            }
        }
    }
    pub use claim::Claim;

    mod commitment {
        use super::*;

        /// A planned economic flow that has been promised by an agent to another agent.
        ///
        /// ID: https://w3id.org/valueflows#Commitment
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct Commitment<AGREEMENT, PLAN, PROCESS, AGENT, RESOURCESPECIFICATION, ECONOMICRESOURCE> {
            /// Defines the kind of flow, such as consume, produce, work, transfer, etc.
            action: Action,
            /// Reference to an agreement between agents which specifies the rules, terms, policies, calculations, etc. which govern this flow.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            agreed_in: Option<Url>,
            /// The place where an intent, commitment, or economic event occurs.  Usually mappable.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            at_location: Option<geo::SpatialThing>,
            /// This commitment is part of the agreement.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            clause_of: Option<AGREEMENT>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            created: Option<DateTime<Utc>>,
            /// The time something is expected to be complete.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            due: Option<DateTime<Utc>>,
            /// The amount and unit of the work or use or citation effort-based action. This is often a time duration, but also could be cycle counts or other measures of effort or usefulness.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            effort_quantity: Option<om2::Measure>,
            /// The commitment or intent or process is complete or not.  This is irrespective of if the original goal has been met, and indicates that no more will be done.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            finished: Option<bool>,
            /// The planned or actual beginning of a flow or process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            has_beginning: Option<DateTime<Utc>>,
            /// The planned or actual end of a flow or process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            has_end: Option<DateTime<Utc>>,
            /// The planned or actual time of a flow; can be used instead of hasBeginning and hasEnd, if so, hasBeginning and hasEnd should be able to be returned with this value.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            has_point_in_time: Option<DateTime<Utc>>,
            /// Grouping around something to create a boundary or context, used for documenting, accounting, planning.
            #[builder(default)]
            in_scope_of: Vec<Url>,
            /// Represents a desired deliverable expected from this plan.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            independent_demand_of: Option<PLAN>,
            /// Relates an input flow to it's process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            input_of: Option<PROCESS>,
            /// An informal or formal textual identifier for an object. Does not imply uniqueness.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            name: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
            /// Relates an output flow to it's process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            output_of: Option<PROCESS>,
            /// The economic agent from whom the intended, committed, or actual economic event is initiated.
            provider: AGENT,
            /// The economic agent whom the intended, committed, or actual economic event is for.
            receiver: AGENT,
            /// References a concept in a common taxonomy or other classification scheme for purposes of categorization or grouping.
            #[builder(default)]
            resource_classified_as: Vec<Url>,
            /// The primary resource specification or definition of an existing or potential economic resource. A resource will have only one, as this specifies exactly what the resource is.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            resource_conforms_to: Option<RESOURCESPECIFICATION>,
            /// Economic resource involved in the flow.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            resource_inventoried_as: Option<ECONOMICRESOURCE>,
            /// The amount and unit of the economic resource counted or inventoried.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            resource_quantity: Option<om2::Measure>,
        }

        impl<AGREEMENT, PLAN, PROCESS, AGENT, RESOURCESPECIFICATION, ECONOMICRESOURCE> Commitment<AGREEMENT, PLAN, PROCESS, AGENT, RESOURCESPECIFICATION, ECONOMICRESOURCE> {
            /// Create an empty builder object for Commitment
            #[allow(dead_code)]
            pub fn builder() -> CommitmentBuilder<AGREEMENT, PLAN, PROCESS, AGENT, RESOURCESPECIFICATION, ECONOMICRESOURCE> {
                // We avoid using CommitmentBuilder::default() here because it requires all our generics to derive Default =[
                CommitmentBuilder {
                    action: None,
                    agreed_in: None,
                    at_location: None,
                    clause_of: None,
                    created: None,
                    due: None,
                    effort_quantity: None,
                    finished: None,
                    has_beginning: None,
                    has_end: None,
                    has_point_in_time: None,
                    in_scope_of: None,
                    independent_demand_of: None,
                    input_of: None,
                    name: None,
                    note: None,
                    output_of: None,
                    provider: None,
                    receiver: None,
                    resource_classified_as: None,
                    resource_conforms_to: None,
                    resource_inventoried_as: None,
                    resource_quantity: None,
                }
            }

            /// Turns Commitment into CommitmentBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> CommitmentBuilder<AGREEMENT, PLAN, PROCESS, AGENT, RESOURCESPECIFICATION, ECONOMICRESOURCE> {
                let Commitment { action, agreed_in, at_location, clause_of, created, due, effort_quantity, finished, has_beginning, has_end, has_point_in_time, in_scope_of, independent_demand_of, input_of, name, note, output_of, provider, receiver, resource_classified_as, resource_conforms_to, resource_inventoried_as, resource_quantity } = self;
                let mut builder = Self::builder();
                builder = builder.action(action);
                builder = match agreed_in { Some(x) => builder.agreed_in(x), None => builder };
                builder = match at_location { Some(x) => builder.at_location(x), None => builder };
                builder = match clause_of { Some(x) => builder.clause_of(x), None => builder };
                builder = match created { Some(x) => builder.created(x), None => builder };
                builder = match due { Some(x) => builder.due(x), None => builder };
                builder = match effort_quantity { Some(x) => builder.effort_quantity(x), None => builder };
                builder = match finished { Some(x) => builder.finished(x), None => builder };
                builder = match has_beginning { Some(x) => builder.has_beginning(x), None => builder };
                builder = match has_end { Some(x) => builder.has_end(x), None => builder };
                builder = match has_point_in_time { Some(x) => builder.has_point_in_time(x), None => builder };
                builder = builder.in_scope_of(in_scope_of);
                builder = match independent_demand_of { Some(x) => builder.independent_demand_of(x), None => builder };
                builder = match input_of { Some(x) => builder.input_of(x), None => builder };
                builder = match name { Some(x) => builder.name(x), None => builder };
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder = match output_of { Some(x) => builder.output_of(x), None => builder };
                builder = builder.provider(provider);
                builder = builder.receiver(receiver);
                builder = builder.resource_classified_as(resource_classified_as);
                builder = match resource_conforms_to { Some(x) => builder.resource_conforms_to(x), None => builder };
                builder = match resource_inventoried_as { Some(x) => builder.resource_inventoried_as(x), None => builder };
                builder = match resource_quantity { Some(x) => builder.resource_quantity(x), None => builder };
                builder
            }
        }
    }
    pub use commitment::Commitment;

    mod economic_event {
        use super::*;

        /// An observed economic flow, as opposed to a flow planned to happen in the future. This could reflect a change in the quantity of an economic resource. It is also defined by its behavior in relation to the economic resource (see vf:action)
        ///
        /// ID: https://w3id.org/valueflows#EconomicEvent
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct EconomicEvent<PROCESS, AGENT, AGREEMENT, RESOURCESPECIFICATION, ECONOMICRESOURCE, ECONOMICEVENT> {
            /// Defines the kind of flow, such as consume, produce, work, transfer, etc.
            action: Action,
            /// Reference to an agreement between agents which specifies the rules, terms, policies, calculations, etc. which govern this flow.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            agreed_in: Option<Url>,
            /// The place where an intent, commitment, or economic event occurs.  Usually mappable.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            at_location: Option<geo::SpatialThing>,
            /// The amount and unit of the work or use or citation effort-based action. This is often a time duration, but also could be cycle counts or other measures of effort or usefulness.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            effort_quantity: Option<om2::Measure>,
            /// The planned or actual beginning of a flow or process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            has_beginning: Option<DateTime<Utc>>,
            /// The planned or actual end of a flow or process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            has_end: Option<DateTime<Utc>>,
            /// The planned or actual time of a flow; can be used instead of hasBeginning and hasEnd, if so, hasBeginning and hasEnd should be able to be returned with this value.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            has_point_in_time: Option<DateTime<Utc>>,
            /// The uri to an image relevant to the entity, such as a logo, avatar, photo, diagram, etc.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            image: Option<Url>,
            /// Grouping around something to create a boundary or context, used for documenting, accounting, planning.
            #[builder(default)]
            in_scope_of: Vec<Url>,
            /// Relates an input flow to it's process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            input_of: Option<PROCESS>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
            /// Relates an output flow to it's process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            output_of: Option<PROCESS>,
            /// The economic agent from whom the intended, committed, or actual economic event is initiated.
            provider: AGENT,
            /// This economic event occurs as part of this agreement.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            realization_of: Option<AGREEMENT>,
            /// The economic agent whom the intended, committed, or actual economic event is for.
            receiver: AGENT,
            /// References a concept in a common taxonomy or other classification scheme for purposes of categorization or grouping.
            #[builder(default)]
            resource_classified_as: Vec<Url>,
            /// The primary resource specification or definition of an existing or potential economic resource. A resource will have only one, as this specifies exactly what the resource is.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            resource_conforms_to: Option<RESOURCESPECIFICATION>,
            /// Economic resource involved in the flow.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            resource_inventoried_as: Option<ECONOMICRESOURCE>,
            /// The amount and unit of the economic resource counted or inventoried.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            resource_quantity: Option<om2::Measure>,
            /// Additional economic resource on the economic event when needed by the receiver. Used when a transfer or move, or sometimes other actions, requires explicitly identifying an economic resource on the receiving side.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            to_resource_inventoried_as: Option<ECONOMICRESOURCE>,
            /// References an economic event that implied the claim or event, often based on a prior agreement.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            triggered_by: Option<ECONOMICEVENT>,
        }

        impl<PROCESS, AGENT, AGREEMENT, RESOURCESPECIFICATION, ECONOMICRESOURCE, ECONOMICEVENT> EconomicEvent<PROCESS, AGENT, AGREEMENT, RESOURCESPECIFICATION, ECONOMICRESOURCE, ECONOMICEVENT> {
            /// Create an empty builder object for EconomicEvent
            #[allow(dead_code)]
            pub fn builder() -> EconomicEventBuilder<PROCESS, AGENT, AGREEMENT, RESOURCESPECIFICATION, ECONOMICRESOURCE, ECONOMICEVENT> {
                // We avoid using EconomicEventBuilder::default() here because it requires all our generics to derive Default =[
                EconomicEventBuilder {
                    action: None,
                    agreed_in: None,
                    at_location: None,
                    effort_quantity: None,
                    has_beginning: None,
                    has_end: None,
                    has_point_in_time: None,
                    image: None,
                    in_scope_of: None,
                    input_of: None,
                    note: None,
                    output_of: None,
                    provider: None,
                    realization_of: None,
                    receiver: None,
                    resource_classified_as: None,
                    resource_conforms_to: None,
                    resource_inventoried_as: None,
                    resource_quantity: None,
                    to_resource_inventoried_as: None,
                    triggered_by: None,
                }
            }

            /// Turns EconomicEvent into EconomicEventBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> EconomicEventBuilder<PROCESS, AGENT, AGREEMENT, RESOURCESPECIFICATION, ECONOMICRESOURCE, ECONOMICEVENT> {
                let EconomicEvent { action, agreed_in, at_location, effort_quantity, has_beginning, has_end, has_point_in_time, image, in_scope_of, input_of, note, output_of, provider, realization_of, receiver, resource_classified_as, resource_conforms_to, resource_inventoried_as, resource_quantity, to_resource_inventoried_as, triggered_by } = self;
                let mut builder = Self::builder();
                builder = builder.action(action);
                builder = match agreed_in { Some(x) => builder.agreed_in(x), None => builder };
                builder = match at_location { Some(x) => builder.at_location(x), None => builder };
                builder = match effort_quantity { Some(x) => builder.effort_quantity(x), None => builder };
                builder = match has_beginning { Some(x) => builder.has_beginning(x), None => builder };
                builder = match has_end { Some(x) => builder.has_end(x), None => builder };
                builder = match has_point_in_time { Some(x) => builder.has_point_in_time(x), None => builder };
                builder = match image { Some(x) => builder.image(x), None => builder };
                builder = builder.in_scope_of(in_scope_of);
                builder = match input_of { Some(x) => builder.input_of(x), None => builder };
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder = match output_of { Some(x) => builder.output_of(x), None => builder };
                builder = builder.provider(provider);
                builder = match realization_of { Some(x) => builder.realization_of(x), None => builder };
                builder = builder.receiver(receiver);
                builder = builder.resource_classified_as(resource_classified_as);
                builder = match resource_conforms_to { Some(x) => builder.resource_conforms_to(x), None => builder };
                builder = match resource_inventoried_as { Some(x) => builder.resource_inventoried_as(x), None => builder };
                builder = match resource_quantity { Some(x) => builder.resource_quantity(x), None => builder };
                builder = match to_resource_inventoried_as { Some(x) => builder.to_resource_inventoried_as(x), None => builder };
                builder = match triggered_by { Some(x) => builder.triggered_by(x), None => builder };
                builder
            }
        }
    }
    pub use economic_event::EconomicEvent;

    mod economic_resource {
        use super::*;

        /// A resource which is useful to people or the ecosystem.
        ///
        /// ID: https://w3id.org/valueflows#EconomicResource
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct EconomicResource<RESOURCESPECIFICATION, ECONOMICRESOURCE, AGENT, PROCESSSPECIFICATION> {
            /// The current amount and unit of the economic resource for which the agent has primary rights and responsibilities, sometimes thought of as ownership. This can be either stored or derived from economic events affecting the resource.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            accounting_quantity: Option<om2::Measure>,
            /// References one or more concepts in a common taxonomy or other classification scheme for purposes of categorization or grouping.
            #[builder(default)]
            classified_as: Vec<Url>,
            /// The primary resource knowledge specification or definition of an existing or potential resource.
            conforms_to: RESOURCESPECIFICATION,
            /// Used when a stock economic resource contains units also defined as economic resources.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            contained_in: Option<ECONOMICRESOURCE>,
            /// The current place an economic resource is located.  Could be at any level of granularity, from a town to an address to a warehouse location.  Usually mappable.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            current_location: Option<geo::SpatialThing>,
            /// The uri to an image relevant to the entity, such as a logo, avatar, photo, diagram, etc.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            image: Option<Url>,
            /// Lot or batch of an economic resource, used to track forward or backwards to all occurrences of resources of that lot.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            lot: Option<dfc::ProductBatch>,
            /// An informal or formal textual identifier for an object. Does not imply uniqueness.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            name: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
            /// The current amount and unit of the economic resource which is under direct control of the agent.  It may be more or less than the accounting quantity. This can be either stored or derived from economic events affecting the resource.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            onhand_quantity: Option<om2::Measure>,
            /// The agent currently with primary rights and responsibilites for the economic resource. It is the agent that is associated with the accountingQuantity of the economic resource.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            primary_accountable: Option<AGENT>,
            /// References the ProcessSpecification of the last process the economic resource went through. Stage is used when the last process is important for finding proper resources, such as where the publishing process wants only documents that have gone through the editing process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            stage: Option<PROCESSSPECIFICATION>,
            /// The state of the desired economic resource, after coming out of a test or review process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            state: Option<String>,
            /// Sometimes called serial number, used when each item must have a trackable identifier (like a computer). Could also be used for other unique tracking identifiers needed for resources.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            tracking_identifier: Option<String>,
            /// The unit used for use or work or sometimes cite actions.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            unit_of_effort: Option<om2::Unit>,
        }

        impl<RESOURCESPECIFICATION, ECONOMICRESOURCE, AGENT, PROCESSSPECIFICATION> EconomicResource<RESOURCESPECIFICATION, ECONOMICRESOURCE, AGENT, PROCESSSPECIFICATION> {
            /// Create an empty builder object for EconomicResource
            #[allow(dead_code)]
            pub fn builder() -> EconomicResourceBuilder<RESOURCESPECIFICATION, ECONOMICRESOURCE, AGENT, PROCESSSPECIFICATION> {
                // We avoid using EconomicResourceBuilder::default() here because it requires all our generics to derive Default =[
                EconomicResourceBuilder {
                    accounting_quantity: None,
                    classified_as: None,
                    conforms_to: None,
                    contained_in: None,
                    current_location: None,
                    image: None,
                    lot: None,
                    name: None,
                    note: None,
                    onhand_quantity: None,
                    primary_accountable: None,
                    stage: None,
                    state: None,
                    tracking_identifier: None,
                    unit_of_effort: None,
                }
            }

            /// Turns EconomicResource into EconomicResourceBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> EconomicResourceBuilder<RESOURCESPECIFICATION, ECONOMICRESOURCE, AGENT, PROCESSSPECIFICATION> {
                let EconomicResource { accounting_quantity, classified_as, conforms_to, contained_in, current_location, image, lot, name, note, onhand_quantity, primary_accountable, stage, state, tracking_identifier, unit_of_effort } = self;
                let mut builder = Self::builder();
                builder = match accounting_quantity { Some(x) => builder.accounting_quantity(x), None => builder };
                builder = builder.classified_as(classified_as);
                builder = builder.conforms_to(conforms_to);
                builder = match contained_in { Some(x) => builder.contained_in(x), None => builder };
                builder = match current_location { Some(x) => builder.current_location(x), None => builder };
                builder = match image { Some(x) => builder.image(x), None => builder };
                builder = match lot { Some(x) => builder.lot(x), None => builder };
                builder = match name { Some(x) => builder.name(x), None => builder };
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder = match onhand_quantity { Some(x) => builder.onhand_quantity(x), None => builder };
                builder = match primary_accountable { Some(x) => builder.primary_accountable(x), None => builder };
                builder = match stage { Some(x) => builder.stage(x), None => builder };
                builder = match state { Some(x) => builder.state(x), None => builder };
                builder = match tracking_identifier { Some(x) => builder.tracking_identifier(x), None => builder };
                builder = match unit_of_effort { Some(x) => builder.unit_of_effort(x), None => builder };
                builder
            }
        }
    }
    pub use economic_resource::EconomicResource;

    mod fulfillment {
        use super::*;

        /// Represents many-to-many relationships between commitments and economic events that fully or partially satisfy one or more commitments.
        ///
        /// ID: https://w3id.org/valueflows#Fulfillment
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct Fulfillment<ECONOMICEVENT, COMMITMENT> {
            /// The amount and unit of the work or use or citation effort-based action. This is often a time duration, but also could be cycle counts or other measures of effort or usefulness.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            effort_quantity: Option<om2::Measure>,
            /// The economic event which completely or partially fulfills a commitment.
            fulfilled_by: ECONOMICEVENT,
            /// The commitment which is completely or partially fulfilled by an economic event.
            fulfills: COMMITMENT,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
            /// The amount and unit of the economic resource counted or inventoried.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            resource_quantity: Option<om2::Measure>,
        }

        impl<ECONOMICEVENT, COMMITMENT> Fulfillment<ECONOMICEVENT, COMMITMENT> {
            /// Create an empty builder object for Fulfillment
            #[allow(dead_code)]
            pub fn builder() -> FulfillmentBuilder<ECONOMICEVENT, COMMITMENT> {
                // We avoid using FulfillmentBuilder::default() here because it requires all our generics to derive Default =[
                FulfillmentBuilder {
                    effort_quantity: None,
                    fulfilled_by: None,
                    fulfills: None,
                    note: None,
                    resource_quantity: None,
                }
            }

            /// Turns Fulfillment into FulfillmentBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> FulfillmentBuilder<ECONOMICEVENT, COMMITMENT> {
                let Fulfillment { effort_quantity, fulfilled_by, fulfills, note, resource_quantity } = self;
                let mut builder = Self::builder();
                builder = match effort_quantity { Some(x) => builder.effort_quantity(x), None => builder };
                builder = builder.fulfilled_by(fulfilled_by);
                builder = builder.fulfills(fulfills);
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder = match resource_quantity { Some(x) => builder.resource_quantity(x), None => builder };
                builder
            }
        }
    }
    pub use fulfillment::Fulfillment;

    /// The action is an input or output of a process, or not related to a process.
    ///
    /// ID: https://w3id.org/valueflows#InputOutput
    #[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
    pub enum InputOutput {
        /// This kind of flow can be an input to a process.
        #[serde(rename = "input")]
        Input,
        /// This kind of flow can be an output to a process.
        #[serde(rename = "output")]
        Output,
    }

    mod intent {
        use super::*;

        /// A proposed or planned or estimated economic flow, prior to a commitment or agreement, which can lead to commitments and/or economic events.
        ///
        /// ID: https://w3id.org/valueflows#Intent
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct Intent<PROCESS, AGENT, RESOURCESPECIFICATION, ECONOMICRESOURCE> {
            /// Defines the kind of flow, such as consume, produce, work, transfer, etc.
            action: Action,
            /// Reference to an agreement between agents which specifies the rules, terms, policies, calculations, etc. which govern this flow.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            agreed_in: Option<Url>,
            /// The place where an intent, commitment, or economic event occurs.  Usually mappable.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            at_location: Option<geo::SpatialThing>,
            /// The quantity of the offered resource currently available.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            available_quantity: Option<om2::Measure>,
            /// The time something is expected to be complete.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            due: Option<DateTime<Utc>>,
            /// The amount and unit of the work or use or citation effort-based action. This is often a time duration, but also could be cycle counts or other measures of effort or usefulness.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            effort_quantity: Option<om2::Measure>,
            /// The commitment or intent or process is complete or not.  This is irrespective of if the original goal has been met, and indicates that no more will be done.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            finished: Option<bool>,
            /// The planned or actual beginning of a flow or process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            has_beginning: Option<DateTime<Utc>>,
            /// The planned or actual end of a flow or process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            has_end: Option<DateTime<Utc>>,
            /// The planned or actual time of a flow; can be used instead of hasBeginning and hasEnd, if so, hasBeginning and hasEnd should be able to be returned with this value.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            has_point_in_time: Option<DateTime<Utc>>,
            /// The uri to an image relevant to the entity, such as a logo, avatar, photo, diagram, etc.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            image: Option<Url>,
            /// Grouping around something to create a boundary or context, used for documenting, accounting, planning.
            #[builder(default)]
            in_scope_of: Vec<Url>,
            /// Relates an input flow to it's process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            input_of: Option<PROCESS>,
            /// An informal or formal textual identifier for an object. Does not imply uniqueness.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            name: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
            /// Relates an output flow to it's process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            output_of: Option<PROCESS>,
            /// The economic agent from whom the intended, committed, or actual economic event is initiated.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            provider: Option<AGENT>,
            /// The economic agent whom the intended, committed, or actual economic event is for.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            receiver: Option<AGENT>,
            /// References a concept in a common taxonomy or other classification scheme for purposes of categorization or grouping.
            #[builder(default)]
            resource_classified_as: Vec<Url>,
            /// The primary resource specification or definition of an existing or potential economic resource. A resource will have only one, as this specifies exactly what the resource is.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            resource_conforms_to: Option<RESOURCESPECIFICATION>,
            /// Economic resource involved in the flow.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            resource_inventoried_as: Option<ECONOMICRESOURCE>,
            /// The amount and unit of the economic resource counted or inventoried.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            resource_quantity: Option<om2::Measure>,
        }

        impl<PROCESS, AGENT, RESOURCESPECIFICATION, ECONOMICRESOURCE> Intent<PROCESS, AGENT, RESOURCESPECIFICATION, ECONOMICRESOURCE> {
            /// Create an empty builder object for Intent
            #[allow(dead_code)]
            pub fn builder() -> IntentBuilder<PROCESS, AGENT, RESOURCESPECIFICATION, ECONOMICRESOURCE> {
                // We avoid using IntentBuilder::default() here because it requires all our generics to derive Default =[
                IntentBuilder {
                    action: None,
                    agreed_in: None,
                    at_location: None,
                    available_quantity: None,
                    due: None,
                    effort_quantity: None,
                    finished: None,
                    has_beginning: None,
                    has_end: None,
                    has_point_in_time: None,
                    image: None,
                    in_scope_of: None,
                    input_of: None,
                    name: None,
                    note: None,
                    output_of: None,
                    provider: None,
                    receiver: None,
                    resource_classified_as: None,
                    resource_conforms_to: None,
                    resource_inventoried_as: None,
                    resource_quantity: None,
                }
            }

            /// Turns Intent into IntentBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> IntentBuilder<PROCESS, AGENT, RESOURCESPECIFICATION, ECONOMICRESOURCE> {
                let Intent { action, agreed_in, at_location, available_quantity, due, effort_quantity, finished, has_beginning, has_end, has_point_in_time, image, in_scope_of, input_of, name, note, output_of, provider, receiver, resource_classified_as, resource_conforms_to, resource_inventoried_as, resource_quantity } = self;
                let mut builder = Self::builder();
                builder = builder.action(action);
                builder = match agreed_in { Some(x) => builder.agreed_in(x), None => builder };
                builder = match at_location { Some(x) => builder.at_location(x), None => builder };
                builder = match available_quantity { Some(x) => builder.available_quantity(x), None => builder };
                builder = match due { Some(x) => builder.due(x), None => builder };
                builder = match effort_quantity { Some(x) => builder.effort_quantity(x), None => builder };
                builder = match finished { Some(x) => builder.finished(x), None => builder };
                builder = match has_beginning { Some(x) => builder.has_beginning(x), None => builder };
                builder = match has_end { Some(x) => builder.has_end(x), None => builder };
                builder = match has_point_in_time { Some(x) => builder.has_point_in_time(x), None => builder };
                builder = match image { Some(x) => builder.image(x), None => builder };
                builder = builder.in_scope_of(in_scope_of);
                builder = match input_of { Some(x) => builder.input_of(x), None => builder };
                builder = match name { Some(x) => builder.name(x), None => builder };
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder = match output_of { Some(x) => builder.output_of(x), None => builder };
                builder = match provider { Some(x) => builder.provider(x), None => builder };
                builder = match receiver { Some(x) => builder.receiver(x), None => builder };
                builder = builder.resource_classified_as(resource_classified_as);
                builder = match resource_conforms_to { Some(x) => builder.resource_conforms_to(x), None => builder };
                builder = match resource_inventoried_as { Some(x) => builder.resource_inventoried_as(x), None => builder };
                builder = match resource_quantity { Some(x) => builder.resource_quantity(x), None => builder };
                builder
            }
        }
    }
    pub use intent::Intent;

    mod plan {
        use super::*;

        /// A logical collection of processes that constitute a body of scheduled work with defined deliverable(s).
        ///
        /// ID: https://w3id.org/valueflows#Plan
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct Plan<SCENARIO> {
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            created: Option<DateTime<Utc>>,
            /// The time something is expected to be complete.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            due: Option<DateTime<Utc>>,
            /// An informal or formal textual identifier for an object. Does not imply uniqueness.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            name: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
            /// This scenario or plan refines another scenario, often as time moves closer or for more detail.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            refinement_of: Option<SCENARIO>,
        }

        impl<SCENARIO> Plan<SCENARIO> {
            /// Create an empty builder object for Plan
            #[allow(dead_code)]
            pub fn builder() -> PlanBuilder<SCENARIO> {
                // We avoid using PlanBuilder::default() here because it requires all our generics to derive Default =[
                PlanBuilder {
                    created: None,
                    due: None,
                    name: None,
                    note: None,
                    refinement_of: None,
                }
            }

            /// Turns Plan into PlanBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> PlanBuilder<SCENARIO> {
                let Plan { created, due, name, note, refinement_of } = self;
                let mut builder = Self::builder();
                builder = match created { Some(x) => builder.created(x), None => builder };
                builder = match due { Some(x) => builder.due(x), None => builder };
                builder = match name { Some(x) => builder.name(x), None => builder };
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder = match refinement_of { Some(x) => builder.refinement_of(x), None => builder };
                builder
            }
        }
    }
    pub use plan::Plan;

    mod process {
        use super::*;

        /// An activity that changes inputs into outputs.  It could transform or transport economic resource(s).
        ///
        /// ID: https://w3id.org/valueflows#Process
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct Process<PROCESSSPECIFICATION, SCENARIO, PLAN> {
            /// The definition or standard specification for a process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            based_on: Option<PROCESSSPECIFICATION>,
            /// References one or more concepts in a common taxonomy or other classification scheme for purposes of categorization or grouping.
            #[builder(default)]
            classified_as: Vec<Url>,
            /// The commitment or intent or process is complete or not.  This is irrespective of if the original goal has been met, and indicates that no more will be done.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            finished: Option<bool>,
            /// The planned or actual beginning of a flow or process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            has_beginning: Option<DateTime<Utc>>,
            /// The planned or actual end of a flow or process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            has_end: Option<DateTime<Utc>>,
            /// Grouping around something to create a boundary or context, used for documenting, accounting, planning.
            #[builder(default)]
            in_scope_of: Vec<Url>,
            /// An informal or formal textual identifier for an object. Does not imply uniqueness.
            name: String,
            /// The process with its inputs and outputs is part of the scenario.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            nested_in: Option<SCENARIO>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
            /// The process with its inputs and outputs is part of the plan.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            planned_within: Option<PLAN>,
        }

        impl<PROCESSSPECIFICATION, SCENARIO, PLAN> Process<PROCESSSPECIFICATION, SCENARIO, PLAN> {
            /// Create an empty builder object for Process
            #[allow(dead_code)]
            pub fn builder() -> ProcessBuilder<PROCESSSPECIFICATION, SCENARIO, PLAN> {
                // We avoid using ProcessBuilder::default() here because it requires all our generics to derive Default =[
                ProcessBuilder {
                    based_on: None,
                    classified_as: None,
                    finished: None,
                    has_beginning: None,
                    has_end: None,
                    in_scope_of: None,
                    name: None,
                    nested_in: None,
                    note: None,
                    planned_within: None,
                }
            }

            /// Turns Process into ProcessBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> ProcessBuilder<PROCESSSPECIFICATION, SCENARIO, PLAN> {
                let Process { based_on, classified_as, finished, has_beginning, has_end, in_scope_of, name, nested_in, note, planned_within } = self;
                let mut builder = Self::builder();
                builder = match based_on { Some(x) => builder.based_on(x), None => builder };
                builder = builder.classified_as(classified_as);
                builder = match finished { Some(x) => builder.finished(x), None => builder };
                builder = match has_beginning { Some(x) => builder.has_beginning(x), None => builder };
                builder = match has_end { Some(x) => builder.has_end(x), None => builder };
                builder = builder.in_scope_of(in_scope_of);
                builder = builder.name(name);
                builder = match nested_in { Some(x) => builder.nested_in(x), None => builder };
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder = match planned_within { Some(x) => builder.planned_within(x), None => builder };
                builder
            }
        }
    }
    pub use process::Process;

    mod process_specification {
        use super::*;

        /// Specifies the kind of process.
        ///
        /// ID: https://w3id.org/valueflows#ProcessSpecification
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct ProcessSpecification {
            /// An informal or formal textual identifier for an object. Does not imply uniqueness.
            name: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
        }

        impl ProcessSpecification {
            /// Create an empty builder object for ProcessSpecification
            #[allow(dead_code)]
            pub fn builder() -> ProcessSpecificationBuilder {
                // We avoid using ProcessSpecificationBuilder::default() here because it requires all our generics to derive Default =[
                ProcessSpecificationBuilder {
                    name: None,
                    note: None,
                }
            }

            /// Turns ProcessSpecification into ProcessSpecificationBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> ProcessSpecificationBuilder {
                let ProcessSpecification { name, note } = self;
                let mut builder = Self::builder();
                builder = builder.name(name);
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder
            }
        }
    }
    pub use process_specification::ProcessSpecification;

    mod proposal {
        use super::*;

        /// Published requests or offers, sometimes with what is expected in return.
        ///
        /// ID: https://w3id.org/valueflows#Proposal
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct Proposal {
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            created: Option<DateTime<Utc>>,
            /// Location or area where the proposal is valid.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            eligible_location: Option<geo::SpatialThing>,
            /// The planned or actual beginning of a flow or process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            has_beginning: Option<DateTime<Utc>>,
            /// The planned or actual end of a flow or process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            has_end: Option<DateTime<Utc>>,
            /// Grouping around something to create a boundary or context, used for documenting, accounting, planning.
            #[builder(default)]
            in_scope_of: Vec<Url>,
            /// An informal or formal textual identifier for an object. Does not imply uniqueness.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            name: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
            /// This proposal contains unit based quantities, which can be multipied to create commitments; commonly seen in a price list or e-commerce.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            unit_based: Option<bool>,
        }

        impl Proposal {
            /// Create an empty builder object for Proposal
            #[allow(dead_code)]
            pub fn builder() -> ProposalBuilder {
                // We avoid using ProposalBuilder::default() here because it requires all our generics to derive Default =[
                ProposalBuilder {
                    created: None,
                    eligible_location: None,
                    has_beginning: None,
                    has_end: None,
                    in_scope_of: None,
                    name: None,
                    note: None,
                    unit_based: None,
                }
            }

            /// Turns Proposal into ProposalBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> ProposalBuilder {
                let Proposal { created, eligible_location, has_beginning, has_end, in_scope_of, name, note, unit_based } = self;
                let mut builder = Self::builder();
                builder = match created { Some(x) => builder.created(x), None => builder };
                builder = match eligible_location { Some(x) => builder.eligible_location(x), None => builder };
                builder = match has_beginning { Some(x) => builder.has_beginning(x), None => builder };
                builder = match has_end { Some(x) => builder.has_end(x), None => builder };
                builder = builder.in_scope_of(in_scope_of);
                builder = match name { Some(x) => builder.name(x), None => builder };
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder = match unit_based { Some(x) => builder.unit_based(x), None => builder };
                builder
            }
        }
    }
    pub use proposal::Proposal;

    mod proposed_intent {
        use super::*;

        /// Represents many-to-many relationships between Proposals and Intents, supporting including intents in multiple proposals, as well as a proposal including multiple intents.
        ///
        /// ID: https://w3id.org/valueflows#ProposedIntent
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct ProposedIntent<PROPOSAL, INTENT> {
            /// The published proposal which this intent is part of.
            published_in: PROPOSAL,
            /// The intent which is part of this published proposal.
            publishes: INTENT,
            /// This is a reciprocal intent of this proposal, not primary. Not meant to be used for intent matching.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            reciprocal: Option<bool>,
        }

        impl<PROPOSAL, INTENT> ProposedIntent<PROPOSAL, INTENT> {
            /// Create an empty builder object for ProposedIntent
            #[allow(dead_code)]
            pub fn builder() -> ProposedIntentBuilder<PROPOSAL, INTENT> {
                // We avoid using ProposedIntentBuilder::default() here because it requires all our generics to derive Default =[
                ProposedIntentBuilder {
                    published_in: None,
                    publishes: None,
                    reciprocal: None,
                }
            }

            /// Turns ProposedIntent into ProposedIntentBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> ProposedIntentBuilder<PROPOSAL, INTENT> {
                let ProposedIntent { published_in, publishes, reciprocal } = self;
                let mut builder = Self::builder();
                builder = builder.published_in(published_in);
                builder = builder.publishes(publishes);
                builder = match reciprocal { Some(x) => builder.reciprocal(x), None => builder };
                builder
            }
        }
    }
    pub use proposed_intent::ProposedIntent;

    mod proposed_to {
        use super::*;

        /// An agent to which the proposal is to be published.
        ///
        /// ID: https://w3id.org/valueflows#ProposedTo
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct ProposedTo<PROPOSAL, AGENT> {
            /// The proposal that is published to a specific agent.
            proposed: PROPOSAL,
            /// The agent to which the proposal is published.
            proposed_to: AGENT,
        }

        impl<PROPOSAL, AGENT> ProposedTo<PROPOSAL, AGENT> {
            /// Create an empty builder object for ProposedTo
            #[allow(dead_code)]
            pub fn builder() -> ProposedToBuilder<PROPOSAL, AGENT> {
                // We avoid using ProposedToBuilder::default() here because it requires all our generics to derive Default =[
                ProposedToBuilder {
                    proposed: None,
                    proposed_to: None,
                }
            }

            /// Turns ProposedTo into ProposedToBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> ProposedToBuilder<PROPOSAL, AGENT> {
                let ProposedTo { proposed, proposed_to } = self;
                let mut builder = Self::builder();
                builder = builder.proposed(proposed);
                builder = builder.proposed_to(proposed_to);
                builder
            }
        }
    }
    pub use proposed_to::ProposedTo;

    mod recipe_flow {
        use super::*;

        /// The specification of a resource inflow to, or outflow from, a recipe process.
        ///
        /// ID: https://w3id.org/valueflows#RecipeFlow
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct RecipeFlow<RECIPERESOURCE, RECIPEPROCESS> {
            /// Defines the kind of flow, such as consume, produce, work, transfer, etc.
            action: Action,
            /// The amount and unit of the work or use or citation effort-based action. This is often a time duration, but also could be cycle counts or other measures of effort or usefulness.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            effort_quantity: Option<om2::Measure>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
            /// The resource definition referenced by this flow in the recipe.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            recipe_flow_resource: Option<RECIPERESOURCE>,
            /// Relates an input flow to it's process in a recipe.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            recipe_input_of: Option<RECIPEPROCESS>,
            /// Relates an output flow to it's process in a recipe.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            recipe_output_of: Option<RECIPEPROCESS>,
            /// The amount and unit of the economic resource counted or inventoried.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            resource_quantity: Option<om2::Measure>,
        }

        impl<RECIPERESOURCE, RECIPEPROCESS> RecipeFlow<RECIPERESOURCE, RECIPEPROCESS> {
            /// Create an empty builder object for RecipeFlow
            #[allow(dead_code)]
            pub fn builder() -> RecipeFlowBuilder<RECIPERESOURCE, RECIPEPROCESS> {
                // We avoid using RecipeFlowBuilder::default() here because it requires all our generics to derive Default =[
                RecipeFlowBuilder {
                    action: None,
                    effort_quantity: None,
                    note: None,
                    recipe_flow_resource: None,
                    recipe_input_of: None,
                    recipe_output_of: None,
                    resource_quantity: None,
                }
            }

            /// Turns RecipeFlow into RecipeFlowBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> RecipeFlowBuilder<RECIPERESOURCE, RECIPEPROCESS> {
                let RecipeFlow { action, effort_quantity, note, recipe_flow_resource, recipe_input_of, recipe_output_of, resource_quantity } = self;
                let mut builder = Self::builder();
                builder = builder.action(action);
                builder = match effort_quantity { Some(x) => builder.effort_quantity(x), None => builder };
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder = match recipe_flow_resource { Some(x) => builder.recipe_flow_resource(x), None => builder };
                builder = match recipe_input_of { Some(x) => builder.recipe_input_of(x), None => builder };
                builder = match recipe_output_of { Some(x) => builder.recipe_output_of(x), None => builder };
                builder = match resource_quantity { Some(x) => builder.resource_quantity(x), None => builder };
                builder
            }
        }
    }
    pub use recipe_flow::RecipeFlow;

    mod recipe_process {
        use super::*;

        /// Specifies a process in a recipe for use in planning from recipe.
        ///
        /// ID: https://w3id.org/valueflows#RecipeProcess
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct RecipeProcess<PROCESSSPECIFICATION> {
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            has_duration: Option<Duration>,
            /// An informal or formal textual identifier for an object. Does not imply uniqueness.
            name: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
            /// References a concept in a common taxonomy or other classification scheme for purposes of categorization or grouping.
            #[builder(default)]
            process_classified_as: Vec<Url>,
            /// The standard specification or definition of a process.
            process_conforms_to: PROCESSSPECIFICATION,
        }

        impl<PROCESSSPECIFICATION> RecipeProcess<PROCESSSPECIFICATION> {
            /// Create an empty builder object for RecipeProcess
            #[allow(dead_code)]
            pub fn builder() -> RecipeProcessBuilder<PROCESSSPECIFICATION> {
                // We avoid using RecipeProcessBuilder::default() here because it requires all our generics to derive Default =[
                RecipeProcessBuilder {
                    has_duration: None,
                    name: None,
                    note: None,
                    process_classified_as: None,
                    process_conforms_to: None,
                }
            }

            /// Turns RecipeProcess into RecipeProcessBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> RecipeProcessBuilder<PROCESSSPECIFICATION> {
                let RecipeProcess { has_duration, name, note, process_classified_as, process_conforms_to } = self;
                let mut builder = Self::builder();
                builder = match has_duration { Some(x) => builder.has_duration(x), None => builder };
                builder = builder.name(name);
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder = builder.process_classified_as(process_classified_as);
                builder = builder.process_conforms_to(process_conforms_to);
                builder
            }
        }
    }
    pub use recipe_process::RecipeProcess;

    mod recipe_resource {
        use super::*;

        /// Specifies the resource as part of a recipe, for use in planning from recipe.
        ///
        /// ID: https://w3id.org/valueflows#RecipeResource
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct RecipeResource<RESOURCESPECIFICATION> {
            /// The uri to an image relevant to the entity, such as a logo, avatar, photo, diagram, etc.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            image: Option<Url>,
            /// An informal or formal textual identifier for an object. Does not imply uniqueness.
            name: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
            /// References a concept in a common taxonomy or other classification scheme for purposes of categorization or grouping.
            #[builder(default)]
            resource_classified_as: Vec<Url>,
            /// The primary resource specification or definition of an existing or potential economic resource. A resource will have only one, as this specifies exactly what the resource is.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            resource_conforms_to: Option<RESOURCESPECIFICATION>,
            /// Defines if any resource of that type can be freely substituted for any other resource of that type when used, consumed, traded, etc.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            substitutable: Option<bool>,
            /// The unit used for use or work or sometimes cite actions.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            unit_of_effort: Option<om2::Unit>,
            /// The unit used for this resource in the recipe.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            unit_of_resource: Option<om2::Unit>,
        }

        impl<RESOURCESPECIFICATION> RecipeResource<RESOURCESPECIFICATION> {
            /// Create an empty builder object for RecipeResource
            #[allow(dead_code)]
            pub fn builder() -> RecipeResourceBuilder<RESOURCESPECIFICATION> {
                // We avoid using RecipeResourceBuilder::default() here because it requires all our generics to derive Default =[
                RecipeResourceBuilder {
                    image: None,
                    name: None,
                    note: None,
                    resource_classified_as: None,
                    resource_conforms_to: None,
                    substitutable: None,
                    unit_of_effort: None,
                    unit_of_resource: None,
                }
            }

            /// Turns RecipeResource into RecipeResourceBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> RecipeResourceBuilder<RESOURCESPECIFICATION> {
                let RecipeResource { image, name, note, resource_classified_as, resource_conforms_to, substitutable, unit_of_effort, unit_of_resource } = self;
                let mut builder = Self::builder();
                builder = match image { Some(x) => builder.image(x), None => builder };
                builder = builder.name(name);
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder = builder.resource_classified_as(resource_classified_as);
                builder = match resource_conforms_to { Some(x) => builder.resource_conforms_to(x), None => builder };
                builder = match substitutable { Some(x) => builder.substitutable(x), None => builder };
                builder = match unit_of_effort { Some(x) => builder.unit_of_effort(x), None => builder };
                builder = match unit_of_resource { Some(x) => builder.unit_of_resource(x), None => builder };
                builder
            }
        }
    }
    pub use recipe_resource::RecipeResource;

    /// The action has this effect on an inventoried resource.
    ///
    /// ID: https://w3id.org/valueflows#ResourceEffect
    #[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
    pub enum ResourceEffect {
        /// The effect is to subtract from the inventoried resource.
        #[serde(rename = "decrement")]
        Decrement,
        /// The effect is to subtract from the 'from' inventoried resource, and add to the 'to' inventoried resource.
        #[serde(rename = "decrement-increment")]
        DecrementIncrement,
        /// The effect is to add to the inventoried resource.
        #[serde(rename = "increment")]
        Increment,
        /// The effect is to do nothing to the inventoried resource.
        #[serde(rename = "no-effect")]
        NoEffect,
    }

    mod resource_specification {
        use super::*;

        /// Specification of a kind of resource. Could define a material item, service, digital item, currency account, etc.
        ///
        /// ID: https://w3id.org/valueflows#ResourceSpecification
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct ResourceSpecification {
            /// The uri to an image relevant to the entity, such as a logo, avatar, photo, diagram, etc.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            image: Option<Url>,
            /// An informal or formal textual identifier for an object. Does not imply uniqueness.
            name: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
            /// References a concept in a common taxonomy or other classification scheme for purposes of categorization or grouping.
            #[builder(default)]
            resource_classified_as: Vec<Url>,
        }

        impl ResourceSpecification {
            /// Create an empty builder object for ResourceSpecification
            #[allow(dead_code)]
            pub fn builder() -> ResourceSpecificationBuilder {
                // We avoid using ResourceSpecificationBuilder::default() here because it requires all our generics to derive Default =[
                ResourceSpecificationBuilder {
                    image: None,
                    name: None,
                    note: None,
                    resource_classified_as: None,
                }
            }

            /// Turns ResourceSpecification into ResourceSpecificationBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> ResourceSpecificationBuilder {
                let ResourceSpecification { image, name, note, resource_classified_as } = self;
                let mut builder = Self::builder();
                builder = match image { Some(x) => builder.image(x), None => builder };
                builder = builder.name(name);
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder = builder.resource_classified_as(resource_classified_as);
                builder
            }
        }
    }
    pub use resource_specification::ResourceSpecification;

    mod satisfaction {
        use super::*;

        /// Represents many-to-many relationships between intents and commitments or events that partially or full satisfy one or more intents.
        ///
        /// ID: https://w3id.org/valueflows#Satisfaction
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct Satisfaction<COMMITMENT, ECONOMICEVENT, INTENT> {
            /// The amount and unit of the work or use or citation effort-based action. This is often a time duration, but also could be cycle counts or other measures of effort or usefulness.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            effort_quantity: Option<om2::Measure>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
            /// The amount and unit of the economic resource counted or inventoried.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            resource_quantity: Option<om2::Measure>,
            /// A commitment or economic event fully or partially satisfying an intent
            satisfied_by: CommitmentEconomicEventUnion<COMMITMENT, ECONOMICEVENT>,
            /// An intent satisfied fully or partially by an economic event or commitment.
            satisfies: INTENT,
        }

        impl<COMMITMENT, ECONOMICEVENT, INTENT> Satisfaction<COMMITMENT, ECONOMICEVENT, INTENT> {
            /// Create an empty builder object for Satisfaction
            #[allow(dead_code)]
            pub fn builder() -> SatisfactionBuilder<COMMITMENT, ECONOMICEVENT, INTENT> {
                // We avoid using SatisfactionBuilder::default() here because it requires all our generics to derive Default =[
                SatisfactionBuilder {
                    effort_quantity: None,
                    note: None,
                    resource_quantity: None,
                    satisfied_by: None,
                    satisfies: None,
                }
            }

            /// Turns Satisfaction into SatisfactionBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> SatisfactionBuilder<COMMITMENT, ECONOMICEVENT, INTENT> {
                let Satisfaction { effort_quantity, note, resource_quantity, satisfied_by, satisfies } = self;
                let mut builder = Self::builder();
                builder = match effort_quantity { Some(x) => builder.effort_quantity(x), None => builder };
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder = match resource_quantity { Some(x) => builder.resource_quantity(x), None => builder };
                builder = builder.satisfied_by(satisfied_by);
                builder = builder.satisfies(satisfies);
                builder
            }
        }
    }
    pub use satisfaction::Satisfaction;

    mod scenario {
        use super::*;

        /// An estimated or analytical logical collection of higher level processes used for budgeting, analysis, plan refinement, etc.
        ///
        /// ID: https://w3id.org/valueflows#Scenario
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct Scenario<SCENARIODEFINITION, SCENARIO> {
            /// The scenario definition for this scenario, for example yearly budget.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            defined_as: Option<SCENARIODEFINITION>,
            /// The planned or actual beginning of a flow or process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            has_beginning: Option<DateTime<Utc>>,
            /// The planned or actual end of a flow or process.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            has_end: Option<DateTime<Utc>>,
            /// Grouping around something to create a boundary or context, used for documenting, accounting, planning.
            #[builder(default)]
            in_scope_of: Vec<Url>,
            /// An informal or formal textual identifier for an object. Does not imply uniqueness.
            name: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
            /// This scenario or plan refines another scenario, often as time moves closer or for more detail.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            refinement_of: Option<SCENARIO>,
        }

        impl<SCENARIODEFINITION, SCENARIO> Scenario<SCENARIODEFINITION, SCENARIO> {
            /// Create an empty builder object for Scenario
            #[allow(dead_code)]
            pub fn builder() -> ScenarioBuilder<SCENARIODEFINITION, SCENARIO> {
                // We avoid using ScenarioBuilder::default() here because it requires all our generics to derive Default =[
                ScenarioBuilder {
                    defined_as: None,
                    has_beginning: None,
                    has_end: None,
                    in_scope_of: None,
                    name: None,
                    note: None,
                    refinement_of: None,
                }
            }

            /// Turns Scenario into ScenarioBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> ScenarioBuilder<SCENARIODEFINITION, SCENARIO> {
                let Scenario { defined_as, has_beginning, has_end, in_scope_of, name, note, refinement_of } = self;
                let mut builder = Self::builder();
                builder = match defined_as { Some(x) => builder.defined_as(x), None => builder };
                builder = match has_beginning { Some(x) => builder.has_beginning(x), None => builder };
                builder = match has_end { Some(x) => builder.has_end(x), None => builder };
                builder = builder.in_scope_of(in_scope_of);
                builder = builder.name(name);
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder = match refinement_of { Some(x) => builder.refinement_of(x), None => builder };
                builder
            }
        }
    }
    pub use scenario::Scenario;

    mod scenario_definition {
        use super::*;

        /// The type definition of one or more scenarios.
        ///
        /// ID: https://w3id.org/valueflows#ScenarioDefinition
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct ScenarioDefinition {
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            has_duration: Option<Duration>,
            /// An informal or formal textual identifier for an object. Does not imply uniqueness.
            name: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
        }

        impl ScenarioDefinition {
            /// Create an empty builder object for ScenarioDefinition
            #[allow(dead_code)]
            pub fn builder() -> ScenarioDefinitionBuilder {
                // We avoid using ScenarioDefinitionBuilder::default() here because it requires all our generics to derive Default =[
                ScenarioDefinitionBuilder {
                    has_duration: None,
                    name: None,
                    note: None,
                }
            }

            /// Turns ScenarioDefinition into ScenarioDefinitionBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> ScenarioDefinitionBuilder {
                let ScenarioDefinition { has_duration, name, note } = self;
                let mut builder = Self::builder();
                builder = match has_duration { Some(x) => builder.has_duration(x), None => builder };
                builder = builder.name(name);
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder
            }
        }
    }
    pub use scenario_definition::ScenarioDefinition;

    mod settlement {
        use super::*;

        /// Represents many-to-many relationships between claim and economic events that fully or partially settle one or more claims.
        ///
        /// ID: https://w3id.org/valueflows#Settlement
        #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Builder, Getters)]
        #[derive(Setters)]
        #[derive(MutGetters)]
        #[builder(pattern = "owned", setter(into))]
        #[getset(get = "pub", set = "pub", get_mut = "pub")]
        pub struct Settlement<ECONOMICEVENT, CLAIM> {
            /// The amount and unit of the work or use or citation effort-based action. This is often a time duration, but also could be cycle counts or other measures of effort or usefulness.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            effort_quantity: Option<om2::Measure>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            note: Option<String>,
            /// The amount and unit of the economic resource counted or inventoried.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[builder(setter(strip_option), default)]
            resource_quantity: Option<om2::Measure>,
            /// References an economic event that fully or partially settles the claim.
            settled_by: ECONOMICEVENT,
            /// References a claim that is fully or partially settled by the economic event.
            settles: CLAIM,
        }

        impl<ECONOMICEVENT, CLAIM> Settlement<ECONOMICEVENT, CLAIM> {
            /// Create an empty builder object for Settlement
            #[allow(dead_code)]
            pub fn builder() -> SettlementBuilder<ECONOMICEVENT, CLAIM> {
                // We avoid using SettlementBuilder::default() here because it requires all our generics to derive Default =[
                SettlementBuilder {
                    effort_quantity: None,
                    note: None,
                    resource_quantity: None,
                    settled_by: None,
                    settles: None,
                }
            }

            /// Turns Settlement into SettlementBuilder
            #[allow(dead_code)]
            pub fn into_builder(self) -> SettlementBuilder<ECONOMICEVENT, CLAIM> {
                let Settlement { effort_quantity, note, resource_quantity, settled_by, settles } = self;
                let mut builder = Self::builder();
                builder = match effort_quantity { Some(x) => builder.effort_quantity(x), None => builder };
                builder = match note { Some(x) => builder.note(x), None => builder };
                builder = match resource_quantity { Some(x) => builder.resource_quantity(x), None => builder };
                builder = builder.settled_by(settled_by);
                builder = builder.settles(settles);
                builder
            }
        }
    }
    pub use settlement::Settlement;

    /// Holds the supporting builder structs for our vf types. Create a builder via `SomeType::builder()`.
    pub mod builders {
        pub use super::agent::AgentBuilder;
        pub use super::agent_relationship::AgentRelationshipBuilder;
        pub use super::agent_relationship_role::AgentRelationshipRoleBuilder;
        pub use super::agreement::AgreementBuilder;
        pub use super::appreciation::AppreciationBuilder;
        pub use super::claim::ClaimBuilder;
        pub use super::commitment::CommitmentBuilder;
        pub use super::economic_event::EconomicEventBuilder;
        pub use super::economic_resource::EconomicResourceBuilder;
        pub use super::fulfillment::FulfillmentBuilder;
        pub use super::intent::IntentBuilder;
        pub use super::plan::PlanBuilder;
        pub use super::process::ProcessBuilder;
        pub use super::process_specification::ProcessSpecificationBuilder;
        pub use super::proposal::ProposalBuilder;
        pub use super::proposed_intent::ProposedIntentBuilder;
        pub use super::proposed_to::ProposedToBuilder;
        pub use super::recipe_flow::RecipeFlowBuilder;
        pub use super::recipe_process::RecipeProcessBuilder;
        pub use super::recipe_resource::RecipeResourceBuilder;
        pub use super::resource_specification::ResourceSpecificationBuilder;
        pub use super::satisfaction::SatisfactionBuilder;
        pub use super::scenario::ScenarioBuilder;
        pub use super::scenario_definition::ScenarioDefinitionBuilder;
        pub use super::settlement::SettlementBuilder;
    }
}