// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define("../../chunks/tslib.es6 ../../Graphic ../../PopupTemplate ../../symbols ../../core/Clonable ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/reader ../../core/accessorSupport/decorators/subclass ../../core/accessorSupport/decorators/writer ../../geometry/Point ../route/utils ./networkEnums".split(" "),function(d,k,l,m,b,n,e,u,v,w,p,q,r,t,f,c){var g;b=g=class extends b.ClonableMixin(n.JSONSupport){constructor(a){super(a); this.symbol=this.status=this.sourceOid=this.sourceId=this.sideOfEdge=this.popupTemplate=this.objectId=this.name=this.geometry=this.fullEdge=this.curbApproach=this.costs=this.barrierType=this.addedCost=null;this.type="point-barrier"}readCosts(a,h){return f.getPrefixedProperties(h.attributes,"Attr_")}writeCosts(a,h){f.setPrefixedProperties(a,h,"Attr_")}static fromGraphic(a){return new g({addedCost:a.attributes.AddedCost??null,barrierType:null!=a.attributes.BarrierType?c.barrierTypeJsonMap.fromJSON(a.attributes.BarrierType): null,costs:null!=a.attributes.Costs?f.toKebabImpedanceAttributes(JSON.parse(a.attributes.Costs)):null,curbApproach:null!=a.attributes.CurbApproach?c.curbApproachJsonMap.fromJSON(a.attributes.CurbApproach):null,fullEdge:null!=a.attributes.FullEdge?c.fullEdgeJsonMap.fromJSON(a.attributes.FullEdge):null,geometry:a.geometry,name:a.attributes.Name??null,objectId:a.attributes.ObjectID??a.attributes.__OBJECTID,popupTemplate:a.popupTemplate,status:null!=a.attributes.Status?c.statusJsonMap.fromJSON(a.attributes.Status): null,symbol:a.symbol})}toGraphic(){const a={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:null!=this.barrierType?c.barrierTypeJsonMap.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(f.fromKebabImpedanceAttributes(this.costs)):null,CurbApproach:null!=this.curbApproach?c.curbApproachJsonMap.toJSON(this.curbApproach):null,FullEdge:null!=this.fullEdge?c.fullEdgeJsonMap.toJSON(this.fullEdge):null,Name:this.name,Status:null!=this.status?c.statusJsonMap.toJSON(this.status): null};return new k({geometry:this.geometry,attributes:a,symbol:this.symbol,popupTemplate:this.popupTemplate})}};b.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger"},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger"}, {name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"Status",alias:"Status",type:"esriFieldTypeInteger"}];d.__decorate([e.property()],b.prototype,"addedCost",void 0);d.__decorate([e.property({type:c.barrierTypeJsonMap.apiValues,json:{name:"attributes.BarrierType",read:{reader:c.barrierTypeJsonMap.read},write:{writer:c.barrierTypeJsonMap.write}}})],b.prototype,"barrierType",void 0);d.__decorate([e.property()],b.prototype,"costs",void 0);d.__decorate([p.reader("costs",["attributes"])],b.prototype, "readCosts",null);d.__decorate([r.writer("costs")],b.prototype,"writeCosts",null);d.__decorate([e.property({constructOnly:!0,type:c.curbApproachJsonMap.apiValues,json:{read:{source:"attributes.CurbApproach",reader:c.curbApproachJsonMap.read}}})],b.prototype,"curbApproach",void 0);d.__decorate([e.property({type:c.fullEdgeJsonMap.apiValues,json:{name:"attributes.FullEdge",read:{reader:c.fullEdgeJsonMap.read},write:{writer:c.fullEdgeJsonMap.write}}})],b.prototype,"fullEdge",void 0);d.__decorate([e.property({type:t, json:{write:!0}})],b.prototype,"geometry",void 0);d.__decorate([e.property({json:{name:"attributes.Name"}})],b.prototype,"name",void 0);d.__decorate([e.property({json:{name:"attributes.ObjectID"}})],b.prototype,"objectId",void 0);d.__decorate([e.property({type:l})],b.prototype,"popupTemplate",void 0);d.__decorate([e.property({type:c.sideOfEdgeJsonMap.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:c.sideOfEdgeJsonMap.read}}})],b.prototype,"sideOfEdge",void 0);d.__decorate([e.property({json:{read:{source:"attributes.SourceID"}}})], b.prototype,"sourceId",void 0);d.__decorate([e.property({json:{read:{source:"attributes.SourceOID"}}})],b.prototype,"sourceOid",void 0);d.__decorate([e.property({type:c.statusJsonMap.apiValues,json:{read:{source:"attributes.Status",reader:c.statusJsonMap.read}}})],b.prototype,"status",void 0);d.__decorate([e.property({types:m.symbolTypes})],b.prototype,"symbol",void 0);d.__decorate([e.property({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0);return b=g=d.__decorate([q.subclass("esri.rest.support.PointBarrier")], b)});