// COPYRIGHT © 2017 Esri
//
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
//
// This material is licensed for use under the Esri Master License
// Agreement (MLA), and is bound by the terms of that agreement.
// You may redistribute and use this code without modification,
// provided you adhere to the terms of the MLA and include this
// copyright notice.
//
// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
//
// For additional information, contact:
// Environmental Systems Research Institute, Inc.
// Attn: Contracts and Legal Services Department
// 380 New York Street
// Redlands, California, USA 92373
// USA
//
// email: contracts@esri.com
//
// See http://js.arcgis.com/4.4/esri/copyright.txt for details.

define(["dojo/_base/array","../../Graphic","../../core/JSONSupport","./DirectionsFeatureSet"],function(e,r,t,a){var n=t.createSubclass({declaredClass:"esri.tasks.support.RouteResult",properties:{directions:{value:null,type:a},route:{value:null,json:{read:function(e,t){return e.geometry&&(e.geometry.spatialReference=t.spatialReference),r.fromJSON(e)}}},routeName:null,stops:{value:null,json:{read:function(t,a){var n=[],o=a.spatialReference;return e.forEach(t,function(e){e.geometry&&(e.geometry.spatialReference=o),n[e.attributes.Sequence-1]=r.fromJSON(e)}),n}}}}});return n});