openusd 0.8.0

Rust native USD library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
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
// WARNING: THIS FILE IS GENERATED BY openusd-build. DO NOT EDIT.
// Generated from schema.usda.

/// The strings this library names things by.
///
/// A token's value is what a stage actually reads; the constant is a
/// name for it, so an application can say what it means instead of
/// retyping a string.
pub mod tokens {
    /// `"apiSchemas"`: A listop metadata containing the API schemas which have been
    /// applied to this prim, using the `Apply()` method on the particular schema
    /// class..
    pub const API_SCHEMAS: &str = "apiSchemas";
    /// `"automatic"`: the fallback of `CollectionAPI.mode`.
    pub const AUTOMATIC: &str = "automatic";
    /// `"clips"`: Dictionary that contains the definition of the clip sets on this
    /// prim. See `UsdClipsAPI::GetClips`..
    pub const CLIPS: &str = "clips";
    /// `"clipSets"`: `ListOp` that may be used to affect how opinions from clip
    /// sets are applied during value resolution. See `UsdClipsAPI::GetClipSets`..
    pub const CLIP_SETS: &str = "clipSets";
    /// `"collection"`: the property namespace prefix of `CollectionAPI`.
    pub const COLLECTION: &str = "collection";
    /// `"collection:__INSTANCE_NAME__"`: `CollectionAPI`.
    pub const COLLECTION_MULTIPLE_APPLY_TEMPLATE_: &str = "collection:__INSTANCE_NAME__";
    /// `"collection:__INSTANCE_NAME__:excludes"`: `CollectionAPI`.
    pub const COLLECTION_MULTIPLE_APPLY_TEMPLATE_EXCLUDES: &str = "collection:__INSTANCE_NAME__:excludes";
    /// `"collection:__INSTANCE_NAME__:expansionRule"`: `CollectionAPI`.
    pub const COLLECTION_MULTIPLE_APPLY_TEMPLATE_EXPANSION_RULE: &str = "collection:__INSTANCE_NAME__:expansionRule";
    /// `"collection:__INSTANCE_NAME__:includeRoot"`: `CollectionAPI`.
    pub const COLLECTION_MULTIPLE_APPLY_TEMPLATE_INCLUDE_ROOT: &str = "collection:__INSTANCE_NAME__:includeRoot";
    /// `"collection:__INSTANCE_NAME__:includes"`: `CollectionAPI`.
    pub const COLLECTION_MULTIPLE_APPLY_TEMPLATE_INCLUDES: &str = "collection:__INSTANCE_NAME__:includes";
    /// `"collection:__INSTANCE_NAME__:membershipExpression"`: `CollectionAPI`.
    pub const COLLECTION_MULTIPLE_APPLY_TEMPLATE_MEMBERSHIP_EXPRESSION: &str = "collection:__INSTANCE_NAME__:membershipExpression";
    /// `"collection:__INSTANCE_NAME__:mode"`: `CollectionAPI`.
    pub const COLLECTION_MULTIPLE_APPLY_TEMPLATE_MODE: &str = "collection:__INSTANCE_NAME__:mode";
    /// `"colorSpaceDefinition"`: the property namespace prefix of
    /// `ColorSpaceDefinitionAPI`.
    pub const COLOR_SPACE_DEFINITION: &str = "colorSpaceDefinition";
    /// `"colorSpaceDefinition:__INSTANCE_NAME__:blueChroma"`:
    /// `ColorSpaceDefinitionAPI`.
    pub const COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_BLUE_CHROMA: &str = "colorSpaceDefinition:__INSTANCE_NAME__:blueChroma";
    /// `"colorSpaceDefinition:__INSTANCE_NAME__:gamma"`: `ColorSpaceDefinitionAPI`.
    pub const COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_GAMMA: &str = "colorSpaceDefinition:__INSTANCE_NAME__:gamma";
    /// `"colorSpaceDefinition:__INSTANCE_NAME__:greenChroma"`:
    /// `ColorSpaceDefinitionAPI`.
    pub const COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_GREEN_CHROMA: &str = "colorSpaceDefinition:__INSTANCE_NAME__:greenChroma";
    /// `"colorSpaceDefinition:__INSTANCE_NAME__:linearBias"`:
    /// `ColorSpaceDefinitionAPI`.
    pub const COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_LINEAR_BIAS: &str = "colorSpaceDefinition:__INSTANCE_NAME__:linearBias";
    /// `"colorSpaceDefinition:__INSTANCE_NAME__:name"`: `ColorSpaceDefinitionAPI`.
    pub const COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_NAME: &str = "colorSpaceDefinition:__INSTANCE_NAME__:name";
    /// `"colorSpaceDefinition:__INSTANCE_NAME__:redChroma"`:
    /// `ColorSpaceDefinitionAPI`.
    pub const COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_RED_CHROMA: &str = "colorSpaceDefinition:__INSTANCE_NAME__:redChroma";
    /// `"colorSpaceDefinition:__INSTANCE_NAME__:whitePoint"`:
    /// `ColorSpaceDefinitionAPI`.
    pub const COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_WHITE_POINT: &str = "colorSpaceDefinition:__INSTANCE_NAME__:whitePoint";
    /// `"colorSpace:name"`: `ColorSpaceAPI`.
    pub const COLOR_SPACE_NAME: &str = "colorSpace:name";
    /// `"custom"`: the fallback of `ColorSpaceDefinitionAPI.name`.
    pub const CUSTOM: &str = "custom";
    /// `"exclude"`: This is the token used to exclude a path from a collection.
    /// Although it is not a possible value for the "`expansionRule`"
    /// attribute, it is used as the `expansionRule` for excluded paths in
    /// `UsdCollectionAPI::MembershipQuery::IsPathIncluded`..
    pub const EXCLUDE: &str = "exclude";
    /// `"expandPrims"`: the fallback of `CollectionAPI.expansionRule`.
    pub const EXPAND_PRIMS: &str = "expandPrims";
    /// `"expandPrimsAndProperties"`: a value `CollectionAPI.expansionRule` admits.
    pub const EXPAND_PRIMS_AND_PROPERTIES: &str = "expandPrimsAndProperties";
    /// `"explicitOnly"`: a value `CollectionAPI.expansionRule` admits.
    pub const EXPLICIT_ONLY: &str = "explicitOnly";
    /// `"expression"`: a value `CollectionAPI.mode` admits.
    pub const EXPRESSION: &str = "expression";
    /// `"fallbackPrimTypes"`: A dictionary metadata that maps the name of a
    /// concrete schema prim type to an ordered list of schema prim types to use
    /// instead if the schema prim type doesn't exist in version of USD being used..
    pub const FALLBACK_PRIM_TYPES: &str = "fallbackPrimTypes";
    /// `"relationship"`: a value `CollectionAPI.mode` admits.
    pub const RELATIONSHIP: &str = "relationship";
    /// `"APISchemaBase"`: the schema identifier and family of `APISchemaBase`.
    pub const API_SCHEMA_BASE: &str = "APISchemaBase";
    /// `"ClipsAPI"`: the schema identifier and family of `ClipsAPI`.
    pub const CLIPS_API: &str = "ClipsAPI";
    /// `"CollectionAPI"`: the schema identifier and family of `CollectionAPI`.
    pub const COLLECTION_API: &str = "CollectionAPI";
    /// `"ColorSpaceAPI"`: the schema identifier and family of `ColorSpaceAPI`.
    pub const COLOR_SPACE_API: &str = "ColorSpaceAPI";
    /// `"ColorSpaceDefinitionAPI"`: the schema identifier and family of
    /// `ColorSpaceDefinitionAPI`.
    pub const COLOR_SPACE_DEFINITION_API: &str = "ColorSpaceDefinitionAPI";
    /// `"ModelAPI"`: the schema identifier and family of `ModelAPI`.
    pub const MODEL_API: &str = "ModelAPI";
    /// `"SchemaBase"`: the schema identifier and family of `SchemaBase`.
    pub const SCHEMA_BASE: &str = "SchemaBase";
    /// `"Typed"`: the schema identifier and family of `Typed`.
    pub const TYPED: &str = "Typed";
}

/// Specifies how the paths that are included in
/// the collection must be expanded to determine its members.
///
/// The values `CollectionAPI.expansionRule` admits, as a Rust type. Read and
/// written as the tokens themselves.
#[derive(
    ::std::clone::Clone,
    ::std::marker::Copy,
    ::std::fmt::Debug,
    ::std::cmp::PartialEq,
    ::std::cmp::Eq,
    ::std::hash::Hash,
    ::std::default::Default
)]
pub enum ExpansionRule {
    /// `"explicitOnly"`.
    ExplicitOnly,
    /// `"expandPrims"`.
    #[default]
    ExpandPrims,
    /// `"expandPrimsAndProperties"`.
    ExpandPrimsAndProperties,
}

impl ExpansionRule {
    /// The token this value is written as.
    pub const fn as_token(self) -> &'static str {
        match self {
            Self::ExplicitOnly => tokens::EXPLICIT_ONLY,
            Self::ExpandPrims => tokens::EXPAND_PRIMS,
            Self::ExpandPrimsAndProperties => tokens::EXPAND_PRIMS_AND_PROPERTIES,
        }
    }
    /// The value `token` names, or `None` where it names none.
    pub fn from_token(
        token: impl ::std::convert::AsRef<str>,
    ) -> ::std::option::Option<Self> {
        match token.as_ref() {
            tokens::EXPLICIT_ONLY => ::std::option::Option::Some(Self::ExplicitOnly),
            tokens::EXPAND_PRIMS => ::std::option::Option::Some(Self::ExpandPrims),
            tokens::EXPAND_PRIMS_AND_PROPERTIES => {
                ::std::option::Option::Some(Self::ExpandPrimsAndProperties)
            }
            _ => ::std::option::Option::None,
        }
    }
}

::openusd::sdf::impl_token_value!(ExpansionRule);

/// Specifies which mode the collection uses to determine
/// membership: `automatic`, `relationship`, or `expression`.
///
/// - `automatic` - the collection's mode is inferred from its authored
///   properties. If either or both of the `includes` and `excludes`
///   relationships have valid targets, or the `includeRoot` attribute
///   is set to `true`, the collection is in *relationship-mode* and the
///   `membershipExpression` attribute is ignored. Otherwise, the collection
///   is in *expression-mode* and the `membershipExpression` attribute applies.
///   This is the default behavior and is backward compatible with collections
///   that predate this attribute.
/// - `relationship` - the collection is explicitly in *relationship-mode*. The
///   `includes`, `excludes`, and `includeRoot` attributes determine membership,
///   and `membershipExpression` is ignored.
/// - `expression` - the collection is explicitly in *expression-mode*. The
///   `membershipExpression` attribute determines membership, and `includes`,
///   `excludes`, and `includeRoot` are ignored.
///
/// The fallback value is `automatic`.
///
/// The values `CollectionAPI.mode` admits, as a Rust type. Read and written as
/// the tokens themselves.
#[derive(
    ::std::clone::Clone,
    ::std::marker::Copy,
    ::std::fmt::Debug,
    ::std::cmp::PartialEq,
    ::std::cmp::Eq,
    ::std::hash::Hash,
    ::std::default::Default
)]
pub enum CollectionMode {
    /// `"automatic"`.
    #[default]
    Automatic,
    /// `"relationship"`.
    Relationship,
    /// `"expression"`.
    Expression,
}

impl CollectionMode {
    /// The token this value is written as.
    pub const fn as_token(self) -> &'static str {
        match self {
            Self::Automatic => tokens::AUTOMATIC,
            Self::Relationship => tokens::RELATIONSHIP,
            Self::Expression => tokens::EXPRESSION,
        }
    }
    /// The value `token` names, or `None` where it names none.
    pub fn from_token(
        token: impl ::std::convert::AsRef<str>,
    ) -> ::std::option::Option<Self> {
        match token.as_ref() {
            tokens::AUTOMATIC => ::std::option::Option::Some(Self::Automatic),
            tokens::RELATIONSHIP => ::std::option::Option::Some(Self::Relationship),
            tokens::EXPRESSION => ::std::option::Option::Some(Self::Expression),
            _ => ::std::option::Option::None,
        }
    }
}

::openusd::sdf::impl_token_value!(CollectionMode);

/// The library's name, which is the family its declarations register
/// under.
pub const LIBRARY_NAME: &str = "usd";

/// What this library declares, ready to register: its schemas, and
/// the metadata fields and kinds declared beside them.
///
/// Hand it to
/// [`SchemaRegistryBuilder::register`](::openusd::usd::SchemaRegistryBuilder::register):
/// a stage opened with the resulting registry resolves the fallbacks
/// of the schemas and metadata fields declared here, answers `is_a`
/// along the schemas' inheritance, and counts a declared kind as its
/// base kind. One opened without it knows none of them, so the typed
/// constructors answer `None`.
pub const SCHEMAS: &::openusd::usd::SchemaFamily<'static> = &::openusd::usd::SchemaFamily::new(
    LIBRARY_NAME,
    &[
        ::openusd::usd::SchemaDecl::new(
            "SchemaBase",
            ::openusd::usd::SchemaKind::AbstractBase,
        ),
        ::openusd::usd::SchemaDecl::new(
                "Typed",
                ::openusd::usd::SchemaKind::AbstractBase,
            )
            .bases(&["SchemaBase"]),
        ::openusd::usd::SchemaDecl::new(
                "APISchemaBase",
                ::openusd::usd::SchemaKind::AbstractBase,
            )
            .bases(&["SchemaBase"]),
        ::openusd::usd::SchemaDecl::new(
                "ModelAPI",
                ::openusd::usd::SchemaKind::NonAppliedApi,
            )
            .bases(&["APISchemaBase"]),
        ::openusd::usd::SchemaDecl::new(
                "ColorSpaceAPI",
                ::openusd::usd::SchemaKind::SingleApplyApi,
            )
            .bases(&["APISchemaBase"])
            .properties(
                &[
                    ::openusd::usd::PropertyDecl::attribute("colorSpace:name", "token")
                        .uniform(),
                ],
            ),
        ::openusd::usd::SchemaDecl::new(
                "ColorSpaceDefinitionAPI",
                ::openusd::usd::SchemaKind::MultipleApplyApi,
            )
            .bases(&["APISchemaBase"])
            .property_namespace_prefix("colorSpaceDefinition")
            .properties(
                &[
                    ::openusd::usd::PropertyDecl::attribute(
                            "colorSpaceDefinition:__INSTANCE_NAME__:name",
                            "token",
                        )
                        .uniform()
                        .fields(&[::openusd::usd::Field::token("default", "custom")]),
                    ::openusd::usd::PropertyDecl::attribute(
                            "colorSpaceDefinition:__INSTANCE_NAME__:redChroma",
                            "float2",
                        )
                        .varying()
                        .fields(
                            &[
                                ::openusd::usd::Field::new(
                                    "default",
                                    || ::openusd::sdf::Value::Vec2f(
                                        ::openusd::gf::vec2f(1f32, 0f32),
                                    ),
                                ),
                            ],
                        ),
                    ::openusd::usd::PropertyDecl::attribute(
                            "colorSpaceDefinition:__INSTANCE_NAME__:greenChroma",
                            "float2",
                        )
                        .varying()
                        .fields(
                            &[
                                ::openusd::usd::Field::new(
                                    "default",
                                    || ::openusd::sdf::Value::Vec2f(
                                        ::openusd::gf::vec2f(0f32, 1f32),
                                    ),
                                ),
                            ],
                        ),
                    ::openusd::usd::PropertyDecl::attribute(
                            "colorSpaceDefinition:__INSTANCE_NAME__:blueChroma",
                            "float2",
                        )
                        .varying()
                        .fields(
                            &[
                                ::openusd::usd::Field::new(
                                    "default",
                                    || ::openusd::sdf::Value::Vec2f(
                                        ::openusd::gf::vec2f(0f32, 0f32),
                                    ),
                                ),
                            ],
                        ),
                    ::openusd::usd::PropertyDecl::attribute(
                            "colorSpaceDefinition:__INSTANCE_NAME__:whitePoint",
                            "float2",
                        )
                        .varying()
                        .fields(
                            &[
                                ::openusd::usd::Field::new(
                                    "default",
                                    || ::openusd::sdf::Value::Vec2f(
                                        ::openusd::gf::vec2f(0.33333334f32, 0.33333334f32),
                                    ),
                                ),
                            ],
                        ),
                    ::openusd::usd::PropertyDecl::attribute(
                            "colorSpaceDefinition:__INSTANCE_NAME__:gamma",
                            "float",
                        )
                        .varying()
                        .fields(
                            &[
                                ::openusd::usd::Field::new(
                                    "default",
                                    || ::openusd::sdf::Value::Float(1f32),
                                ),
                            ],
                        ),
                    ::openusd::usd::PropertyDecl::attribute(
                            "colorSpaceDefinition:__INSTANCE_NAME__:linearBias",
                            "float",
                        )
                        .varying()
                        .fields(
                            &[
                                ::openusd::usd::Field::new(
                                    "default",
                                    || ::openusd::sdf::Value::Float(0f32),
                                ),
                            ],
                        ),
                ],
            ),
        ::openusd::usd::SchemaDecl::new(
                "CollectionAPI",
                ::openusd::usd::SchemaKind::MultipleApplyApi,
            )
            .bases(&["APISchemaBase"])
            .property_namespace_prefix("collection")
            .properties(
                &[
                    ::openusd::usd::PropertyDecl::attribute(
                            "collection:__INSTANCE_NAME__:expansionRule",
                            "token",
                        )
                        .uniform()
                        .fields(
                            &[
                                ::openusd::usd::Field::strings(
                                    "allowedTokens",
                                    &["explicitOnly", "expandPrims", "expandPrimsAndProperties"],
                                ),
                                ::openusd::usd::Field::token("default", "expandPrims"),
                            ],
                        ),
                    ::openusd::usd::PropertyDecl::attribute(
                            "collection:__INSTANCE_NAME__:includeRoot",
                            "bool",
                        )
                        .uniform(),
                    ::openusd::usd::PropertyDecl::relationship(
                            "collection:__INSTANCE_NAME__:includes",
                        )
                        .uniform(),
                    ::openusd::usd::PropertyDecl::relationship(
                            "collection:__INSTANCE_NAME__:excludes",
                        )
                        .uniform(),
                    ::openusd::usd::PropertyDecl::attribute(
                            "collection:__INSTANCE_NAME__:membershipExpression",
                            "pathExpression",
                        )
                        .uniform(),
                    ::openusd::usd::PropertyDecl::attribute(
                            "collection:__INSTANCE_NAME__:mode",
                            "token",
                        )
                        .uniform()
                        .fields(
                            &[
                                ::openusd::usd::Field::strings(
                                    "allowedTokens",
                                    &["automatic", "relationship", "expression"],
                                ),
                                ::openusd::usd::Field::token("default", "automatic"),
                            ],
                        ),
                    ::openusd::usd::PropertyDecl::attribute(
                            "collection:__INSTANCE_NAME__",
                            "opaque",
                        )
                        .uniform(),
                ],
            ),
        ::openusd::usd::SchemaDecl::new(
                "ClipsAPI",
                ::openusd::usd::SchemaKind::NonAppliedApi,
            )
            .bases(&["APISchemaBase"]),
    ],
);

/// [`ModelAPI`] is an API schema that provides an interface to a prim's
/// model qualities, if it does, in fact, represent the root prim of a model.
///
/// The first and foremost model quality is its *kind*, i.e. the metadata
/// that establishes it as a model (See `KindRegistry`).  [`ModelAPI`] provides
/// various methods for setting and querying the prim's kind, as well as
/// queries (also available on `UsdPrim`) for asking what category of model
/// the prim is.  See Kind and Model-ness.
///
/// [`ModelAPI`] also provides access to a prim's `assetInfo`
/// data.  While any prim *can* host `assetInfo`, it is common that published
/// (referenced) assets are packaged as models, therefore it is convenient
/// to provide access to the one from the other.
///
/// Todo: establish an `_IsCompatible()` override that returns `IsModel()`
/// Todo: `GetModelInstanceName()`
pub trait ModelAPISchema: ::openusd::usd::APISchemaBase {}

/// [`ModelAPI`] is an API schema that provides an interface to a prim's
/// model qualities, if it does, in fact, represent the root prim of a model.
///
/// The first and foremost model quality is its *kind*, i.e. the metadata
/// that establishes it as a model (See `KindRegistry`).  [`ModelAPI`] provides
/// various methods for setting and querying the prim's kind, as well as
/// queries (also available on `UsdPrim`) for asking what category of model
/// the prim is.  See Kind and Model-ness.
///
/// [`ModelAPI`] also provides access to a prim's `assetInfo`
/// data.  While any prim *can* host `assetInfo`, it is common that published
/// (referenced) assets are packaged as models, therefore it is convenient
/// to provide access to the one from the other.
///
/// Todo: establish an `_IsCompatible()` override that returns `IsModel()`
/// Todo: `GetModelInstanceName()`
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct ModelAPI(::openusd::usd::Prim);

impl ModelAPI {
    /// Views `prim` as this schema, which any prim can be viewed as.
    ///
    /// Unchecked of the schema, not of memory: nothing here is
    /// `unsafe`. This schema is applied to no prim and names no prim
    /// type, so there is nothing to ask about one — which is why it has
    /// no constructor that asks.
    pub fn from_prim_unchecked(prim: ::openusd::usd::Prim) -> Self {
        Self(prim)
    }
}

impl ::openusd::usd::SchemaBase for ModelAPI {
    const KIND: ::openusd::usd::SchemaKind = ::openusd::usd::SchemaKind::NonAppliedApi;
    fn prim(&self) -> &::openusd::usd::Prim {
        &self.0
    }
}

impl ::std::ops::Deref for ModelAPI {
    type Target = ::openusd::usd::Prim;
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}

impl ModelAPISchema for ModelAPI {}

impl ::openusd::usd::APISchemaBase for ModelAPI {}

/// [`ColorSpaceAPI`] is an API schema that introduces a `colorSpace`
/// property for authoring scene referred color space opinions. It also provides
/// a mechanism to determine the applicable color space within a scope through
/// inheritance. Accordingly, this schema may be applied to any prim to
/// introduce a color space at any point in a compositional hierarchy.
///
/// Color space resolution involves determining the color space authored on an
/// attribute by first examining the attribute itself for a color space which
/// may have been authored via `UsdAttribute::SetColorSpace()`. If none is
/// found,
/// the attribute's prim is checked for the existence of the `UsdColorSpaceAPI`,
/// and any color space authored there. If none is found on the attribute's
/// prim, the prim's ancestors are examined up the hierarchy until an authored
/// color space is found. If no color space is found, an empty `TfToken` is
/// returned. When no color space is found, the default color space is linear,
/// with Rec709 primaries and D65 white point, corresponding to the
/// `GfColorSpace`
/// token `LinearRec709`.
///
/// For a list of built in color space token values, see `GfColorSpaceNames`.
///
/// Use a pattern like this when determining an attribute's resolved color
/// space:
///
/// ```text
/// TfToken attrCs = attr.GetColorSpace();
/// if (!attrCs.IsEmpty()) {
///     return attrCs;
/// }
/// auto csAPI = UsdColorSpaceAPI(attr.GetPrim());
/// return UsdColorSpaceAPI::ComputeColorSpaceName(attr);
/// ```
///
///
/// `GfColorSpace` and its associated utilities can be used to perform color
/// transformations; some examples:
///
/// ```text
/// srcSpace = GfColorSpace(ComputeColorSpaceName(attr))
/// targetSpace = GfColorSpace(targetSpaceName)
/// targetColor = srcSpace.Convert(targetSpace, srcColor)
/// srcSpace.ConvertRGBSpan(targetSpace, colorSpan)
/// ```
///
///
/// It is recommended that in situations where performance is a concern, an
/// application should perform conversions infrequently and cache results
/// wherever possible.
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct ColorSpaceAPI(::openusd::usd::Prim);

impl ColorSpaceAPI {
    /// Views `prim` as this schema whether or not it carries it.
    ///
    /// Unchecked of the schema, not of memory: nothing here is
    /// `unsafe`, and a prim that does not carry this schema simply
    /// answers nothing for the properties it declares.
    /// [`from_prim`](Self::from_prim) is the constructor that asks.
    pub fn from_prim_unchecked(prim: ::openusd::usd::Prim) -> Self {
        Self(prim)
    }
    /// Applies the schema to `prim` and views it.
    pub fn apply(prim: &::openusd::usd::Prim) -> ::openusd::Result<Self> {
        ::std::result::Result::Ok(Self(prim.clone().apply_api(tokens::COLOR_SPACE_API)?))
    }
    /// Whether the schema may be applied to `prim`.
    pub fn can_apply(
        prim: &::openusd::usd::Prim,
    ) -> ::std::result::Result<(), ::openusd::usd::ApplyApiError> {
        prim.can_apply_api(tokens::COLOR_SPACE_API)
    }
    /// Views `prim` as this schema, or `None` where it does not carry
    /// it.
    pub fn from_prim(
        prim: ::openusd::usd::Prim,
    ) -> ::openusd::Result<::std::option::Option<Self>> {
        ::std::result::Result::Ok(
            prim.has_api_schema(tokens::COLOR_SPACE_API)?.then_some(Self(prim)),
        )
    }
    /// Views the prim at `path` as this schema, or `None` where it does
    /// not carry it — [`from_prim`](Self::from_prim) over the prim
    /// `path` names.
    pub fn get(
        stage: &::openusd::usd::Stage,
        path: impl ::openusd::sdf::IntoPath,
    ) -> ::openusd::Result<::std::option::Option<Self>> {
        Self::from_prim(stage.prim(path)?)
    }
    /// The color space that applies to attributes with
    /// unauthored color spaces on this prim and its descendents.
    ///
    /// Declared `uniform token colorSpace:name`.
    pub fn color_space_name_attr(&self) -> ::openusd::usd::Attribute {
        self.attribute(tokens::COLOR_SPACE_NAME)
    }
    /// The property's value at the default time, as the type it is
    /// declared with: what a layer authors, else the fallback the
    /// schema declares.
    pub fn color_space_name(
        &self,
    ) -> ::openusd::Result<::std::option::Option<::openusd::tf::Token>> {
        self.color_space_name_attr().get::<::openusd::tf::Token>()
    }
    /// The property's declaration, unauthored. Give it a value and
    /// `build` it to author both as one edit; `build` it alone for the
    /// declaration by itself.
    pub fn color_space_name_attr_builder(
        &self,
    ) -> ::openusd::usd::AttributeBuilder<'static> {
        self.attribute_builder(
                tokens::COLOR_SPACE_NAME,
                ::openusd::sdf::ValueTypeName::TOKEN,
            )
            .custom(false)
            .variability(::openusd::sdf::Variability::Uniform)
    }
    /// Authors the property as the schema declares it, and returns it.
    pub fn create_color_space_name_attr(
        &self,
    ) -> ::openusd::Result<::openusd::usd::Attribute> {
        ::std::result::Result::Ok(self.color_space_name_attr_builder().build()?)
    }
}

impl ::openusd::usd::SchemaBase for ColorSpaceAPI {
    const KIND: ::openusd::usd::SchemaKind = ::openusd::usd::SchemaKind::SingleApplyApi;
    fn prim(&self) -> &::openusd::usd::Prim {
        &self.0
    }
}

impl ::std::ops::Deref for ColorSpaceAPI {
    type Target = ::openusd::usd::Prim;
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}

impl ::openusd::usd::APISchemaBase for ColorSpaceAPI {}

/// [`ColorSpaceDefinitionAPI`] is an API schema for defining a custom
/// color space. Custom color spaces become available for use on prims or for
/// assignment to attributes via the colorSpace:name property on prims that have
/// applied `UsdColorSpaceAPI`. Since color spaces inherit hierarchically, a
/// custom color space defined on a prim will be available to all descendants of
/// that prim, unless overridden by a more local color space definition bearing
/// the same name. Locally redefining color spaces within the same layer could
/// be confusing, so that practice is discouraged.
///
/// The default color space values are equivalent to an identity transform, so
/// applying this schema and invoking `UsdColorSpaceAPI::ComputeColorSpace()`
/// on a prim resolving to a defaulted color definition will return a color
/// space equivalent to the identity transform.
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct ColorSpaceDefinitionAPI {
    prim: ::openusd::usd::Prim,
    name: ::openusd::tf::Token,
}

impl ColorSpaceDefinitionAPI {
    /// Views `prim` as this schema applied under `name`, whether or not
    /// it is.
    ///
    /// Unchecked of the schema, not of memory: nothing here is
    /// `unsafe`, and a prim that does not carry this schema under this
    /// name simply answers nothing for the properties it declares.
    /// [`get_instance`](Self::get_instance) is the constructor that
    /// asks.
    pub fn from_prim_unchecked(
        prim: ::openusd::usd::Prim,
        name: impl ::std::convert::Into<::openusd::tf::Token>,
    ) -> Self {
        Self { prim, name: name.into() }
    }
    /// The instance name this view reads its properties under.
    pub fn name(&self) -> &::openusd::tf::Token {
        &self.name
    }
    /// Applies the schema to `prim` under `name` and views it.
    pub fn apply(
        prim: &::openusd::usd::Prim,
        name: impl ::std::convert::Into<::openusd::tf::Token>,
    ) -> ::openusd::Result<Self> {
        let name = name.into();
        let applied = ::openusd::usd::SchemaRegistry::make_applied_name(
            tokens::COLOR_SPACE_DEFINITION_API,
            name.as_str(),
        );
        ::std::result::Result::Ok(
            Self::from_prim_unchecked(prim.clone().apply_api(applied)?, name),
        )
    }
    /// Views `prim` as this schema applied under `name`, or `None`
    /// where it does not carry it.
    pub fn get_instance(
        prim: &::openusd::usd::Prim,
        name: impl ::std::convert::Into<::openusd::tf::Token>,
    ) -> ::openusd::Result<::std::option::Option<Self>> {
        let name = name.into();
        let applied = ::openusd::usd::SchemaRegistry::make_applied_name(
            tokens::COLOR_SPACE_DEFINITION_API,
            name.as_str(),
        );
        let carried = prim.has_api_schema(applied)?;
        ::std::result::Result::Ok(
            carried.then(|| Self::from_prim_unchecked(prim.clone(), name)),
        )
    }
    /// Whether the schema may be applied to `prim` under `name`.
    pub fn can_apply(
        prim: &::openusd::usd::Prim,
        name: &str,
    ) -> ::std::result::Result<(), ::openusd::usd::ApplyApiError> {
        prim.can_apply_api(
            ::openusd::usd::SchemaRegistry::make_applied_name(
                tokens::COLOR_SPACE_DEFINITION_API,
                name,
            ),
        )
    }
    /// Every instance of this schema applied to `prim`.
    pub fn get_all(
        prim: &::openusd::usd::Prim,
    ) -> ::openusd::Result<::std::vec::Vec<Self>> {
        prim.api_schema_instance_names(tokens::COLOR_SPACE_DEFINITION_API)
            .map(|names| {
                names
                    .into_iter()
                    .map(|name| Self::from_prim_unchecked(prim.clone(), name))
                    .collect()
            })
    }
    /// Whether `base_name` is one of the property names this schema
    /// declares, which an instance name may therefore not end with.
    pub fn is_schema_property_base_name(base_name: &str) -> bool {
        ::std::matches!(
            base_name, "name" | "redChroma" | "greenChroma" | "blueChroma" | "whitePoint"
            | "gamma" | "linearBias"
        )
    }
    /// The prim and instance name a property path of this schema names,
    /// or `None` where `path` names no instance of it.
    ///
    /// The identity property is what this recognises: a path reaching a
    /// property the schema declares belongs to an instance, but does not
    /// name one.
    pub fn instance_at_path(
        path: &::openusd::sdf::Path,
    ) -> ::std::option::Option<(::openusd::sdf::Path, ::openusd::tf::Token)> {
        let (prim, property) = path.split_property()?;
        if !property.split(':').all(::openusd::sdf::Path::is_valid_identifier) {
            return ::std::option::Option::None;
        }
        let instance = property.strip_prefix("colorSpaceDefinition")?.strip_prefix(':')?;
        let base_name = instance.rsplit(':').next()?;
        match Self::is_schema_property_base_name(base_name) {
            true => ::std::option::Option::None,
            false => {
                ::std::option::Option::Some((prim, ::openusd::tf::Token::from(instance)))
            }
        }
    }
    /// The name of the color space defined on this prim.
    ///
    /// Declared `uniform token colorSpaceDefinition:__INSTANCE_NAME__:name =
    /// "custom"`.
    pub fn name_attr(&self) -> ::openusd::usd::Attribute {
        self.attribute(
            ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                tokens::COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_NAME,
                self.name.as_str(),
            ),
        )
    }
    /// The property's declaration, unauthored. Give it a value and
    /// `build` it to author both as one edit; `build` it alone for the
    /// declaration by itself.
    pub fn name_attr_builder(&self) -> ::openusd::usd::AttributeBuilder<'static> {
        self.attribute_builder(
                ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                    tokens::COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_NAME,
                    self.name.as_str(),
                ),
                ::openusd::sdf::ValueTypeName::TOKEN,
            )
            .custom(false)
            .variability(::openusd::sdf::Variability::Uniform)
    }
    /// Authors the property as the schema declares it, and returns it.
    pub fn create_name_attr(&self) -> ::openusd::Result<::openusd::usd::Attribute> {
        ::std::result::Result::Ok(self.name_attr_builder().build()?)
    }
    /// Red chromaticity coordinates
    ///
    /// Declared `float2 colorSpaceDefinition:__INSTANCE_NAME__:redChroma = (1.0,
    /// 0.0)`.
    pub fn red_chroma_attr(&self) -> ::openusd::usd::Attribute {
        self.attribute(
            ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                tokens::COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_RED_CHROMA,
                self.name.as_str(),
            ),
        )
    }
    /// The property's value at the default time, as the type it is
    /// declared with: what a layer authors, else the fallback the
    /// schema declares.
    pub fn red_chroma(
        &self,
    ) -> ::openusd::Result<::std::option::Option<::openusd::gf::Vec2f>> {
        self.red_chroma_attr().get::<::openusd::gf::Vec2f>()
    }
    /// The property's value at `time`, where `None` is the
    /// default time, as the type it is declared with: what a
    /// layer authors there, else the fallback the schema
    /// declares.
    pub fn red_chroma_at(
        &self,
        time: impl ::std::convert::Into<::std::option::Option<::openusd::usd::TimeCode>>,
    ) -> ::openusd::Result<::std::option::Option<::openusd::gf::Vec2f>> {
        self.red_chroma_attr().get_at::<::openusd::gf::Vec2f>(time)
    }
    /// The property's declaration, unauthored. Give it a value and
    /// `build` it to author both as one edit; `build` it alone for the
    /// declaration by itself.
    pub fn red_chroma_attr_builder(&self) -> ::openusd::usd::AttributeBuilder<'static> {
        self.attribute_builder(
                ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                    tokens::COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_RED_CHROMA,
                    self.name.as_str(),
                ),
                ::openusd::sdf::ValueTypeName::FLOAT2,
            )
            .custom(false)
    }
    /// Authors the property as the schema declares it, and returns it.
    pub fn create_red_chroma_attr(
        &self,
    ) -> ::openusd::Result<::openusd::usd::Attribute> {
        ::std::result::Result::Ok(self.red_chroma_attr_builder().build()?)
    }
    /// Green chromaticity coordinates
    ///
    /// Declared `float2 colorSpaceDefinition:__INSTANCE_NAME__:greenChroma = (0.0,
    /// 1.0)`.
    pub fn green_chroma_attr(&self) -> ::openusd::usd::Attribute {
        self.attribute(
            ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                tokens::COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_GREEN_CHROMA,
                self.name.as_str(),
            ),
        )
    }
    /// The property's value at the default time, as the type it is
    /// declared with: what a layer authors, else the fallback the
    /// schema declares.
    pub fn green_chroma(
        &self,
    ) -> ::openusd::Result<::std::option::Option<::openusd::gf::Vec2f>> {
        self.green_chroma_attr().get::<::openusd::gf::Vec2f>()
    }
    /// The property's value at `time`, where `None` is the
    /// default time, as the type it is declared with: what a
    /// layer authors there, else the fallback the schema
    /// declares.
    pub fn green_chroma_at(
        &self,
        time: impl ::std::convert::Into<::std::option::Option<::openusd::usd::TimeCode>>,
    ) -> ::openusd::Result<::std::option::Option<::openusd::gf::Vec2f>> {
        self.green_chroma_attr().get_at::<::openusd::gf::Vec2f>(time)
    }
    /// The property's declaration, unauthored. Give it a value and
    /// `build` it to author both as one edit; `build` it alone for the
    /// declaration by itself.
    pub fn green_chroma_attr_builder(
        &self,
    ) -> ::openusd::usd::AttributeBuilder<'static> {
        self.attribute_builder(
                ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                    tokens::COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_GREEN_CHROMA,
                    self.name.as_str(),
                ),
                ::openusd::sdf::ValueTypeName::FLOAT2,
            )
            .custom(false)
    }
    /// Authors the property as the schema declares it, and returns it.
    pub fn create_green_chroma_attr(
        &self,
    ) -> ::openusd::Result<::openusd::usd::Attribute> {
        ::std::result::Result::Ok(self.green_chroma_attr_builder().build()?)
    }
    /// Blue chromaticity coordinates
    ///
    /// Declared `float2 colorSpaceDefinition:__INSTANCE_NAME__:blueChroma = (0.0,
    /// 0.0)`.
    pub fn blue_chroma_attr(&self) -> ::openusd::usd::Attribute {
        self.attribute(
            ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                tokens::COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_BLUE_CHROMA,
                self.name.as_str(),
            ),
        )
    }
    /// The property's value at the default time, as the type it is
    /// declared with: what a layer authors, else the fallback the
    /// schema declares.
    pub fn blue_chroma(
        &self,
    ) -> ::openusd::Result<::std::option::Option<::openusd::gf::Vec2f>> {
        self.blue_chroma_attr().get::<::openusd::gf::Vec2f>()
    }
    /// The property's value at `time`, where `None` is the
    /// default time, as the type it is declared with: what a
    /// layer authors there, else the fallback the schema
    /// declares.
    pub fn blue_chroma_at(
        &self,
        time: impl ::std::convert::Into<::std::option::Option<::openusd::usd::TimeCode>>,
    ) -> ::openusd::Result<::std::option::Option<::openusd::gf::Vec2f>> {
        self.blue_chroma_attr().get_at::<::openusd::gf::Vec2f>(time)
    }
    /// The property's declaration, unauthored. Give it a value and
    /// `build` it to author both as one edit; `build` it alone for the
    /// declaration by itself.
    pub fn blue_chroma_attr_builder(&self) -> ::openusd::usd::AttributeBuilder<'static> {
        self.attribute_builder(
                ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                    tokens::COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_BLUE_CHROMA,
                    self.name.as_str(),
                ),
                ::openusd::sdf::ValueTypeName::FLOAT2,
            )
            .custom(false)
    }
    /// Authors the property as the schema declares it, and returns it.
    pub fn create_blue_chroma_attr(
        &self,
    ) -> ::openusd::Result<::openusd::usd::Attribute> {
        ::std::result::Result::Ok(self.blue_chroma_attr_builder().build()?)
    }
    /// Whitepoint chromaticity coordinates
    ///
    /// Declared `float2 colorSpaceDefinition:__INSTANCE_NAME__:whitePoint =
    /// (0.3333333432674408, 0.3333333432674408)`.
    pub fn white_point_attr(&self) -> ::openusd::usd::Attribute {
        self.attribute(
            ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                tokens::COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_WHITE_POINT,
                self.name.as_str(),
            ),
        )
    }
    /// The property's value at the default time, as the type it is
    /// declared with: what a layer authors, else the fallback the
    /// schema declares.
    pub fn white_point(
        &self,
    ) -> ::openusd::Result<::std::option::Option<::openusd::gf::Vec2f>> {
        self.white_point_attr().get::<::openusd::gf::Vec2f>()
    }
    /// The property's value at `time`, where `None` is the
    /// default time, as the type it is declared with: what a
    /// layer authors there, else the fallback the schema
    /// declares.
    pub fn white_point_at(
        &self,
        time: impl ::std::convert::Into<::std::option::Option<::openusd::usd::TimeCode>>,
    ) -> ::openusd::Result<::std::option::Option<::openusd::gf::Vec2f>> {
        self.white_point_attr().get_at::<::openusd::gf::Vec2f>(time)
    }
    /// The property's declaration, unauthored. Give it a value and
    /// `build` it to author both as one edit; `build` it alone for the
    /// declaration by itself.
    pub fn white_point_attr_builder(&self) -> ::openusd::usd::AttributeBuilder<'static> {
        self.attribute_builder(
                ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                    tokens::COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_WHITE_POINT,
                    self.name.as_str(),
                ),
                ::openusd::sdf::ValueTypeName::FLOAT2,
            )
            .custom(false)
    }
    /// Authors the property as the schema declares it, and returns it.
    pub fn create_white_point_attr(
        &self,
    ) -> ::openusd::Result<::openusd::usd::Attribute> {
        ::std::result::Result::Ok(self.white_point_attr_builder().build()?)
    }
    /// Gamma value of the log section
    ///
    /// Declared `float colorSpaceDefinition:__INSTANCE_NAME__:gamma = 1.0`.
    pub fn gamma_attr(&self) -> ::openusd::usd::Attribute {
        self.attribute(
            ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                tokens::COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_GAMMA,
                self.name.as_str(),
            ),
        )
    }
    /// The property's value at the default time, as the type it is
    /// declared with: what a layer authors, else the fallback the
    /// schema declares.
    pub fn gamma(&self) -> ::openusd::Result<::std::option::Option<f32>> {
        self.gamma_attr().get::<f32>()
    }
    /// The property's value at `time`, where `None` is the
    /// default time, as the type it is declared with: what a
    /// layer authors there, else the fallback the schema
    /// declares.
    pub fn gamma_at(
        &self,
        time: impl ::std::convert::Into<::std::option::Option<::openusd::usd::TimeCode>>,
    ) -> ::openusd::Result<::std::option::Option<f32>> {
        self.gamma_attr().get_at::<f32>(time)
    }
    /// The property's declaration, unauthored. Give it a value and
    /// `build` it to author both as one edit; `build` it alone for the
    /// declaration by itself.
    pub fn gamma_attr_builder(&self) -> ::openusd::usd::AttributeBuilder<'static> {
        self.attribute_builder(
                ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                    tokens::COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_GAMMA,
                    self.name.as_str(),
                ),
                ::openusd::sdf::ValueTypeName::FLOAT,
            )
            .custom(false)
    }
    /// Authors the property as the schema declares it, and returns it.
    pub fn create_gamma_attr(&self) -> ::openusd::Result<::openusd::usd::Attribute> {
        ::std::result::Result::Ok(self.gamma_attr_builder().build()?)
    }
    /// Linear bias of the log section
    ///
    /// Declared `float colorSpaceDefinition:__INSTANCE_NAME__:linearBias = 0.0`.
    pub fn linear_bias_attr(&self) -> ::openusd::usd::Attribute {
        self.attribute(
            ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                tokens::COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_LINEAR_BIAS,
                self.name.as_str(),
            ),
        )
    }
    /// The property's value at the default time, as the type it is
    /// declared with: what a layer authors, else the fallback the
    /// schema declares.
    pub fn linear_bias(&self) -> ::openusd::Result<::std::option::Option<f32>> {
        self.linear_bias_attr().get::<f32>()
    }
    /// The property's value at `time`, where `None` is the
    /// default time, as the type it is declared with: what a
    /// layer authors there, else the fallback the schema
    /// declares.
    pub fn linear_bias_at(
        &self,
        time: impl ::std::convert::Into<::std::option::Option<::openusd::usd::TimeCode>>,
    ) -> ::openusd::Result<::std::option::Option<f32>> {
        self.linear_bias_attr().get_at::<f32>(time)
    }
    /// The property's declaration, unauthored. Give it a value and
    /// `build` it to author both as one edit; `build` it alone for the
    /// declaration by itself.
    pub fn linear_bias_attr_builder(&self) -> ::openusd::usd::AttributeBuilder<'static> {
        self.attribute_builder(
                ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                    tokens::COLOR_SPACE_DEFINITION_MULTIPLE_APPLY_TEMPLATE_LINEAR_BIAS,
                    self.name.as_str(),
                ),
                ::openusd::sdf::ValueTypeName::FLOAT,
            )
            .custom(false)
    }
    /// Authors the property as the schema declares it, and returns it.
    pub fn create_linear_bias_attr(
        &self,
    ) -> ::openusd::Result<::openusd::usd::Attribute> {
        ::std::result::Result::Ok(self.linear_bias_attr_builder().build()?)
    }
}

impl ::openusd::usd::SchemaBase for ColorSpaceDefinitionAPI {
    const KIND: ::openusd::usd::SchemaKind = ::openusd::usd::SchemaKind::MultipleApplyApi;
    fn prim(&self) -> &::openusd::usd::Prim {
        &self.prim
    }
}

impl ::std::ops::Deref for ColorSpaceDefinitionAPI {
    type Target = ::openusd::usd::Prim;
    fn deref(&self) -> &Self::Target {
        &self.prim
    }
}

impl ::openusd::usd::APISchemaBase for ColorSpaceDefinitionAPI {}

/// A general purpose API schema used to describe a collection of prims
/// and properties within a scene. This API schema can be applied to a prim
/// multiple times with different instance names to define several collections
/// on a single prim.
///
/// A collection's membership is specified one of two ways. The first way uses
/// the built-in relationships `includes` and `excludes`, and the attribute
/// `includeRoot` to determine membership. The second way is termed a
/// pattern-based collection, and uses the built-in attribute
/// `membershipExpression` to determine membership. Here we will refer to
/// collections using `includes`, `excludes` and `includeRoot` as being in
/// *relationship-mode* and those using the `membershipExpression` as being in
/// *expression-mode*.
///
/// The `mode` attribute controls which mode the collection uses.  When set to
/// `relationship` the collection is explicitly in *relationship-mode*, and when
/// set to `expression` it is explicitly in *expression-mode*.  Properties
/// belonging to the non-selected mode are ignored.  When `mode` is `automatic`
/// (the default), the mode is inferred from the collection's authored
/// properties: the collection is in *relationship-mode* when either or both of
/// its `includes` and `excludes` relationships have valid targets, or the
/// `includeRoot` attribute is set to `true`; otherwise it is in
/// *expression-mode* and the `membershipExpression` attribute applies.
///
/// In *relationship-mode* the `includes` and `excludes` relationships specify
/// the collection members as a set of paths to include and a set of paths to
/// exclude.  Whether or not the descendants of an included path belong to a
/// collection is decided by its expansion rule (see below).  If the collection
/// excludes paths that are not descendent to included paths, the collection
/// implicitly includes the root path `</>`.  If such a collection also
/// includes paths that are not descendent to the excluded paths, it is
/// considered invalid since the intent is ambiguous.
///
/// In *expression-mode*, the pattern-based `membershipExpression` attribute is
/// used with the `expansionRule` attribute to determine collection membership.
/// See the detailed descriptions of the built-in properties below for more
/// details.
///
/// # Collection API Properties
///
/// The built-in properties for this schema are in the `collection:instanceName`
/// namespace, where `instanceName` is the user-provided applied API schema
/// instance name.
///
///
/// - `uniform token collection:instanceName:expansionRule` - in
///   *relationship-mode*, specifies how to expand the `includes` and
///   `excludes` relationship targets to determine the collection's members.
///   In *expression-mode*, specifies how matching scene objects against the
///   `membershipExpression` proceeds. Possible values include:
///
///     - `expandPrims` - in *relationship-mode*, all the prims descendent
///       to the `includes` relationship targets (and not descendent
///       to `excludes` relationship targets) belong to the collection.
///       Any `includes`-targeted property paths also belong to the
///       collection. This is the default behavior. In *expression-mode*,
///       the functions `UsdComputeIncludedObjectsFromCollection()` and
///       `UsdComputeIncludedPathsFromCollection()` only test prims against the
///       `membershipExpression` to determine membership.
///
///     - `expandPrimsAndProperties` - like `expandPrims`, but in
///       *relationship-mode*, all properties on all included prims
///       also belong to the collection. In *expression-mode*, the
///       functions `UsdComputeIncludedObjectsFromCollection()` and
///       `UsdComputeIncludedPathsFromCollection()` test both prims and
///       properties against the `membershipExpression` to determine membership.
///
///     - `explicitOnly` - in *relationship-mode*, only paths in the
///       `includes` relationship targets and not those in the `excludes`
///       relationship targets belong to the collection. Does not
///       apply to *expression-mode*. If set in *expression-mode*, the
///       functions `UsdComputeIncludedObjectsFromCollection()` and
///       `UsdComputeIncludedPathsFromCollection()` return no results.
///
///
///
///
/// - `bool collection:instanceName:includeRoot` - boolean attribute indicating
///   whether the pseudo-root path `</>` should be counted as one of the
///   included target paths in *relationship-mode*. This separate attribute
///   is required because relationships cannot directly target the root.
///   When `expansionRule` is `explicitOnly`, this attribute is ignored.
///   The fallback value is false. When set to `true`, this collection is in
///   *relationship-mode*. This attribute is ignored in *expression-mode*.
///
/// - `rel collection:instanceName:includes` - in *relationship-mode*,
///   specifies a list of targets that are included in the collection. This
///   can target prims or properties directly. A collection can insert the
///   rules of another collection by making its `includes` relationship target
///   the `collection:otherInstanceName` property from the collection to be
///   included (see [`collection_attr`](CollectionAPI::collection_attr)). Note
///   that including another collection does not guarantee the contents of that
///   collection will be in the final collection; instead, the rules are merged.
///   This means, for example, an exclude entry may exclude a portion of the
///   included collection. When a collection includes one or more collections,
///   the order in which targets are added to the includes relationship may
///   become significant, if there are conflicting opinions about the same
///   path. Targets that are added later are considered to be stronger than
///   earlier targets for the same path. This relationship is ignored in
///   *expression-mode*.
///
/// - `rel collection:instanceName:excludes` - in *relationship-mode*,
///   specifies a list of targets that are excluded below the **included**
///   paths in this collection. This can target prims or properties
///   directly, but **cannot target another collection**. This is to keep
///   the membership determining logic simple, efficient and easier to
///   reason about. Finally, it is invalid for a collection to exclude paths
///   that are not included in it. The presence of such "orphaned" excluded
///   paths will not affect the set of paths included in the collection,
///   but may affect the performance of querying membership of a path in
///   the collection (see `UsdCollectionMembershipQuery::IsPathIncluded`)
///   or of enumerating the objects belonging to the collection (see
///   `UsdCollectionAPI::ComputeIncludedObjects`). This relationship is ignored
///   in *expression-mode*.
///
/// - `uniform opaque collection:instanceName` - opaque attribute (meaning it
///   can never have a value) that represents the collection for the purpose
///   of allowing another collection to include it in *relationship-mode*. When
///   this property is targeted by another collection's `includes` relationship,
///   the rules of this collection will be inserted into the rules of the
///   collection that includes it.
///
/// - `uniform pathExpression collection:instanceName:membershipExpression` -
///   in *expression-mode*, defines the `SdfPathExpression` used to test objects
///   for collection membership.
///
///
///
/// ## Implicit Inclusion
///
/// In some scenarios it is useful to express a collection that includes
/// everything except certain paths.  To support this, a *relationship-mode*
/// collection that has an exclude that is not descendent to any include will
/// include the root path `</>`.
///
/// # Creating Collections in C++
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CollectionAPI {
    prim: ::openusd::usd::Prim,
    name: ::openusd::tf::Token,
}

impl CollectionAPI {
    /// Views `prim` as this schema applied under `name`, whether or not
    /// it is.
    ///
    /// Unchecked of the schema, not of memory: nothing here is
    /// `unsafe`, and a prim that does not carry this schema under this
    /// name simply answers nothing for the properties it declares.
    /// [`get_instance`](Self::get_instance) is the constructor that
    /// asks.
    pub fn from_prim_unchecked(
        prim: ::openusd::usd::Prim,
        name: impl ::std::convert::Into<::openusd::tf::Token>,
    ) -> Self {
        Self { prim, name: name.into() }
    }
    /// The instance name this view reads its properties under.
    pub fn name(&self) -> &::openusd::tf::Token {
        &self.name
    }
    /// Applies the schema to `prim` under `name` and views it.
    pub fn apply(
        prim: &::openusd::usd::Prim,
        name: impl ::std::convert::Into<::openusd::tf::Token>,
    ) -> ::openusd::Result<Self> {
        let name = name.into();
        let applied = ::openusd::usd::SchemaRegistry::make_applied_name(
            tokens::COLLECTION_API,
            name.as_str(),
        );
        ::std::result::Result::Ok(
            Self::from_prim_unchecked(prim.clone().apply_api(applied)?, name),
        )
    }
    /// Views `prim` as this schema applied under `name`, or `None`
    /// where it does not carry it.
    pub fn get_instance(
        prim: &::openusd::usd::Prim,
        name: impl ::std::convert::Into<::openusd::tf::Token>,
    ) -> ::openusd::Result<::std::option::Option<Self>> {
        let name = name.into();
        let applied = ::openusd::usd::SchemaRegistry::make_applied_name(
            tokens::COLLECTION_API,
            name.as_str(),
        );
        let carried = prim.has_api_schema(applied)?;
        ::std::result::Result::Ok(
            carried.then(|| Self::from_prim_unchecked(prim.clone(), name)),
        )
    }
    /// Whether the schema may be applied to `prim` under `name`.
    pub fn can_apply(
        prim: &::openusd::usd::Prim,
        name: &str,
    ) -> ::std::result::Result<(), ::openusd::usd::ApplyApiError> {
        prim.can_apply_api(
            ::openusd::usd::SchemaRegistry::make_applied_name(
                tokens::COLLECTION_API,
                name,
            ),
        )
    }
    /// Every instance of this schema applied to `prim`.
    pub fn get_all(
        prim: &::openusd::usd::Prim,
    ) -> ::openusd::Result<::std::vec::Vec<Self>> {
        prim.api_schema_instance_names(tokens::COLLECTION_API)
            .map(|names| {
                names
                    .into_iter()
                    .map(|name| Self::from_prim_unchecked(prim.clone(), name))
                    .collect()
            })
    }
    /// Whether `base_name` is one of the property names this schema
    /// declares, which an instance name may therefore not end with.
    pub fn is_schema_property_base_name(base_name: &str) -> bool {
        ::std::matches!(
            base_name, "expansionRule" | "includeRoot" | "includes" | "excludes" |
            "membershipExpression" | "mode" | ""
        )
    }
    /// The prim and instance name a property path of this schema names,
    /// or `None` where `path` names no instance of it.
    ///
    /// The identity property is what this recognises: a path reaching a
    /// property the schema declares belongs to an instance, but does not
    /// name one.
    pub fn instance_at_path(
        path: &::openusd::sdf::Path,
    ) -> ::std::option::Option<(::openusd::sdf::Path, ::openusd::tf::Token)> {
        let (prim, property) = path.split_property()?;
        if !property.split(':').all(::openusd::sdf::Path::is_valid_identifier) {
            return ::std::option::Option::None;
        }
        let instance = property.strip_prefix("collection")?.strip_prefix(':')?;
        let base_name = instance.rsplit(':').next()?;
        match Self::is_schema_property_base_name(base_name) {
            true => ::std::option::Option::None,
            false => {
                ::std::option::Option::Some((prim, ::openusd::tf::Token::from(instance)))
            }
        }
    }
    /// Specifies how the paths that are included in
    /// the collection must be expanded to determine its members.
    ///
    /// Declared `uniform token collection:__INSTANCE_NAME__:expansionRule
    /// = "expandPrims"`. One of `explicitOnly`, `expandPrims`,
    /// `expandPrimsAndProperties`.
    pub fn expansion_rule_attr(&self) -> ::openusd::usd::Attribute {
        self.attribute(
            ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                tokens::COLLECTION_MULTIPLE_APPLY_TEMPLATE_EXPANSION_RULE,
                self.name.as_str(),
            ),
        )
    }
    /// The property's value at the default time, as the type it is
    /// declared with: what a layer authors, else the fallback the
    /// schema declares.
    pub fn expansion_rule(
        &self,
    ) -> ::openusd::Result<::std::option::Option<ExpansionRule>> {
        self.expansion_rule_attr().get::<ExpansionRule>()
    }
    /// The property's declaration, unauthored. Give it a value and
    /// `build` it to author both as one edit; `build` it alone for the
    /// declaration by itself.
    pub fn expansion_rule_attr_builder(
        &self,
    ) -> ::openusd::usd::AttributeBuilder<'static> {
        self.attribute_builder(
                ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                    tokens::COLLECTION_MULTIPLE_APPLY_TEMPLATE_EXPANSION_RULE,
                    self.name.as_str(),
                ),
                ::openusd::sdf::ValueTypeName::TOKEN,
            )
            .custom(false)
            .variability(::openusd::sdf::Variability::Uniform)
    }
    /// Authors the property as the schema declares it, and returns it.
    pub fn create_expansion_rule_attr(
        &self,
    ) -> ::openusd::Result<::openusd::usd::Attribute> {
        ::std::result::Result::Ok(self.expansion_rule_attr_builder().build()?)
    }
    /// Boolean attribute indicating whether the pseudo-root
    /// path `</>` should be counted as one of the included target
    /// paths.  The fallback is false.  This separate attribute is
    /// required because relationships cannot directly target the root.
    ///
    /// Declared `uniform bool collection:__INSTANCE_NAME__:includeRoot`.
    pub fn include_root_attr(&self) -> ::openusd::usd::Attribute {
        self.attribute(
            ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                tokens::COLLECTION_MULTIPLE_APPLY_TEMPLATE_INCLUDE_ROOT,
                self.name.as_str(),
            ),
        )
    }
    /// The property's value at the default time, as the type it is
    /// declared with: what a layer authors, else the fallback the
    /// schema declares.
    pub fn include_root(&self) -> ::openusd::Result<::std::option::Option<bool>> {
        self.include_root_attr().get::<bool>()
    }
    /// The property's declaration, unauthored. Give it a value and
    /// `build` it to author both as one edit; `build` it alone for the
    /// declaration by itself.
    pub fn include_root_attr_builder(
        &self,
    ) -> ::openusd::usd::AttributeBuilder<'static> {
        self.attribute_builder(
                ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                    tokens::COLLECTION_MULTIPLE_APPLY_TEMPLATE_INCLUDE_ROOT,
                    self.name.as_str(),
                ),
                ::openusd::sdf::ValueTypeName::BOOL,
            )
            .custom(false)
            .variability(::openusd::sdf::Variability::Uniform)
    }
    /// Authors the property as the schema declares it, and returns it.
    pub fn create_include_root_attr(
        &self,
    ) -> ::openusd::Result<::openusd::usd::Attribute> {
        ::std::result::Result::Ok(self.include_root_attr_builder().build()?)
    }
    /// Specifies a list of targets that are included in the collection.
    /// This can target prims or properties directly. A collection can insert
    /// the rules of another collection by making its *includes*
    /// relationship target the **collection:{collectionName}** property on
    /// the owning prim of the collection to be included
    ///
    /// Declared `rel collection:__INSTANCE_NAME__:includes`.
    pub fn includes_rel(&self) -> ::openusd::usd::Relationship {
        self.relationship(
            ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                tokens::COLLECTION_MULTIPLE_APPLY_TEMPLATE_INCLUDES,
                self.name.as_str(),
            ),
        )
    }
    /// The property's declaration, unauthored. Give it a value and
    /// `build` it to author both as one edit; `build` it alone for the
    /// declaration by itself.
    pub fn includes_rel_builder(&self) -> ::openusd::usd::RelationshipBuilder<'static> {
        self.relationship_builder(
                ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                    tokens::COLLECTION_MULTIPLE_APPLY_TEMPLATE_INCLUDES,
                    self.name.as_str(),
                ),
            )
            .custom(false)
    }
    /// Authors the property as the schema declares it, and returns it.
    pub fn create_includes_rel(
        &self,
    ) -> ::openusd::Result<::openusd::usd::Relationship> {
        ::std::result::Result::Ok(self.includes_rel_builder().build()?)
    }
    /// Specifies a list of targets that are excluded below
    /// the included paths in this collection. This can target prims or
    /// properties directly, but cannot target another collection. This is to
    /// keep the membership determining logic simple, efficient and easier to
    /// reason about. Finally, it is invalid for a collection to exclude
    /// paths that are not included in it. The presence of such "orphaned"
    /// excluded paths will not affect the set of paths included in the
    /// collection, but may affect the performance of querying membership of
    /// a path in the collection (see
    /// `UsdCollectionAPI::MembershipQuery::IsPathIncluded`)
    /// or of enumerating the objects belonging to the collection (see
    /// `UsdCollectionAPI::GetIncludedObjects`).
    ///
    /// Declared `rel collection:__INSTANCE_NAME__:excludes`.
    pub fn excludes_rel(&self) -> ::openusd::usd::Relationship {
        self.relationship(
            ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                tokens::COLLECTION_MULTIPLE_APPLY_TEMPLATE_EXCLUDES,
                self.name.as_str(),
            ),
        )
    }
    /// The property's declaration, unauthored. Give it a value and
    /// `build` it to author both as one edit; `build` it alone for the
    /// declaration by itself.
    pub fn excludes_rel_builder(&self) -> ::openusd::usd::RelationshipBuilder<'static> {
        self.relationship_builder(
                ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                    tokens::COLLECTION_MULTIPLE_APPLY_TEMPLATE_EXCLUDES,
                    self.name.as_str(),
                ),
            )
            .custom(false)
    }
    /// Authors the property as the schema declares it, and returns it.
    pub fn create_excludes_rel(
        &self,
    ) -> ::openusd::Result<::openusd::usd::Relationship> {
        ::std::result::Result::Ok(self.excludes_rel_builder().build()?)
    }
    /// Specifies a path expression that determines membership in this
    /// collection.
    ///
    /// Declared `uniform pathExpression
    /// collection:__INSTANCE_NAME__:membershipExpression`.
    pub fn membership_expression_attr(&self) -> ::openusd::usd::Attribute {
        self.attribute(
            ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                tokens::COLLECTION_MULTIPLE_APPLY_TEMPLATE_MEMBERSHIP_EXPRESSION,
                self.name.as_str(),
            ),
        )
    }
    /// The property's value at the default time, as the type it is
    /// declared with: what a layer authors, else the fallback the
    /// schema declares.
    pub fn membership_expression(
        &self,
    ) -> ::openusd::Result<::std::option::Option<::openusd::sdf::PathExpression>> {
        self.membership_expression_attr().get::<::openusd::sdf::PathExpression>()
    }
    /// The property's declaration, unauthored. Give it a value and
    /// `build` it to author both as one edit; `build` it alone for the
    /// declaration by itself.
    pub fn membership_expression_attr_builder(
        &self,
    ) -> ::openusd::usd::AttributeBuilder<'static> {
        self.attribute_builder(
                ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                    tokens::COLLECTION_MULTIPLE_APPLY_TEMPLATE_MEMBERSHIP_EXPRESSION,
                    self.name.as_str(),
                ),
                ::openusd::sdf::ValueTypeName::PATH_EXPRESSION,
            )
            .custom(false)
            .variability(::openusd::sdf::Variability::Uniform)
    }
    /// Authors the property as the schema declares it, and returns it.
    pub fn create_membership_expression_attr(
        &self,
    ) -> ::openusd::Result<::openusd::usd::Attribute> {
        ::std::result::Result::Ok(self.membership_expression_attr_builder().build()?)
    }
    /// Specifies which mode the collection uses to determine
    /// membership: `automatic`, `relationship`, or `expression`.
    ///
    /// - `automatic` - the collection's mode is inferred from its authored
    ///   properties. If either or both of the `includes` and `excludes`
    ///   relationships have valid targets, or the `includeRoot` attribute
    ///   is set to `true`, the collection is in *relationship-mode* and the
    ///   `membershipExpression` attribute is ignored. Otherwise, the collection
    ///   is in *expression-mode* and the `membershipExpression` attribute applies.
    ///   This is the default behavior and is backward compatible with collections
    ///   that predate this attribute.
    /// - `relationship` - the collection is explicitly in *relationship-mode*. The
    ///   `includes`, `excludes`, and `includeRoot` attributes determine membership,
    ///   and `membershipExpression` is ignored.
    /// - `expression` - the collection is explicitly in *expression-mode*. The
    ///   `membershipExpression` attribute determines membership, and `includes`,
    ///   `excludes`, and `includeRoot` are ignored.
    ///
    /// The fallback value is `automatic`.
    ///
    /// Declared `uniform token collection:__INSTANCE_NAME__:mode = "automatic"`.
    /// One of `automatic`, `relationship`, `expression`.
    pub fn mode_attr(&self) -> ::openusd::usd::Attribute {
        self.attribute(
            ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                tokens::COLLECTION_MULTIPLE_APPLY_TEMPLATE_MODE,
                self.name.as_str(),
            ),
        )
    }
    /// The property's value at the default time, as the type it is
    /// declared with: what a layer authors, else the fallback the
    /// schema declares.
    pub fn mode(&self) -> ::openusd::Result<::std::option::Option<CollectionMode>> {
        self.mode_attr().get::<CollectionMode>()
    }
    /// The property's declaration, unauthored. Give it a value and
    /// `build` it to author both as one edit; `build` it alone for the
    /// declaration by itself.
    pub fn mode_attr_builder(&self) -> ::openusd::usd::AttributeBuilder<'static> {
        self.attribute_builder(
                ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                    tokens::COLLECTION_MULTIPLE_APPLY_TEMPLATE_MODE,
                    self.name.as_str(),
                ),
                ::openusd::sdf::ValueTypeName::TOKEN,
            )
            .custom(false)
            .variability(::openusd::sdf::Variability::Uniform)
    }
    /// Authors the property as the schema declares it, and returns it.
    pub fn create_mode_attr(&self) -> ::openusd::Result<::openusd::usd::Attribute> {
        ::std::result::Result::Ok(self.mode_attr_builder().build()?)
    }
    /// This property represents the collection for the purpose of
    /// allowing another collection to include it. When this property is
    /// targeted by another collection's *includes* relationship, the rules
    /// of this collection will be inserted into the rules of the collection
    /// that includes it.
    ///
    /// Declared `uniform opaque collection:__INSTANCE_NAME__`.
    pub fn collection_attr(&self) -> ::openusd::usd::Attribute {
        self.attribute(
            ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                tokens::COLLECTION_MULTIPLE_APPLY_TEMPLATE_,
                self.name.as_str(),
            ),
        )
    }
    /// The property's declaration, unauthored. Give it a value and
    /// `build` it to author both as one edit; `build` it alone for the
    /// declaration by itself.
    pub fn collection_attr_builder(&self) -> ::openusd::usd::AttributeBuilder<'static> {
        self.attribute_builder(
                ::openusd::usd::SchemaRegistry::make_multiple_apply_name_instance(
                    tokens::COLLECTION_MULTIPLE_APPLY_TEMPLATE_,
                    self.name.as_str(),
                ),
                ::openusd::sdf::ValueTypeName::OPAQUE,
            )
            .custom(false)
            .variability(::openusd::sdf::Variability::Uniform)
    }
    /// Authors the property as the schema declares it, and returns it.
    pub fn create_collection_attr(
        &self,
    ) -> ::openusd::Result<::openusd::usd::Attribute> {
        ::std::result::Result::Ok(self.collection_attr_builder().build()?)
    }
}

impl ::openusd::usd::SchemaBase for CollectionAPI {
    const KIND: ::openusd::usd::SchemaKind = ::openusd::usd::SchemaKind::MultipleApplyApi;
    fn prim(&self) -> &::openusd::usd::Prim {
        &self.prim
    }
}

impl ::std::ops::Deref for CollectionAPI {
    type Target = ::openusd::usd::Prim;
    fn deref(&self) -> &Self::Target {
        &self.prim
    }
}

impl ::openusd::usd::APISchemaBase for CollectionAPI {}

///  [`ClipsAPI`] is an API schema that provides an interface to
/// a prim's clip metadata. Clips are a "value resolution" feature that
/// allows one to specify a sequence of usd files (clips) to be consulted,
/// over time, as a source of varying overrides for the prims at and
/// beneath this prim in namespace.
///
/// `SetClipAssetPaths()` establishes the set of clips that can be consulted.
/// `SetClipActive()` specifies the ordering of clip application over time
/// (clips can be repeated), while `SetClipTimes()` specifies time-mapping
/// from stage-time to clip-time for the clip active at a given stage-time,
/// which allows for time-dilation and repetition of clips.
/// Finally, `SetClipPrimPath()` determines the path within each clip that will
/// map to this prim, i.e. the location within the clip at which we will look
/// for opinions for this prim.
///
/// The clip asset paths, times and active metadata can also be specified
/// through template clip metadata. This can be desirable when your set of
/// assets is very large, as the template metadata is much more concise.
/// `SetClipTemplateAssetPath()` establishes the asset identifier pattern of the
/// set of clips to be consulted. `SetClipTemplateStride()`,
/// `SetClipTemplateEndTime()`, and `SetClipTemplateStartTime()` specify the
/// range
/// in which USD will search, based on the template. From the set of resolved
/// asset paths, times and active will be derived internally.
///
/// A prim may have multiple "clip sets" -- named sets of clips that each
/// have their own values for the metadata described above. For example,
/// a prim might have a clip set named "`Clips_1`" that specifies some group
/// of clip asset paths, and another clip set named "`Clips_2`" that uses
/// an entirely different set of clip asset paths. These clip sets are
/// composed across composition arcs, so clip sets for a prim may be
/// defined in multiple sublayers or references, for example. Individual
/// metadata for a given clip set may be sparsely overridden.
///
/// Important facts about clips:
/// - Within the layerstack in which clips are established, the opinions within
///   the clips will be *weaker* than any local opinions in the layerstack, but
///   em stronger than varying opinions coming across references and variants.
/// - We will never look for metadata or default opinions in clips when
///   performing value resolution on the owning stage, since these quantities
///   must be time-invariant.
///
/// This leads to the common structure in which we reference a model asset
/// on a prim, and then author clips at the same site: the asset reference
/// will provide the topology and unvarying data for the model, while the
/// clips will provide the time-sampled animation.
///
/// For further information, see `Usd_Page_ValueClips`
pub trait ClipsAPISchema: ::openusd::usd::APISchemaBase {}

///  [`ClipsAPI`] is an API schema that provides an interface to
/// a prim's clip metadata. Clips are a "value resolution" feature that
/// allows one to specify a sequence of usd files (clips) to be consulted,
/// over time, as a source of varying overrides for the prims at and
/// beneath this prim in namespace.
///
/// `SetClipAssetPaths()` establishes the set of clips that can be consulted.
/// `SetClipActive()` specifies the ordering of clip application over time
/// (clips can be repeated), while `SetClipTimes()` specifies time-mapping
/// from stage-time to clip-time for the clip active at a given stage-time,
/// which allows for time-dilation and repetition of clips.
/// Finally, `SetClipPrimPath()` determines the path within each clip that will
/// map to this prim, i.e. the location within the clip at which we will look
/// for opinions for this prim.
///
/// The clip asset paths, times and active metadata can also be specified
/// through template clip metadata. This can be desirable when your set of
/// assets is very large, as the template metadata is much more concise.
/// `SetClipTemplateAssetPath()` establishes the asset identifier pattern of the
/// set of clips to be consulted. `SetClipTemplateStride()`,
/// `SetClipTemplateEndTime()`, and `SetClipTemplateStartTime()` specify the
/// range
/// in which USD will search, based on the template. From the set of resolved
/// asset paths, times and active will be derived internally.
///
/// A prim may have multiple "clip sets" -- named sets of clips that each
/// have their own values for the metadata described above. For example,
/// a prim might have a clip set named "`Clips_1`" that specifies some group
/// of clip asset paths, and another clip set named "`Clips_2`" that uses
/// an entirely different set of clip asset paths. These clip sets are
/// composed across composition arcs, so clip sets for a prim may be
/// defined in multiple sublayers or references, for example. Individual
/// metadata for a given clip set may be sparsely overridden.
///
/// Important facts about clips:
/// - Within the layerstack in which clips are established, the opinions within
///   the clips will be *weaker* than any local opinions in the layerstack, but
///   em stronger than varying opinions coming across references and variants.
/// - We will never look for metadata or default opinions in clips when
///   performing value resolution on the owning stage, since these quantities
///   must be time-invariant.
///
/// This leads to the common structure in which we reference a model asset
/// on a prim, and then author clips at the same site: the asset reference
/// will provide the topology and unvarying data for the model, while the
/// clips will provide the time-sampled animation.
///
/// For further information, see `Usd_Page_ValueClips`
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct ClipsAPI(::openusd::usd::Prim);

impl ClipsAPI {
    /// Views `prim` as this schema, which any prim can be viewed as.
    ///
    /// Unchecked of the schema, not of memory: nothing here is
    /// `unsafe`. This schema is applied to no prim and names no prim
    /// type, so there is nothing to ask about one — which is why it has
    /// no constructor that asks.
    pub fn from_prim_unchecked(prim: ::openusd::usd::Prim) -> Self {
        Self(prim)
    }
}

impl ::openusd::usd::SchemaBase for ClipsAPI {
    const KIND: ::openusd::usd::SchemaKind = ::openusd::usd::SchemaKind::NonAppliedApi;
    fn prim(&self) -> &::openusd::usd::Prim {
        &self.0
    }
}

impl ::std::ops::Deref for ClipsAPI {
    type Target = ::openusd::usd::Prim;
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}

impl ClipsAPISchema for ClipsAPI {}

impl ::openusd::usd::APISchemaBase for ClipsAPI {}