/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as t}from"tslib";import{ClonableMixin as e}from"../../core/Clonable.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as o,subclass as i}from"../../core/accessorSupport/decorators.js";import{restrictionAttributeNameJsonMap as n,distanceImpedanceAttributeNameJsonMap as s,impedanceAttributeNameJsonMap as p,lengthUnitJsonMap as l,durationImpedanceAttributeNameJsonMap as u,travelModeTypeJsonMap as a,restrictUTurnJsonMap as c}from"./networkEnums.js";import{enumeration as m}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as d}from"../../core/accessorSupport/decorators/reader.js";import{writer as y}from"../../core/accessorSupport/decorators/writer.js";let b=class extends(e(r)){constructor(t){super(t),this.attributeParameterValues=null,this.description=null,this.distanceAttributeName=null,this.id=null,this.impedanceAttributeName=null,this.name=null,this.restrictionAttributeNames=null,this.simplificationTolerance=null,this.simplificationToleranceUnits=null,this.timeAttributeName=null,this.type=null,this.useHierarchy=null,this.uturnAtJunctions=null}readId(t,e){return e.id??e.itemId??null}readRestrictionAttributes(t,e){const{restrictionAttributeNames:r}=e;return null==r?null:r.map(t=>n.fromJSON(t))}writeRestrictionAttributes(t,e,r){null!=t&&(e[r]=t.map(t=>n.toJSON(t)))}};t([o({type:[Object],json:{write:!0}})],b.prototype,"attributeParameterValues",void 0),t([o({type:String,json:{write:!0}})],b.prototype,"description",void 0),t([m(s,{ignoreUnknown:!1})],b.prototype,"distanceAttributeName",void 0),t([o({type:String,json:{write:!0}})],b.prototype,"id",void 0),t([d("id",["id","itemId"])],b.prototype,"readId",null),t([m(p,{ignoreUnknown:!1})],b.prototype,"impedanceAttributeName",void 0),t([o({type:String,json:{write:!0}})],b.prototype,"name",void 0),t([o({type:[String],json:{write:!0}})],b.prototype,"restrictionAttributeNames",void 0),t([d("restrictionAttributeNames")],b.prototype,"readRestrictionAttributes",null),t([y("restrictionAttributeNames")],b.prototype,"writeRestrictionAttributes",null),t([o({type:Number,json:{write:{allowNull:!0}}})],b.prototype,"simplificationTolerance",void 0),t([m(l)],b.prototype,"simplificationToleranceUnits",void 0),t([m(u,{ignoreUnknown:!1})],b.prototype,"timeAttributeName",void 0),t([m(a)],b.prototype,"type",void 0),t([o({type:Boolean,json:{write:!0}})],b.prototype,"useHierarchy",void 0),t([m(c)],b.prototype,"uturnAtJunctions",void 0),b=t([i("esri.rest.support.TravelMode")],b);export{b as default};
