import { IApiXmlSerializer } from '../amf/definitions/Shapes.js';
import { DomainPropertyFormat } from './DataFormat.js';
interface Binding {
    /**
     * The type of the bindings
     *
     * - Protocol buffers: `protobuf`
     * - RAML or OAS - `web`
     */
    type: 'protobuf' | 'web';
    /**
     * The binding schema.
     */
    schema: unknown;
}
/**
 * Binding for web API schema types (RAML, OAS)
 *
 * Data type translation (type to dataType)
 *
 * - `string` -> `string` with appropriate format
 * - `number` -> `number` data type with format `float`, `double`, or none format for OAS
 * - `integer` -> `integer` data type with `int32`, `int64`, or none format for OAS
 * - `nil` -> `nullable` property on OAS or `nil` type in RAML
 * - `boolean` -> `boolean` (both the same)
 * - `date` ->
 * - `any` -> `any` in RAML, `{}` shorthand in OAS
 *
 *
 *
 * The `binary` type
 *
 * OAS
 *
 * `http://www.w3.org/2001/XMLSchema#byte` For a file
 * `http://www.w3.org/2001/XMLSchema#base64Binary` for base 64
 *
 * RAML
 *
 * Has it's own AMF shape: FileShape.
 *
 * The `data` type
 *
 * OAS
 *
 * `http://www.w3.org/2001/XMLSchema#date` for a `date`
 * `http://www.w3.org/2001/XMLSchema#dateTime` for a `datetime` and `time`.
 * Note, OAS has no concept of `time` do we add `time` as the `format which is a custom thing.
 *
 * RAML
 *
 * `http://www.w3.org/2001/XMLSchema#date` for a `date` (raml's date-only)
 * `http://a.ml/vocabularies/shapes#dateTimeOnly` for a `time` (raml's time-only)
 * `http://www.w3.org/2001/XMLSchema#dateTime` for a `datetime` (raml's datetime) + format
 *
 * Note, we won't support RAML's `datetime-only`.
 */
export interface PropertyWebBindings {
    /**
     * The format specifying the property data type.
     */
    format?: DomainPropertyFormat;
    /**
     * When set it overrides the `name` of the property.
     */
    name?: string;
    /**
     * The XML encoding instructions.
     */
    xml?: IApiXmlSerializer;
    /**
     * Only valid for the `file` property type.
     * The list of file mime types.
     */
    fileTypes?: string[];
    /**
     * Whether the attribute is hidden in the schema (not a part of it).
     */
    hidden?: boolean;
}
/**
 * Binding to the protocol buffer.
 *
 * Data type translation (type to dataType)
 *
 * - `string` -> `string`
 * - `number` -> `double`, `float`
 * - `integer` -> `int32`, `int64`, `uint32`, `uint64`, `sint32`, `sint64`, `fixed32`, `fixed64`, `sfixed32`, `sfixed64`
 * - `nil` -> No translation.
 * - `boolean` -> `boolean`
 * - `date` -> No translation, we allow string or number (date string or a timestamp with a
 *    combination with format but this is not standard for ProtoBuf)
 * - `any` -> No translation, the user has to pick any of the data formats.
 * - `binary` -> `bytes`
 */
export interface PropertyProtobufBindings {
    /**
     * The field number in a protocol buffer message
     */
    field?: number;
    /**
     * Whether this property (field) is reserved
     */
    reserved?: boolean;
    /**
     * Whether the attribute is hidden in the schema (not a part of it).
     */
    hidden?: boolean;
    /**
     * The data type of the protocol buffer proprty
     */
    dataType?: 'double' | 'float' | 'int32' | 'int64' | 'uint32' | 'uint64' | 'sint32' | 'sint64' | 'fixed32' | 'fixed64' | 'sfixed32' | 'sfixed64' | 'bool' | 'string' | 'bytes';
}
export type PropertyBindings = PropertyWebBindings | PropertyProtobufBindings;
export interface PropertyBinding extends Binding {
    /**
     * The definition of the bindings.
     * The bindings tells how to translated the DomainProperty to a specific format.
     * For example, it allows to define the `dataType` and `format` for RAML / OAS (via the AMF shapes)
     * or the field number for protocol buffer.
     */
    schema: PropertyBindings;
}
export interface AssociationWebBindings {
    /**
     * Whether the association is hidden in the schema (not a part of it).
     */
    hidden?: boolean;
}
export type AssociationBindings = AssociationWebBindings;
export interface AssociationBinding extends Binding {
    /**
     * Association binding definition.
     */
    schema: AssociationBindings;
}
export {};
//# sourceMappingURL=Bindings.d.ts.map