@itwin/ecschema-metadata
Version:
ECObjects core concepts in typescript
58 lines • 2.52 kB
TypeScript
/** @packageDocumentation
* @module Metadata
*/
import { CustomAttributeClassProps } from "../Deserialization/JsonProps";
import { CustomAttributeContainerType, SchemaItemType } from "../ECObjects";
import { ECClass } from "./Class";
import { SchemaItem } from "./SchemaItem";
/**
* A Typescript class representation of an ECCustomAttributeClass.
* @public @preview
*/
export declare class CustomAttributeClass extends ECClass {
readonly schemaItemType: SchemaItemType;
/** @internal */
static get schemaItemType(): SchemaItemType;
private _appliesTo?;
/**
* @deprecated in 4.8 - will not be removed until after 2026-06-13. Use [[appliesTo]]
* */
get containerType(): CustomAttributeContainerType;
get appliesTo(): CustomAttributeContainerType;
/**
* Save this CustomAttributeClasses properties to an object for serializing to JSON.
* @param standalone Serialization includes only this object (as opposed to the full schema).
* @param includeSchemaVersion Include the Schema's version information in the serialized object.
*/
toJSON(standalone?: boolean, includeSchemaVersion?: boolean): CustomAttributeClassProps;
/** @internal */
toXml(schemaXml: Document): Promise<Element>;
fromJSONSync(customAttributeProps: CustomAttributeClassProps): void;
fromJSON(customAttributeProps: CustomAttributeClassProps): Promise<void>;
/**
* @internal
*/
protected setAppliesTo(containerType: CustomAttributeContainerType): void;
/**
* Type guard to check if the SchemaItem is of type CustomAttributeClass.
* @param item The SchemaItem to check.
* @returns True if the item is a CustomAttributeClass, false otherwise.
*/
static isCustomAttributeClass(item?: SchemaItem): item is CustomAttributeClass;
/**
* Type assertion to check if the SchemaItem is of type CustomAttributeClass.
* @param item The SchemaItem to check.
* @returns The item cast to CustomAttributeClass if it is a CustomAttributeClass, undefined otherwise.
* @internal
*/
static assertIsCustomAttributeClass(item?: SchemaItem): asserts item is CustomAttributeClass;
}
/**
* @internal
* An abstract class used for Schema editing.
*/
export declare abstract class MutableCAClass extends CustomAttributeClass {
abstract setAppliesTo(containerType: CustomAttributeContainerType): void;
abstract setDisplayLabel(displayLabel: string): void;
}
//# sourceMappingURL=CustomAttributeClass.d.ts.map