import { IActivityHandler, IActivityContext, Deferrable } from "../../IActivityHandler";
import { MapProvider } from "./MapProvider";
/** Defines inputs for the basic Route Task activity. This task is related to the Closest Facility and Service Area tasks. */
export interface RouteTaskInputs {
    /** The URL to the ArcGIS network analysis service. */
    url: string;
    /** The set of stops loaded as network locations during analysis. When stops takes a FeatureSet, each feature in the FeatureSet must have a defined spatial reference. If the feature contains x and y attributes, those values are used for the stop, even if the feature includes geometry. At ArcGIS Server 10.1 an optional url property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using DataFile. Note that either the features or url property should be specified, but not both. */
    stops: __esri.DataLayer | __esri.FeatureSet;
    /** The list of network attribute names to be accumulated with the analysis; i.e., which attributes should be returned as part of the response. The defaulted is as defined in the specific routing network layer. See: http://resources.arcgis.com/en/help/main/10.2/index.html#//00470000000m000000 */
    accumulateAttributes?: string[];
    /** An object describing the parameter values. If present, an attribute name, parameter name, and value must be specified. */
    attributeParameterValues?: __esri.AttributeParamValue;
    /** The set of point barriers loaded as network locations during analysis. At ArcGIS Server 10.1 an optional url property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using DataFile. Note that either the features or url property should be specified. */
    barriers?: __esri.DataLayer | __esri.FeatureSet;
    /** The language used when computing directions. The default is as defined in the specific routing network layer. By default, NAServer gets installed with en_US only - it is up to the server administrator to add additional languages. */
    directionsLanguage?: string;
    /** The length unit to use when computing directions. The default is as defined in the specific routing network layer. Known values: centimeters | decimal-degrees | decimeters | feet | inches | kilometers | meters | miles | millimeters | nautical-miles | points | yards. */
    directionsLengthUnits?: string;
    /** Defines the amount of direction information returned. Default value: standard. Known values: complete | complete-no-events | instructions-only | standard | summary-only. */
    directionsOutputType?: string;
    /** The style to be used when returning directions. The default will be as defined in the network layer. View the REST layer description for your network service to see a list of supported styles. */
    directionsStyleName?: string;
    /** The name of network attribute to use for the drive time when computing directions. The default is as defined in the specific routing network layer. */
    directionsTimeAttribute?: string;
    /** If true, avoids network elements restricted by barriers or restrictions specified in restrictionAttributes. Default value: true. */
    doNotLocateOnRestrictedElements?: boolean;
    /** When the findBestSequence = true, the route solver attempts the optimal sequence to visit the stops. As this is a combinatorial problem, we employ heuristics to solve this in a reasonable time. The heuristics do not guarantee the optimal sequence (as there is no good/fast way to prove optimality for large number of stops). It returns a solution that is close to optimal if not the optimal. For these stops to be visited in the most efficient way, specify the following parameters: routeParams.findBestSequence = true; routeParams.preserveFirstStop = false; routeParams.preserveLastStop = false; routeParams.returnStops = true;  */
    findBestSequence?: boolean;
    /** When false, the solve operation wil fail if at least one of the stops specified cannot be located or reached. When true, as long as there are at least two valid stops that have been connected by a route, a valid route is returned. */
    ignoreInvalidLocations?: boolean;
    /** The network attribute name to be used as the impedance attribute in the analysis. The default is as defined in the routing network layer. You can specify any attribute names listed in the Service Directory under Network Dataset -> Network Attributes as "Usage Type: esriNAUTCost". You can also specify a value of "none" to indicate that no network attributes should be used for impedance. For example, set impedanceAttribute to "Time" for the quickest route, or to "Length" for the shortest drive, assuming the service has those two esriNAUTCost attributes. */
    impedanceAttribute?: string;
    impedenceAttribute?: string;
    /** The precision of the output geometry after generalization. If 0, no generalization of output geometry is performed. If present and positive, it represents the MaximumAllowableOffset parameter and generalization is performed according to IPolycurve.Generalize. */
    outputGeometryPrecision?: number;
    /** The units of the output geometry precision. Known Values: centimeters | decimal-degrees | decimeters | feet | inches | kilometers | meters | miles | millimeters | nautical-miles | points | yards. */
    outputGeometryPrecisionUnits?: string;
    /** The type of output lines to be generated in the result. Default Value: true-shape. Known Values: none | straight | true-shape | true-shape-with-measure. */
    outputLines?: string;
    /** The spatial reference (or well-known ID of same) for the geometries returned with the analysis results. If not specified, the geometries are returned in the spatial reference of the map. */
    outSpatialReference?: number | string | __esri.SpatialReference;
    /** The set of point barriers loaded as network locations during analysis. At ArcGIS Server 10.1 an optional url property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using DataFile. Note that either the features or url property should be specified. */
    pointBarriers?: __esri.DataLayer | __esri.FeatureSet;
    /** The set of polygon barriers loaded as network locations during analysis. At ArcGIS Server 10.1, an optional url property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using DataFile. Note that either the features or url property should be specified. */
    polygonBarriers?: __esri.DataLayer | __esri.FeatureSet;
    /** The set of polyline barriers loaded as network locations during analysis. At ArcGIS Server 10.1, an optional url property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using DataFile. Note that either the features or url property should be specified. */
    polylineBarriers?: __esri.DataLayer | __esri.FeatureSet;
    /** If true, keeps the first stop fixed in the sequence even when findBestSequence = true. Only applicable if findBestSequence = true. The default is as defined in the specific routing network layer. */
    preserveFirstStop?: boolean;
    /** If true, keeps the last stop fixed in the sequence even when findBestSequence = true. Only applicable if findBestSequence = true. The default is as defined in the specific routing network layer. */
    preserveLastStop?: boolean;
    /** The list of network attribute names to be used as restrictions with the analysis. The default is as defined in the specific routing network layer used in your RouteTask. Possible values are listed in the Service Directory under Network Dataset -> Network Attributes. You can also specify a value of none to indicate that no network attributes should be used as restrictions. If you specify an empty array, it will default to the default of the service. */
    restrictionAttributes?: string[];
    /** Specifies how U-Turns should be handled. The default is as defined in the specific routing network layer. Known Values: allow-backtrack | at-dead-ends-only | no-backtrack | at-dead-ends-and-intersections. */
    restrictUTurns?: string;
    /** If true, barriers are returned with the RouteResult. Default Value: false */
    returnBarriers?: boolean;
    /** If true, directions are returned in the directions property of each RouteResult. Default Value: false. */
    returnDirections?: boolean;
    /** If true, polygon barriers are returned with the RouteResult. Default Value: false. */
    returnPolygonBarriers?: boolean;
    /** If true, polyline barriers are returned with the RouteResult. Default Value: false */
    returnPolylineBarriers?: boolean;
    /** If true, routes are generated and returned in the route property of each RouteResult. Default Value: true */
    returnRoutes?: boolean;
    /** If true, stops are returned in the stops property of each RouteResult. Default Value: false */
    returnStops?: boolean;
    /** If true, z values are returned in the RouteResult. Default Value: true. */
    returnZ?: boolean;
    /** The time the route begins. If not specified, the default is the time specified in the route service. */
    startTime?: Date;
    /** If true, the start time will be in UTC format. */
    startTimeIsUTC?: boolean;
    /** If true, the hierarchy attribute for the network should be used in analysis. The default is as defined in the specific routing network layer. */
    useHierarchy?: boolean;
    /** A useful feature of the RouteTask is the ability to constrain stop visits to certain times of day, or "time windows". If you were required to deliver orders to four homes and each customer was available during a limited time period during the day, the route task could help you find the most efficient path for making all the deliveries. Time windows are treated as a "soft" constraint. This means that although the solver attempts to honor time windows, if necessary, it will violate the time windows of some stops in order to reach them. Remember, the stops will be visited in the order they were added unless you set RouteParameters.findBestSequence = true. */
    useTimeWindows?: boolean;
}
/** defines outputs for the Route Task activity. */
export interface RouteTaskOutputs {
    barriers: __esri.Point[];
    messages: __esri.NAMessage[];
    polygonBarriers: __esri.Polygon[];
    polylineBarriers: __esri.Polyline[];
    routeResults: __esri.RouteResult[];
}
export declare class RouteTask implements IActivityHandler {
    static action: string;
    static suite: string;
    execute(inputs: RouteTaskInputs, context: IActivityContext, type: typeof MapProvider): Deferrable<RouteTaskOutputs>;
}
