import type { DataDomain } from './DataDomain.js';
import { DomainPropertyKind } from '../models/kinds.js';
import { DomainElement, type DomainElementSchema } from './DomainElement.js';
import { type IThing, Thing } from '../models/Thing.js';
import { type DomainPropertyAttribute, type DomainPropertyFormat, type DomainPropertyType } from './DataFormat.js';
import type { PropertyBinding, PropertyBindings, PropertyWebBindings } from './Bindings.js';
import type { ModelValidationOptions } from '../models/types.js';
import type { DomainEntity } from './DomainEntity.js';
import type { IApiPropertyShape } from '../amf/definitions/Shapes.js';
import type { PropertySchema } from './types.js';
import { type SemanticType, type AppliedDataSemantic } from './Semantics.js';
import type { IShapeRenderOptions } from '../amf/shape/ShapeBase.js';
export interface DomainPropertySchema extends DomainElementSchema {
    kind: typeof DomainPropertyKind;
    /**
     * The domain property description.
     */
    info: IThing;
    /**
     * Wether the data property is required.
     */
    required?: boolean;
    /**
     * Whether the data property allows multiple items.
     */
    multiple?: boolean;
    /**
     * Whether this property describes a primary key of the entity.
     */
    primary?: boolean;
    /**
     * Whether this property describes a unique property of the entity.
     * This is used to generate unique constraints in the database.
     */
    unique?: boolean;
    /**
     * Whether this property describes an indexed property of the entity.
     */
    index?: boolean;
    /**
     * Whether the property is read only in the schema.
     */
    readOnly?: boolean;
    /**
     * Whether the property is write only in the schema.
     */
    writeOnly?: boolean;
    /**
     * Whether this property is deprecated.
     */
    deprecated?: boolean;
    /**
     * Optional general purpose tags for the UI.
     */
    tags?: string[];
    /**
     * The semantics applied to this property.
     * This is a list of applied semantics that can be used to
     * describe the property in more detail.
     */
    semantics?: AppliedDataSemantic[];
    /**
     * The data type for this property.
     * Note, not all schemas support the same type. For example, defining `sint32`
     * works for protocol buffers, but does not for JSON. In such case we use default
     * translation `sint32` -> `number`. Another way it to create
     * a derivative entity for specific schema to describe specific schema case.
     */
    type: DomainPropertyType;
    /**
     * The general schema definition of this property.
     * This is propagated to all bindings (when they support these properties).
     */
    schema?: PropertySchema;
    /**
     * The list of bindings for this property.
     *
     * A binding defines a translation from a data model to a specific format.
     * For example allows to define properties required to generate AMF shape and therefore RAML/OAS shapes for web APIs
     * or a protocol buffer schema.
     */
    bindings?: PropertyBinding[];
}
/**
 * Represents a property within a data domain entity.
 *
 * A `DomainProperty` defines a single data element within a
 * `DomainEntity`. It specifies the data type, constraints,
 * and other metadata for a specific piece of information.
 *
 * **Key Features:**
 *
 * -   **Data Type:** Defines the type of data the property
 *     holds (e.g., string, number, boolean, date).
 * -   **Constraints:** Supports defining constraints such as
 *     minimum/maximum values, enum values, and default values.
 * -   **Bindings:** Allows defining how the property is
 *     represented in different formats (e.g., web APIs,
 *     protocol buffers).
 * -   **Metadata:** Supports metadata such as tags, semantics,
 *     read-only/write-only status, and deprecation.
 * -   **Schema:** Allows defining a general schema for the
 *     property, which is propagated to all bindings.
 *
 * **Usage:**
 *
 * Use the `DomainEntity.addProperty` method to add a new property to an
 * entity. The property can be created using the constructor, but it
 * won't be added to the graph until you call the `addProperty` method.
 *
 * **Example:**
 *
 * ```typescript
 * const entity = domainModel.addEntity({ key: 'user' });
 * const property = entity.addProperty({
 *   key: 'name',
 *   type: 'string',
 *   required: true,
 *   schema: {
 *     minimum: 3,
 *     maximum: 50,
 *   },
 * });
 * ```
 */
export declare class DomainProperty extends DomainElement {
    kind: typeof DomainPropertyKind;
    /**
     * The description of the domain property.
     */
    accessor info: Thing;
    /**
     * Wether the data property is required.
     */
    accessor required: boolean | undefined;
    /**
     * Whether the data property allows multiple items.
     */
    accessor multiple: boolean | undefined;
    /**
     * Whether this property describes a primary key of the entity.
     */
    accessor primary: boolean | undefined;
    /**
     * Whether this property describes a unique property of the entity.
     * This is used to generate unique constraints in the database.
     */
    accessor unique: boolean | undefined;
    /**
     * Whether this property describes an indexed property of the entity.
     */
    accessor index: boolean | undefined;
    /**
     * Whether the property is read only in the schema.
     */
    accessor readOnly: boolean | undefined;
    /**
     * Whether the property is write only in the schema.
     */
    accessor writeOnly: boolean | undefined;
    /**
     * Whether this property is deprecated.
     */
    accessor deprecated: boolean | undefined;
    /**
     * Optional general purpose tags for the UI.
     *
     * Note to implementations, use the `addTag()` method as it propagates the "tag" value in the namespace.
     * Also, the tags property is excluded from the observer properties.
     * Changes to this property will not notify the observers.
     */
    accessor tags: string[];
    /**
     * Semantics applied to this property.
     */
    accessor semantics: AppliedDataSemantic[];
    /**
     * The data type for this property.
     * Note, not all schemas support the same type. For example, defining `sint32`
     * works for protocol buffers but does not for JSON. In such case we use default
     * translation `sint32` -> `number`. Another way it to create
     * a derivative entity for specific schema to describe specific schema case.
     */
    accessor type: DomainPropertyType;
    /**
     * The general schema definition of this property.
     * This is propagated to all bindings (when they support these properties).
     */
    accessor schema: PropertySchema | undefined;
    /**
     * The list of bindings for this property.
     *
     * A binding defines a translation from a data model to a specific format.
     * For example allows to define properties required to generate AMF shape and therefore RAML/OAS shapes for web APIs
     * or a protocol buffer schema.
     */
    accessor bindings: PropertyBinding[];
    /**
     * Creates a full data model schema with defaults.
     *
     * @param input The partial data model schema.
     * @returns The data model schema.
     */
    static createSchema(input?: Partial<DomainPropertySchema>): DomainPropertySchema;
    /**
     * The key of the parent entity.
     */
    protected parent: string;
    /**
     * Creates a new domain property instance.
     * It does not add it to the graph.
     * You need to call the `addProperty` method of the graph or a data model to add it.
     *
     * Domain objects constructors shouldn't be used directly. Use methods
     * provided on the DataDomain class to create new objects.
     *
     * @param root A reference to the root DataDomain instance.
     * @param parent The key of the parent entity.
     * @param input The partial domain property schema.
     * @returns Created domain property instance.
     */
    constructor(root: DataDomain, parent: string, input?: Partial<DomainPropertySchema>);
    /**
     * Checks whether the input is a valid definition of a domain property.
     *
     * @param input The input to validate.
     * @param options Validation options.
     * @returns true when the passed input is a valid definition of a domain property.
     */
    static validate(input: unknown, options?: ModelValidationOptions): boolean;
    toJSON(): DomainPropertySchema;
    /**
     * Removes this property from the parent entity.
     * It calls the `removeProperty()` method of the parent entity.
     */
    remove(): void;
    /**
     * Returns a parent data entity where this data property exist.
     */
    getParentInstance(): DomainEntity | undefined;
    /**
     * Checks whether the passed value is one of the supported data types.
     * @param value The value to test
     * @returns True when the passed value is one of the supported data types.
     */
    static isValidType(value: unknown): value is DomainPropertyType;
    /**
     * Checks whether the passed value is one of the supported data property attributes.
     * @param value The value to test
     * @returns True when the passed value is one of the supported data property attributes.
     */
    static isValidAttribute(value: unknown): value is DomainPropertyAttribute;
    /**
     * Checks whether the passed value of one of the supported `format` values.
     *
     * @param value The value to test
     * @returns `true` when the value is one of the supported `format` values.
     */
    static isValidFormat(value: unknown): value is DomainPropertyFormat;
    /**
     * Creates the `schema` object if missing and returns it.
     * @returns The schema object.
     */
    ensureSchema(): PropertySchema;
    /**
     * Creates if not existing and returns web bindings definition.
     * @returns The web binding definition
     */
    getWebBinding(): PropertyWebBindings;
    /**
     * Returns the schema value of the binding, if any was created.
     * @param type The type of the binding to read.
     * @returns The binding schema, if any
     */
    readBinding(type: 'web' | 'protobuf'): PropertyBindings | undefined;
    /**
     * Creates a Property Shape of AMF.
     *
     * The property itself is auto-generated. If the `schema` is
     * defined then it is used as the `range` of the property.
     * Otherwise basic shape is generated for the range.
     *
     * This is a preferred way of reading the AMF shape as this
     * synchronizes changed data properties with the shape
     * definition.
     *
     * @returns AMF property shape definition.
     */
    toApiShape(): IApiPropertyShape;
    /**
     * Generates an example value for this property based on its schema and type.
     *
     * This method converts the property to an AMF shape and then generates
     * an example value using the ApiSchemaGenerator. The generated example
     * respects the property's type, constraints, and any defined schema.
     *
     * @param mime The mime type of the example (e.g., 'application/json', 'application/xml').
     * @param opts Optional configuration for example generation.
     * @returns The generated example value.
     * @example
     * ```typescript
     * const example = property.toExample('application/json');
     * console.log(example);
     * ```
     */
    toExample(mime: string, opts?: IShapeRenderOptions): string | number | boolean | null | undefined;
    /**
     * Adds or updates a semantic to the property.
     * @param semantic The semantic to add to the property.
     * @throws Error if the semantic is not an property semantic.
     */
    addSemantic(semantic: AppliedDataSemantic): void;
    /**
     * Removes a semantic from the property.
     * @param semanticId The ID of the semantic to remove.
     */
    removeSemantic(semanticId: SemanticType): void;
    /**
     * Checks if the property has a specific semantic.
     * @param semanticId The ID of the semantic to check.
     * @returns True if the semantic is present, false otherwise.
     */
    hasSemantic(semanticId: SemanticType): boolean;
    /**
     * Creates a duplicate of this domain property on the parent entity.
     * It places the duplicate on the parent entity right after the original property.
     */
    duplicate(): DomainProperty;
}
//# sourceMappingURL=DomainProperty.d.ts.map