import { CustomAttribute, CustomAttributeContainerProps, SchemaItemKey } from "@itwin/ecschema-metadata"; import { SchemaContextEditor } from "./Editor"; import { MutableArrayProperty } from "./Mutable/MutableArrayProperty"; import { MutableProperty } from "./Mutable/MutableProperty"; import { MutablePrimitiveOrEnumPropertyBase } from "./Mutable/MutablePrimitiveOrEnumProperty"; import { MutableStructProperty } from "./Mutable/MutableStructProperty"; import { MutableNavigationProperty } from "./Mutable/MutableNavigationProperty"; import { ECClassSchemaItems } from "./ECClasses"; type MutablePropertyType = MutableProperty | MutableArrayProperty | MutablePrimitiveOrEnumPropertyBase | MutableNavigationProperty | MutableStructProperty; /** * @alpha * A class allowing editing of attributes of the base Property class. */ export declare class Properties { protected ecClassType: ECClassSchemaItems; protected _schemaEditor: SchemaContextEditor; constructor(ecClassType: ECClassSchemaItems, _schemaEditor: SchemaContextEditor); setName(classKey: SchemaItemKey, propertyName: string, newPropertyName: string): Promise; /** * Sets the property description. * @param classKey The SchemaItemKey of the class. * @param propertyName The name of the property. * @param description The new description to set. */ setDescription(classKey: SchemaItemKey, propertyName: string, description: string): Promise; /** * Sets the property label. * @param classKey The SchemaItemKey of the class. * @param propertyName The name of the property. * @param label The new label to set. */ setLabel(classKey: SchemaItemKey, propertyName: string, label: string): Promise; /** * Sets the property isReadOnly attribute. * @param classKey The SchemaItemKey of the class. * @param propertyName The name of the property. * @param isReadOnly The new isReadOnly value. */ setIsReadOnly(classKey: SchemaItemKey, propertyName: string, isReadOnly: boolean): Promise; /** * Sets the property priority. * @param classKey The SchemaItemKey of the class. * @param propertyName The name of the property. * @param priority The new priority. */ setPriority(classKey: SchemaItemKey, propertyName: string, priority: number): Promise; /** * Sets the property category. * @param classKey The SchemaItemKey of the class. * @param propertyName The name of the property. * @param categoryKey The SchemaItemKey of the property category. */ setCategory(classKey: SchemaItemKey, propertyName: string, categoryKey: SchemaItemKey): Promise; /** * Sets the KindOfQuantity of a property. * @param classKey The SchemaItemKey of the class. * @param propertyName The name of the property. * @param kindOfQuantityKey The SchemaItemKey of the KindOfQuantity. */ setKindOfQuantity(classKey: SchemaItemKey, propertyName: string, kindOfQuantityKey: SchemaItemKey): Promise; /** * Adds a CustomAttribute instance to the Property identified by the given SchemaItemKey and property name. * @param classKey The SchemaItemKey identifying the class. * @param propertyName The name of the property. * @param customAttribute The CustomAttribute instance to add. */ addCustomAttribute(classKey: SchemaItemKey, propertyName: string, customAttribute: CustomAttribute): Promise; /** * Removes a CustomAttribute from a property. * @param container * @param customAttribute */ protected removeCustomAttribute(container: CustomAttributeContainerProps, customAttribute: CustomAttribute): void; /** * Gets the property with the specified name from the class identified by the given key. * @param classKey The SchemaItemKey of the class. * @param propertyName The name of the property to retrieve. */ protected getProperty(classKey: SchemaItemKey, propertyName: string): Promise; private findDerivedClasses; private getClass; } /** * @alpha * A class extending Properties allowing editing of attributes of PrimitiveArrayProperty, * EnumerationArrayProperty and StructArrayProperty. */ export declare class ArrayProperties extends Properties { constructor(ecClassType: ECClassSchemaItems, _schemaEditor: SchemaContextEditor); /** * Sets the array property minOccurs attribute. * @param classKey The SchemaItemKey of the class. * @param propertyName The name of the property. * @param minOccurs The new minOccurs value. */ setMinOccurs(classKey: SchemaItemKey, propertyName: string, minOccurs: number): Promise; /** * Sets the array property maxOccurs attribute. * @param classKey The SchemaItemKey of the class. * @param propertyName The name of the property. * @param maxOccurs The new maxOccurs value. */ setMaxOccurs(classKey: SchemaItemKey, propertyName: string, maxOccurs: number): Promise; /** * Override to validate that the found property is an ArrayProperty. * @param classKey The SchemaItemKey of the class. * @param propertyName The name of the property. */ protected getProperty(classKey: SchemaItemKey, propertyName: string): Promise; } /** * @alpha * A class extending Properties allowing editing of attributes of PrimitiveProperty and EnumerationProperty. */ declare class PrimitiveOrEnumProperties extends Properties { constructor(ecClassType: ECClassSchemaItems, _schemaEditor: SchemaContextEditor); /** * Sets the extendedTypeName attribute value. * @param classKey The SchemaItemKey of the class. * @param propertyName The name of the property. * @param extendedTypeName The extended type name of the property. */ setExtendedTypeName(classKey: SchemaItemKey, propertyName: string, extendedTypeName: string): Promise; /** * Sets the minLength attribute value. * @param classKey The SchemaItemKey of the class. * @param propertyName The name of the property. * @param minLength The minimum length of the property. */ setMinLength(classKey: SchemaItemKey, propertyName: string, minLength: number): Promise; /** * Sets the maxLength attribute value. * @param classKey The SchemaItemKey of the class. * @param propertyName The name of the property. * @param maxLength The maximum length of the property. */ setMaxLength(classKey: SchemaItemKey, propertyName: string, maxLength: number): Promise; /** * Sets the minValue attribute value. * @param classKey The SchemaItemKey of the class. * @param propertyName The name of the property. * @param minValue The minimum value of the property. */ setMinValue(classKey: SchemaItemKey, propertyName: string, minValue: number): Promise; /** * Sets the maxValue attribute value. * @param classKey The SchemaItemKey of the class. * @param propertyName The name of the property. * @param maxValue The maximum value of the property. */ setMaxValue(classKey: SchemaItemKey, propertyName: string, maxValue: number): Promise; } /** * @alpha * A class extending Properties allowing editing of PrimitiveProperty attributes. */ export declare class PrimitiveProperties extends PrimitiveOrEnumProperties { constructor(ecClassType: ECClassSchemaItems, _schemaEditor: SchemaContextEditor); /** * Override to validate that the found property is a PrimitiveProperty. * @param classKey The SchemaItemKey of the class. * @param propertyName The name of the property. */ protected getProperty(classKey: SchemaItemKey, propertyName: string): Promise; } /** * @alpha * A class extending Properties allowing editing of EnumerationProperty attributes. */ export declare class EnumerationProperties extends PrimitiveOrEnumProperties { constructor(ecClassType: ECClassSchemaItems, _schemaEditor: SchemaContextEditor); /** * Override to validate that the found property is a EnumerationProperty. * @param classKey The SchemaItemKey of the class. * @param propertyName The name of the property. */ protected getProperty(classKey: SchemaItemKey, propertyName: string): Promise; } /** * @alpha * A class extending Properties allowing editing of NavigationProperties attributes. */ export declare class NavigationProperties extends Properties { constructor(ecClassType: ECClassSchemaItems, _schemaEditor: SchemaContextEditor); /** * Override to validate that the found property is a NavigationProperty. * @param classKey The SchemaItemKey of the class. * @param propertyName The name of the property. */ protected getProperty(classKey: SchemaItemKey, propertyName: string): Promise; } /** * @alpha * A class extending Properties allowing editing of StructProperty attributes. */ export declare class StructProperties extends Properties { constructor(ecClassType: ECClassSchemaItems, _schemaEditor: SchemaContextEditor); /** * Override to validate that the found property is a StructProperty. * @param classKey The SchemaItemKey of the class. * @param propertyName The name of the property. */ protected getProperty(classKey: SchemaItemKey, propertyName: string): Promise; } export {}; //# sourceMappingURL=Properties.d.ts.map