<?xml version="1.0" encoding="UTF-8"?>
<!-- ==================================================================================
|  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|  * See LICENSE.md in the project root for license terms and full copyright notice.
======================================================================================= -->
<ECSchema schemaName="CoreCustomAttributes" alias="CoreCA" version="01.00.04" description="Custom attributes to indicate core EC concepts, may include struct classes intended for use in core custom attributes." displayLabel="Core Custom Attributes" xmlns="http://www.bentley.com/schemas/Bentley.ECXML.3.2">
    <ECCustomAttributes>
        <ProductionStatus xmlns="CoreCustomAttributes.01.00.04">
            <SupportedUse>Production</SupportedUse>
        </ProductionStatus>
    </ECCustomAttributes>
    <ECCustomAttributeClass typeName="DynamicSchema" description="Identifies a schema as dynamically generated by an application.  Like versions of a schema may differ and are not guaranteed to merge without conflicts." displayLabel="Dynamic Schema" appliesTo="Schema" modifier="Sealed"/>
    <ECCustomAttributeClass typeName="PartialSchema" description="Identifies a schema file/object that may only contain part of the complete schema.  Like versions of a schema may differ but are guaranteed to merge without conflicts." displayLabel="Partial Schema" appliesTo="Schema" modifier="Sealed"/>
    <ECStructClass typeName="SchemaNameAndPurpose" description="Used to define a supplemental schema and its purpose" modifier="Sealed">
        <ECProperty propertyName="SchemaName" typeName="string" description="Full name of the supplemental schema"/>
        <ECProperty propertyName="Purpose" typeName="string" description="Purpose of the supplemental schema"/>
    </ECStructClass>
    <ECStructClass typeName="SchemaReference" description="Reference to a schema including name and version" displayLabel="Schema Reference" modifier="Sealed">
        <ECProperty propertyName="SchemaName" typeName="string" description="Name of schema, excluding version" displayLabel="Schema Name"/>
        <ECProperty propertyName="MajorVersion" typeName="int" description="[This].[Write].[Minor]" displayLabel="Major Version"/>
        <ECProperty propertyName="MinorVersion" typeName="int" description="[Major].[Write].[This]" displayLabel="Minor Version"/>
        <ECProperty propertyName="WriteVersion" typeName="int" description="[Major].[This].[Minor]" displayLabel="Write Version"/>
    </ECStructClass>
    <ECCustomAttributeClass typeName="SupplementalProvenance" appliesTo="Schema" modifier="Sealed">
        <ECStructArrayProperty propertyName="SupplementalSchemaNamesAndPurposes" typeName="SchemaNameAndPurpose" minOccurs="0" maxOccurs="unbounded"/>
    </ECCustomAttributeClass>
    <ECCustomAttributeClass typeName="SupplementalSchema" description="Identifies a schema as a supplemental schema and stores extra metadata necessary for supplemental schemas" displayLabel="Supplemental Schema" appliesTo="Schema" modifier="Sealed">
        <ECStructProperty propertyName="PrimarySchemaReference" typeName="SchemaReference" description="References the primary schema this supplemental should be applied to" displayLabel="Primary Schema Reference"/>
        <ECProperty propertyName="Precedence" typeName="int" description="Positive integer defining the precedence of this supplemental schema. Higher precedences override lower precences.  The primary schema is considered to have a precedence between 199 and 200."/>
        <ECProperty propertyName="Purpose" typeName="string" description="A string representing the function of this supplemental schema.  Standard name formatting for a supplemental schema is &lt;PrimarySchemaName&gt;_Supplemental_&lt;Purpose&gt;"/>
    </ECCustomAttributeClass>
    <ECCustomAttributeClass typeName="DateTimeInfo" description="Optional additional meta data for ECProperties of type DateTime." appliesTo="PrimitiveProperty, ArrayProperty" modifier="Sealed">
        <ECProperty propertyName="DateTimeKind" typeName="DateTimeKind" description="Either Utc, Local or Unspecified. Default: Unspecified. When specifying a DateTimeKind, it is usually not necessary to specify a DateTimeComponent because a DateTimeKind implies the DateTimeComponent 'DateTime'."/>
        <ECProperty propertyName="DateTimeComponent" typeName="DateTimeComponent" description="Either DateTime or Date. Default: DateTime. Specifying 'Date' usually implies that a DateTimeKind is irrelevant, because dates (without time) don't need any timezone information."/>
    </ECCustomAttributeClass>
    <ECEnumeration typeName="DateTimeKind" backingTypeName="string" isStrict="true">
        <ECEnumerator value="Unspecified" name="Unspecified"/>
        <ECEnumerator value="Utc" name="Utc"/>
        <ECEnumerator value="Local" name="Local"/>
    </ECEnumeration>
    <ECEnumeration typeName="DateTimeComponent" backingTypeName="string" isStrict="true">
        <ECEnumerator value="DateTime" name="DateTime"/>
        <ECEnumerator value="Date" name="Date"/>
        <ECEnumerator value="TimeOfDay" name="TimeOfDay"/>
    </ECEnumeration>
    <ECCustomAttributeClass typeName="ClassHasCurrentTimeStampProperty" appliesTo="EntityClass" modifier="Sealed">
        <ECProperty propertyName="PropertyName" typeName="string"/>
    </ECCustomAttributeClass>
    <ECCustomAttributeClass typeName="Localizable" description="Applied to a property to indicate that custom attributes using this property can be localized." displayLabel="Localizable" appliesTo="PrimitiveProperty" modifier="Sealed"/>
    <ECCustomAttributeClass typeName="IsMixin" description="Applied to abstract ECEntityClasses which serve as secondary base classes for normal ECEntityClasses." displayLabel="Is Mixin" appliesTo="EntityClass" modifier="Sealed">
        <ECProperty propertyName="AppliesToEntityClass" typeName="string" description="This mixin may only be applied to entity classes which derive from this class.  Class Name should be fully specified as 'alias:ClassName'"/>
    </ECCustomAttributeClass>
    <ECCustomAttributeClass typeName="NotSubclassableInReferencingSchemas" appliesTo="AnyClass" modifier="Sealed" description="Makes a class 'sealed' outside of the schema containing the class">
        <ECArrayProperty propertyName="Exceptions" typeName="string" description="Optionally allows specific classes in other schemas to subclass this class.  Use format '[SchemaName]:[ClassName]', e.g. 'Fruit:Banana'"/>
    </ECCustomAttributeClass>
    <ECCustomAttributeClass typeName="HiddenProperty" appliesTo="AnyProperty" modifier="Sealed" description="Identifies a property which is designed to be hidden from the user interface">
        <ECProperty propertyName="Show" typeName="boolean" description="If set to true show the hidden property. Defaults to False.  Allows a property override to show a hidden property in a derived class"/>
    </ECCustomAttributeClass>
    <ECCustomAttributeClass typeName="HiddenSchema" appliesTo="Schema" modifier="Sealed" description="Identifies a schema which is designed to be hidden from the user interface.  By default all classes in the schema are hidden as well.">
        <ECProperty propertyName="ShowClasses" typeName="boolean" description="If true classe in the schema will be shown.  Default is False.  If set to true individual classes may be hidden using the HiddenClass custom attribute"/>
    </ECCustomAttributeClass>
    <ECCustomAttributeClass typeName="HiddenClass" appliesTo="AnyClass" modifier="Sealed" description="Identifies a class which is designed to be hidden from teh user interface.  Hides the class it is applied to and all derived classes">
        <ECProperty propertyName="Show" typeName="boolean" description="If set to true show the hidden class.  Defaults to False.  Allows a derived class to be shown even though it's base class is hidden"/>
    </ECCustomAttributeClass>
    <ECCustomAttributeClass typeName="Deprecated" appliesTo="Any" modifier="Sealed" description="Identifies a schema or item within a schema as deprecated.  Deprecated things should not be used.">
        <ECProperty propertyName="Description" typeName="string" description="Gives advice about avoiding the deprecated item or other helpful information related to the deprecation of the item."/>
    </ECCustomAttributeClass>
    <ECCustomAttributeClass typeName="Extension" appliesTo="AnyProperty" modifier="Sealed" description="Used to indicate that the property this custom attribute is applied to is an extension property.">
        <ECProperty propertyName="Origin" typeName="string" description="Extension origin."/>
    </ECCustomAttributeClass>

    <ECEnumeration typeName="ProductionStatusValue" backingTypeName="string" isStrict="true" description="Used with ProductionStatus to declare the schema author's intended and supported workflows for the schema.">
        <ECEnumerator name="NotForProduction" value="NotForProduction" description="This schema is under development and should not be used for production workflows. Data created using this schema is not supported and may not be upgradable."/>
        <ECEnumerator name="FieldTesting"     value="FieldTesting"     description="This schema is suitable for field testing of production workflows. Data created with the schema is not supported long-term and may not be upgradable."/>
        <ECEnumerator name="Production"       value="Production"       description="This schema is suitable for production workflows. Data created using this schema will be supported long term (possibly through transformation)."/>
        <ECEnumerator name="Deprecated"       value="Deprecated"       description="This schema is no longer recommended for production workflows. Better alternatives exist and should be used instead."/>
    </ECEnumeration>

    <ECCustomAttributeClass typeName="ProductionStatus" appliesTo="Schema" modifier="Sealed" description="Declares the suitability of this schema for use in production and other workflows.">
        <ECProperty propertyName="SupportedUse" typeName="ProductionStatusValue" description="Indicates the suitability of this schema for production or other usage."/>
        <ECProperty propertyName="Checksum"     typeName="string"                description="Set when the schema ProductionStatus is set. Used to verify that a validated schema has not been modified after that point."/>
    </ECCustomAttributeClass>

</ECSchema>
