import { ApiType } from './legacy/models/ApiTypes.js';
export type PropertyType = 'string' | 'integer' | 'float' | 'nil' | 'boolean' | 'date' | 'datetime' | 'time' | 'int32' | 'int64' | 'uint32' | 'uint64' | 'sint32' | 'sint64' | 'fixed32' | 'fixed64' | 'sfixed32' | 'sfixed64' | 'double' | 'bytes';
export interface IProperty {
    kind: typeof Kind;
    /**
     * Property name
     */
    name: string;
    /**
     * Property value
     */
    value: unknown | IProperty[];
    /**
     * Property data type
     */
    type: PropertyType;
    /**
     * Whether the property is enabled. If not set it is assumed the property is enabled.
     */
    enabled?: boolean;
    /**
     * The default value for the property
     */
    default?: unknown;
    /**
     * Enum values for the property.
     */
    enum?: unknown[];
    /**
     * The description of the property
     */
    description?: string;
    /**
     * Whether the value id required to be provided. This is used with validation.
     */
    required?: boolean;
    /**
     * When set to `true` it represents a property that is an array.
     */
    repeated?: boolean;
}
export declare const Kind = "Core#Property";
/**
 * A property of an HTTP request.
 */
export declare class Property {
    kind: string;
    /**
     * Property name
     */
    name: string;
    /**
     * Property data type
     */
    type: PropertyType;
    /**
     * Property value
     */
    value: unknown;
    /**
     * The description of the property
     */
    description?: string;
    /**
     * The default value for the property
     */
    default?: unknown;
    /**
     * Whether the property is enabled. If not set it is assumed the property is enabled.
     */
    enabled?: boolean;
    /**
     * Enum values for the property.
     */
    enum?: unknown[];
    /**
     * Whether the value id required to be provided. This is used with validation.
     */
    required?: boolean;
    /**
     * When set to `true` it represents a property that is an array.
     */
    repeated?: boolean;
    static get supportedTypes(): PropertyType[];
    /**
     * Creates an instance of a property recognizing the type of the `value`.
     * It only works for primitive values.
     *
     * @param name The name of the property
     * @param value The value of the property. Default to an empty string which
     *              is the same as calling `Property.String()`.
     * @param enabled Whether the property is enabled.
     */
    static fromType(name?: string, value?: unknown, enabled?: boolean): Property;
    static fromTypeDefault(name: string | undefined, type: PropertyType): Property;
    static String(name?: string, value?: string, enabled?: boolean): Property;
    static Integer(name?: string, value?: number, enabled?: boolean): Property;
    static Int32(name?: string, value?: number, enabled?: boolean): Property;
    static Int64(name?: string, value?: number, enabled?: boolean): Property;
    static Uint32(name?: string, value?: number, enabled?: boolean): Property;
    static Uint64(name?: string, value?: number, enabled?: boolean): Property;
    static Sint32(name?: string, value?: number, enabled?: boolean): Property;
    static Sint64(name?: string, value?: number, enabled?: boolean): Property;
    static Fixed32(name?: string, value?: number, enabled?: boolean): Property;
    static Fixed64(name?: string, value?: number, enabled?: boolean): Property;
    static Sfixed32(name?: string, value?: number, enabled?: boolean): Property;
    static Sfixed64(name?: string, value?: number, enabled?: boolean): Property;
    static Float(name?: string, value?: number, enabled?: boolean): Property;
    static Double(name?: string, value?: number, enabled?: boolean): Property;
    static Boolean(name?: string, value?: boolean, enabled?: boolean): Property;
    static Date(name?: string): Property;
    static Datetime(name?: string): Property;
    static Time(name?: string): Property;
    static Bytes(name?: string): Property;
    static fromApiType(type: ApiType): Property;
    /**
     * @param input The property definition used to restore the state.
     */
    constructor(input?: string | IProperty);
    /**
     * Creates a new property.
     *
     * Note, this throws an error when the property is not a property.
     */
    new(init: IProperty): void;
    /**
     * Checks whether the input is a definition of a property.
     */
    static isProperty(input: unknown): boolean;
    toJSON(): IProperty;
    /**
     * Maps the list of properties to a single map.
     * It overrides previously defined properties on the map in case of multiple variables with the same name.
     *
     * @param properties The list of properties to map.
     * @returns A map where keys are property names and values are the property values.
     */
    static toMap(properties: (IProperty | Property)[]): Record<string, unknown>;
}
//# sourceMappingURL=Property.d.ts.map