import type FeatureSet from "./FeatureSet.js";
import type NAMessage from "./NAMessage.js";
import type { JSONSupport } from "../../core/JSONSupport.js";
import type { FeatureSetProperties } from "./FeatureSet.js";
import type { NAMessageProperties } from "./NAMessage.js";

export interface ServiceAreaSolveResultProperties {
  /**
   * This provides access to the output facilities from a closest facility analysis.
   * Facilities are returned if [ServiceAreaParameters.returnFacilities](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ServiceAreaParameters/#returnFacilities) is set to `true`
   * in a [solve()](https://developers.arcgis.com/javascript/latest/references/core/rest/serviceArea/#solve) request.
   *
   * @see [facilities](https://developers.arcgis.com/rest/services-reference/enterprise/service-area-sync/#facilities-1)
   */
  facilities?: FeatureSetProperties | null;
  /** An array of processing [messages](https://developers.arcgis.com/javascript/latest/references/core/rest/support/NAMessage/) generated by the server. */
  messages?: NAMessageProperties[] | null;
  /**
   * A set of features representing point barriers.
   * Point barriers are returned if [ServiceAreaParameters.returnPointBarriers](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ServiceAreaParameters/#returnPointBarriers)
   * is set to `true` in a [solve()](https://developers.arcgis.com/javascript/latest/references/core/rest/serviceArea/#solve) request.
   *
   * @see [barriers](https://developers.arcgis.com/rest/services-reference/enterprise/service-area-sync/#barriers-1)
   */
  pointBarriers?: FeatureSetProperties | null;
  /**
   * A set of features representing polygon barriers.
   * Point barriers are returned if [ServiceAreaParameters.returnPolygonBarriers](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ServiceAreaParameters/#returnPolygonBarriers)
   * is set to `true` in a [solve()](https://developers.arcgis.com/javascript/latest/references/core/rest/serviceArea/#solve) request.
   *
   * @see [polygonBarriers](https://developers.arcgis.com/rest/services-reference/enterprise/service-area-sync/#polygonbarriers-1)
   */
  polygonBarriers?: FeatureSetProperties | null;
  /**
   * A set of features representing polyline barriers.
   * Point barriers are returned if [ServiceAreaParameters.returnPolylineBarriers](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ServiceAreaParameters/#returnPolylineBarriers)
   * is set to `true` in a [solve()](https://developers.arcgis.com/javascript/latest/references/core/rest/serviceArea/#solve) request.
   *
   * @see [polylineBarriers](https://developers.arcgis.com/rest/services-reference/enterprise/service-area-sync/#polylinebarriers-1)
   */
  polylineBarriers?: FeatureSetProperties | null;
  /**
   * A feature set containing polygon features that represent areas that can be reached from the input locations with a
   * given travel time, travel distance, or travel cost.
   *
   * @see [saPolygons](https://developers.arcgis.com/rest/services-reference/enterprise/service-area-sync/#sapolygons)
   */
  serviceAreaPolygons?: FeatureSetProperties | null;
  /**
   * A feature set containing linear features and covers the streets, or network edges, that can be reached within the
   * given time, distance, or other travel-cost cutoff. Lines are a truer representation of a service area than
   * polygons since service area analyses are based on measurements along the network lines.
   *
   * @see [saPolylines](https://developers.arcgis.com/rest/services-reference/enterprise/service-area-sync/#sapolylines)
   */
  serviceAreaPolylines?: FeatureSetProperties | null;
}

/**
 * The result from [serviceArea](https://developers.arcgis.com/javascript/latest/references/core/rest/serviceArea/).
 *
 * @since 4.0
 * @see [serviceArea](https://developers.arcgis.com/javascript/latest/references/core/rest/serviceArea/)
 * @see [ServiceAreaParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ServiceAreaParameters/)
 */
export default class ServiceAreaSolveResult extends JSONSupport {
  constructor(properties?: ServiceAreaSolveResultProperties);
  /**
   * This provides access to the output facilities from a closest facility analysis.
   * Facilities are returned if [ServiceAreaParameters.returnFacilities](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ServiceAreaParameters/#returnFacilities) is set to `true`
   * in a [solve()](https://developers.arcgis.com/javascript/latest/references/core/rest/serviceArea/#solve) request.
   *
   * @see [facilities](https://developers.arcgis.com/rest/services-reference/enterprise/service-area-sync/#facilities-1)
   */
  get facilities(): FeatureSet | null | undefined;
  set facilities(value: FeatureSetProperties | null | undefined);
  /** An array of processing [messages](https://developers.arcgis.com/javascript/latest/references/core/rest/support/NAMessage/) generated by the server. */
  get messages(): NAMessage[] | null | undefined;
  set messages(value: NAMessageProperties[] | null | undefined);
  /**
   * A set of features representing point barriers.
   * Point barriers are returned if [ServiceAreaParameters.returnPointBarriers](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ServiceAreaParameters/#returnPointBarriers)
   * is set to `true` in a [solve()](https://developers.arcgis.com/javascript/latest/references/core/rest/serviceArea/#solve) request.
   *
   * @see [barriers](https://developers.arcgis.com/rest/services-reference/enterprise/service-area-sync/#barriers-1)
   */
  get pointBarriers(): FeatureSet | null | undefined;
  set pointBarriers(value: FeatureSetProperties | null | undefined);
  /**
   * A set of features representing polygon barriers.
   * Point barriers are returned if [ServiceAreaParameters.returnPolygonBarriers](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ServiceAreaParameters/#returnPolygonBarriers)
   * is set to `true` in a [solve()](https://developers.arcgis.com/javascript/latest/references/core/rest/serviceArea/#solve) request.
   *
   * @see [polygonBarriers](https://developers.arcgis.com/rest/services-reference/enterprise/service-area-sync/#polygonbarriers-1)
   */
  get polygonBarriers(): FeatureSet | null | undefined;
  set polygonBarriers(value: FeatureSetProperties | null | undefined);
  /**
   * A set of features representing polyline barriers.
   * Point barriers are returned if [ServiceAreaParameters.returnPolylineBarriers](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ServiceAreaParameters/#returnPolylineBarriers)
   * is set to `true` in a [solve()](https://developers.arcgis.com/javascript/latest/references/core/rest/serviceArea/#solve) request.
   *
   * @see [polylineBarriers](https://developers.arcgis.com/rest/services-reference/enterprise/service-area-sync/#polylinebarriers-1)
   */
  get polylineBarriers(): FeatureSet | null | undefined;
  set polylineBarriers(value: FeatureSetProperties | null | undefined);
  /**
   * A feature set containing polygon features that represent areas that can be reached from the input locations with a
   * given travel time, travel distance, or travel cost.
   *
   * @see [saPolygons](https://developers.arcgis.com/rest/services-reference/enterprise/service-area-sync/#sapolygons)
   */
  get serviceAreaPolygons(): FeatureSet | null | undefined;
  set serviceAreaPolygons(value: FeatureSetProperties | null | undefined);
  /**
   * A feature set containing linear features and covers the streets, or network edges, that can be reached within the
   * given time, distance, or other travel-cost cutoff. Lines are a truer representation of a service area than
   * polygons since service area analyses are based on measurements along the network lines.
   *
   * @see [saPolylines](https://developers.arcgis.com/rest/services-reference/enterprise/service-area-sync/#sapolylines)
   */
  get serviceAreaPolylines(): FeatureSet | null | undefined;
  set serviceAreaPolylines(value: FeatureSetProperties | null | undefined);
}