/**
 * A domain specifies the set of valid values for a field.
 *
 * See
 * {@link https://developers.arcgis.com/web-map-specification/objects/domain/}
 * {@link https://developers.arcgis.com/web-scene-specification/objects/domain/}.
 */
export type DomainJson = CodedValueDomainJson | InheritedDomainJson | RangeDomainJson;
/**
 * The type of the Domain.
 */
export type DomainJsonType = "inherited" | "range" | "codedValue";
/**
 * Base interface for domains.
 */
export interface DomainJsonBase {
    /**
     * Type of domain.
     */
    type: DomainJsonType;
}
/**
 * Range domain specifies a range of valid values for a field. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/range_domain/}
 * {@link https://developers.arcgis.com/web-scene-specification/objects/range_domain/}.
 */
export interface RangeDomainJson extends DomainJsonBase {
    /**
     * The name of the domain.
     */
    name: string;
    /**
     * An array in the format [<minValue>, <maxValue>].
     */
    range: number[];
    /**
     * @inheritDoc
     */
    type: "range";
}
/**
 * This domain applies to domains on subtypes. It implies that the domain for a
 * field at the subtype level is the same as the domain for the field at the
 * layer level. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/inherited_domain/}
 * {@link https://developers.arcgis.com/web-scene-specification/objects/inherited_domain/}.
 */
export interface InheritedDomainJson extends DomainJsonBase {
    /**
     * The type of domain.
     */
    type: "inherited";
}
/**
 * Coded value domain specifies an explicit set of valid values for a field.
 * Each valid value is assigned a unique name. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/codedValue_domain/}.
 */
export interface CodedValueDomainJson extends DomainJsonBase {
    /**
     * The name of the domain.
     */
    name: string;
    /**
     * The set of valid coded values.
     */
    codedValues: CodedValueJson[];
    /**
     * @inheritDoc
     */
    type: "codedValue";
}
/**
 * A set of valid coded values with unique names. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/codedValue/}
 * {@link https://developers.arcgis.com/web-scene-specification/objects/codedValue_domain/}.
 */
export interface CodedValueJson {
    /**
     * Value indicating which unique code is used to identify the feature
     * attribute.
     */
    code: string | number;
    /**
     * The human-readable name for the coded value.
     */
    name: string;
}
