import type { ClonableMixin } from "../../core/Clonable.js";
import type { JSONSupport } from "../../core/JSONSupport.js";
import type { GeometryUnion } from "../../geometry/types.js";
import type { GeometryType, SpatialRelationship } from "./types.js";
import type { MeshProperties } from "../../geometry/Mesh.js";
import type { PolylineProperties } from "../../geometry/Polyline.js";
import type { PolygonProperties } from "../../geometry/Polygon.js";
import type { PointProperties } from "../../geometry/Point.js";
import type { MultipointProperties } from "../../geometry/Multipoint.js";
import type { ExtentProperties } from "../../geometry/Extent.js";

export interface DataLayerProperties extends Partial<Pick<DataLayer, "doNotLocateOnRestrictedElements" | "geometryType" | "name" | "spatialRelationship" | "where">> {
  /**
   * The geometry to apply to the spatial filter. The spatial relationship as specified by
   * [spatialRelationship](https://developers.arcgis.com/javascript/latest/references/core/rest/support/DataLayer/#spatialRelationship) is applied to this geometry while performing the query.
   *
   * @example
   * let stops = new DataLayer();
   * stops.geometry = view.extent;
   */
  geometry?: ((ExtentProperties & { type: "extent" }) | (MultipointProperties & { type: "multipoint" }) | (PointProperties & { type: "point" }) | (PolygonProperties & { type: "polygon" }) | (PolylineProperties & { type: "polyline" }) | (MeshProperties & { type: "mesh" })) | null;
}

/**
 * Input for properties of ClosestFacilityParameters, RouteParameters or ServiceAreaParameters.
 * The DataLayer can be used to define the following for each parameter type:
 *
 * * [ClosestFacilityParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ClosestFacilityParameters/): define facilities, incidents and barriers.
 * * [RouteParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/support/RouteParameters/): define barriers and stops.
 * * [ServiceAreaParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ServiceAreaParameters/): define facilities and barriers.
 *
 * @since 4.20
 */
export default class DataLayer extends DataLayerSuperclass {
  constructor(properties?: DataLayerProperties);
  /**
   * If true, restricted network elements should be considered when finding network locations.
   *
   * @since 4.21
   */
  accessor doNotLocateOnRestrictedElements: boolean | null | undefined;
  /**
   * The geometry to apply to the spatial filter. The spatial relationship as specified by
   * [spatialRelationship](https://developers.arcgis.com/javascript/latest/references/core/rest/support/DataLayer/#spatialRelationship) is applied to this geometry while performing the query.
   *
   * @example
   * let stops = new DataLayer();
   * stops.geometry = view.extent;
   */
  get geometry(): GeometryUnion | null | undefined;
  set geometry(value: ((ExtentProperties & { type: "extent" }) | (MultipointProperties & { type: "multipoint" }) | (PointProperties & { type: "point" }) | (PolygonProperties & { type: "polygon" }) | (PolylineProperties & { type: "polyline" }) | (MeshProperties & { type: "mesh" })) | null | undefined);
  /**
   * The type of geometry specified by the [geometry](https://developers.arcgis.com/javascript/latest/references/core/rest/support/DataLayer/#geometry) property.
   *
   * @since 4.24
   */
  geometryType?: GeometryType | null;
  /**
   * The name of the data layer in the map service that is being referenced.
   *
   * @example
   * let stops = new DataLayer();
   * stops.name = "Hospitals";
   */
  accessor name: string | null | undefined;
  /**
   * The spatial relationship to be applied on the input geometry while
   * performing the query.
   *
   * Possible Value | Description
   * ---------------|------------
   * intersects | Part of a feature from feature class 1 is contained in a feature from feature class 2.
   * contains | Part or all of a feature from feature class 1 is contained within a feature from feature class 2.
   * crosses | The feature from feature class 1 crosses a feature from feature class 2.
   * envelope-intersects | The envelope of feature class 1 intersects with the envelope of feature class 2.
   * index-intersects | The envelope of the query feature class intersects the index entry for the target feature class.
   * overlaps | Features from feature class 1 overlap features in feature class 2.
   * touches | The feature from feature class 1 touches the border of a feature from feature class 2.
   * within | The feature from feature class 1 is completely enclosed by the feature from feature class 2.
   * relation | Allows specification of any relationship defined using the [Shape Comparison Language](https://resources.esri.com/help/9.3/arcgisengine/dotnet/concepts_start.htm#40de6491-9b2d-440d-848b-2609efcd46b1.htm).
   *
   * @example
   * let stops = new DataLayer();
   * stops.spatialRelationship = "contains";
   */
  spatialRelationship?: Exclude<SpatialRelationship, "disjoint"> | null;
  get type(): "layer";
  /**
   * A where clause for the query. Any legal SQL where clause operating on the
   * fields in the layer is allowed.
   *
   * @example
   * let stops = new DataLayer();
   * stops.where = "POP2000 > 350000";
   */
  accessor where: string | null | undefined;
}
declare const DataLayerSuperclass: typeof JSONSupport & typeof ClonableMixin