import type SpatialReference from "../../geometry/SpatialReference.js";
import type { JSONSupport } from "../../core/JSONSupport.js";
import type { LocationType } from "../types.js";
import type { SpatialReferenceProperties } from "../../geometry/SpatialReference.js";

/** @since 5.0 */
export interface AddressesToLocationsParametersProperties extends Partial<Pick<AddressesToLocationsParameters, "addresses" | "categories" | "countryCode" | "locationType">> {
  /**
   * The spatial reference of the output geometries. If not specified, the output geometries are in the spatial reference of
   * the input geometries when performing a reverse geocode and in the default spatial reference returned by the service if
   * finding locations by address.
   *
   * @since 5.0
   */
  outSpatialReference?: SpatialReferenceProperties | null;
}

/** @since 5.0 */
export default class AddressesToLocationsParameters extends JSONSupport {
  constructor(properties?: AddressesToLocationsParametersProperties);
  /**
   * The input addresses in the format supported by the geocode service. If the service supports
   * 'Single Line Input' the input addresses will be in the following format:
   * ```js
   * {
   *   "OBJECTID": 0,
   *   "Single Line Input":"77 Main St, Plymouth, NH 03264"
   * }
   * ```
   *
   * @since 5.0
   */
  accessor addresses: any[] | null;
  /**
   * Limit result to one or more categories. For example,
   * "Populated Place" or "Scandinavian Food". Only applies to the World Geocode Service.
   * See [Category filtering (World Geocoding Service)](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-category-filtering.htm#ESRI_SECTION1_502B3FE2028145D7B189C25B1A00E17B) for more information.
   *
   * @since 5.0
   */
  accessor categories: string[] | null;
  /**
   * Limits the results to only search in the country provided. For example `US` for United States or `SE` for Sweden. Only applies to the
   * World Geocode Service. See the [World Geocoding Service documentation](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-category-filtering.htm) for more information.
   *
   * @since 5.0
   */
  accessor countryCode: string | null;
  /**
   * Define the type of location, either `"street"` or `"rooftop"`, of the point returned from the
   * [World Geocoding Service](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-category-filtering.htm).
   *
   * @since 5.0
   */
  accessor locationType: LocationType | null;
  /**
   * The spatial reference of the output geometries. If not specified, the output geometries are in the spatial reference of
   * the input geometries when performing a reverse geocode and in the default spatial reference returned by the service if
   * finding locations by address.
   *
   * @since 5.0
   */
  get outSpatialReference(): SpatialReference | null;
  set outSpatialReference(value: SpatialReferenceProperties | null);
}