import type Graphic from "../../Graphic.js";
import type DirectionsFeatureSet from "./DirectionsFeatureSet.js";
import type FeatureSet from "./FeatureSet.js";
import type { JSONSupport } from "../../core/JSONSupport.js";
import type { FeatureSetProperties } from "./FeatureSet.js";
import type { DirectionsFeatureSetProperties } from "./DirectionsFeatureSet.js";
import type { GraphicProperties } from "../../Graphic.js";

export interface RouteResultProperties extends Partial<Pick<RouteResult, "routeName">> {
  /**
   * Direction lines contains a set of line features for each segment of the route. This feature set can be used to
   * visualize the turn-by-turn directions on a map. Direction lines are returned if
   * [RouteParameters.returnDirections](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#returnDirections) is set to `true` and
   * [RouteParameters.directionsOutputType](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#directionsOutputType) is set
   * to `featureset` in a [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-route.html#solve) request.
   *
   * @since 4.23
   */
  directionLines?: FeatureSetProperties | null;
  /**
   * Direction points contains a set of point features representing the direction maneuvers such as arriving to or
   * departing from a stop, turning left or right, and other events along your route. This feature set contains the
   * route's turn-by-turn directions. Direction points are returned if
   * [RouteParameters.returnDirections](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#returnDirections) is set to `true` and
   * [RouteParameters.directionsOutputType](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#directionsOutputType) is set
   * to `featureset` in a [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-route.html#solve) request.
   *
   * @since 4.23
   */
  directionPoints?: FeatureSetProperties | null;
  /**
   * Direction are returned if
   * [RouteParameters.returnDirections](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#returnDirections) is set to `true` and
   * [RouteParameters.directionsOutputType](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#directionsOutputType) is set
   * to `complete`, `complete-no-events`, `instructions-only', `standard` or `summary-only` in a
   * [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-route.html#solve) request.
   */
  directions?: DirectionsFeatureSetProperties | null;
  /**
   * This property returns a Graphic that represent the overall path with attributes containing the total cost.
   * Route is returned if [RouteParameters.returnRoutes](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#returnRoutes) is set to `true`
   * in a [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-route.html#solve) request.
   *
   * @see [routes](https://developers.arcgis.com/rest/services-reference/enterprise/route-sync-services/#routes)
   */
  route?: GraphicProperties | null;
  /**
   * Array of stops. Stops are returned if [RouteParameters.returnStops](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#returnStops) is set to `true`
   * in a [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-route.html#solve) request.
   *
   * @see [RouteParameters.returnStops](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#returnStops)
   * @see [stops](https://developers.arcgis.com/rest/services-reference/enterprise/route-sync-services/#stops-1)
   */
  stops?: GraphicProperties[] | null;
  /**
   * This provides access to the edges that are traversed while solving a network analysis layer.
   * Traversed edges are returned if [RouteParameters.returnTraversedEdges](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#returnTraversedEdges) is set to `true`
   * in a [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-route.html#solve) request.
   *
   * @since 4.24
   * @see [traversedEdges](https://developers.arcgis.com/rest/services-reference/enterprise/route-sync-services/#traversededges)
   */
  traversedEdges?: FeatureSetProperties | null;
  /**
   * This provides access to the junctions that are traversed while solving a network analysis layer.
   * Traversed junctions are returned if [RouteParameters.returnTraversedJunctions](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#returnTraversedJunctions) is set to `true`
   * in a [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-route.html#solve) request.
   *
   * @since 4.24
   * @see [traversedJunctions](https://developers.arcgis.com/rest/services-reference/enterprise/route-sync-services/#traversedjunctions)
   */
  traversedJunctions?: FeatureSetProperties | null;
  /**
   * This provides access to the turns that are traversed while solving a network analysis layer.
   * Traversed turns are returned if [RouteParameters.returnTraversedTurns](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#returnTraversedTurns) is set to `true`
   * in a [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-route.html#solve) request.
   *
   * @since 4.24
   * @see [traversedTurns](https://developers.arcgis.com/rest/services-reference/enterprise/route-sync-services/#traversedturns)
   */
  traversedTurns?: FeatureSetProperties | null;
}

/**
 * The route result from [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-route.html#solve) as part of a
 * [RouteSolveResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteSolveResult.html). A successfully solved route will contain
 * one `RouteSolveRoute`, which may contain barriers, messages, and one or more RouteResult.
 *
 * RouteResult may contain stops, directions, directions lines, direction points, and route information,
 * depending on the corresponding [RouteParameters](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html) properties. For example,
 * setting [RouteParameters.returnStops](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#returnStops) to `true`
 * will include [stops](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteResult.html#stops) in the RouteResult.
 *
 * @since 4.0
 * @see [route](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-route.html)
 * @see [RouteParameters](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html)
 * @see [RouteSolveResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteSolveResult.html)
 * @see [Directions component](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-directions/)
 * @see [Output parameters](https://developers.arcgis.com/rest/services-reference/enterprise/route-sync-services/#output-parameters)
 */
export default class RouteResult extends JSONSupport {
  constructor(properties?: RouteResultProperties);
  /**
   * Direction lines contains a set of line features for each segment of the route. This feature set can be used to
   * visualize the turn-by-turn directions on a map. Direction lines are returned if
   * [RouteParameters.returnDirections](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#returnDirections) is set to `true` and
   * [RouteParameters.directionsOutputType](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#directionsOutputType) is set
   * to `featureset` in a [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-route.html#solve) request.
   *
   * @since 4.23
   */
  get directionLines(): FeatureSet | null | undefined;
  set directionLines(value: FeatureSetProperties | null | undefined);
  /**
   * Direction points contains a set of point features representing the direction maneuvers such as arriving to or
   * departing from a stop, turning left or right, and other events along your route. This feature set contains the
   * route's turn-by-turn directions. Direction points are returned if
   * [RouteParameters.returnDirections](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#returnDirections) is set to `true` and
   * [RouteParameters.directionsOutputType](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#directionsOutputType) is set
   * to `featureset` in a [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-route.html#solve) request.
   *
   * @since 4.23
   */
  get directionPoints(): FeatureSet | null | undefined;
  set directionPoints(value: FeatureSetProperties | null | undefined);
  /**
   * Direction are returned if
   * [RouteParameters.returnDirections](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#returnDirections) is set to `true` and
   * [RouteParameters.directionsOutputType](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#directionsOutputType) is set
   * to `complete`, `complete-no-events`, `instructions-only', `standard` or `summary-only` in a
   * [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-route.html#solve) request.
   */
  get directions(): DirectionsFeatureSet | null | undefined;
  set directions(value: DirectionsFeatureSetProperties | null | undefined);
  /**
   * This property returns a Graphic that represent the overall path with attributes containing the total cost.
   * Route is returned if [RouteParameters.returnRoutes](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#returnRoutes) is set to `true`
   * in a [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-route.html#solve) request.
   *
   * @see [routes](https://developers.arcgis.com/rest/services-reference/enterprise/route-sync-services/#routes)
   */
  get route(): Graphic | null | undefined;
  set route(value: GraphicProperties | null | undefined);
  /** The name of the route. */
  accessor routeName: string;
  /**
   * Array of stops. Stops are returned if [RouteParameters.returnStops](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#returnStops) is set to `true`
   * in a [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-route.html#solve) request.
   *
   * @see [RouteParameters.returnStops](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#returnStops)
   * @see [stops](https://developers.arcgis.com/rest/services-reference/enterprise/route-sync-services/#stops-1)
   */
  get stops(): Graphic[] | null | undefined;
  set stops(value: GraphicProperties[] | null | undefined);
  /**
   * This provides access to the edges that are traversed while solving a network analysis layer.
   * Traversed edges are returned if [RouteParameters.returnTraversedEdges](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#returnTraversedEdges) is set to `true`
   * in a [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-route.html#solve) request.
   *
   * @since 4.24
   * @see [traversedEdges](https://developers.arcgis.com/rest/services-reference/enterprise/route-sync-services/#traversededges)
   */
  get traversedEdges(): FeatureSet | null | undefined;
  set traversedEdges(value: FeatureSetProperties | null | undefined);
  /**
   * This provides access to the junctions that are traversed while solving a network analysis layer.
   * Traversed junctions are returned if [RouteParameters.returnTraversedJunctions](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#returnTraversedJunctions) is set to `true`
   * in a [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-route.html#solve) request.
   *
   * @since 4.24
   * @see [traversedJunctions](https://developers.arcgis.com/rest/services-reference/enterprise/route-sync-services/#traversedjunctions)
   */
  get traversedJunctions(): FeatureSet | null | undefined;
  set traversedJunctions(value: FeatureSetProperties | null | undefined);
  /**
   * This provides access to the turns that are traversed while solving a network analysis layer.
   * Traversed turns are returned if [RouteParameters.returnTraversedTurns](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#returnTraversedTurns) is set to `true`
   * in a [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-route.html#solve) request.
   *
   * @since 4.24
   * @see [traversedTurns](https://developers.arcgis.com/rest/services-reference/enterprise/route-sync-services/#traversedturns)
   */
  get traversedTurns(): FeatureSet | null | undefined;
  set traversedTurns(value: FeatureSetProperties | null | undefined);
}