/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../../../chunks/_rollupPluginBabelHelpers","../../../chunks/tslib.es6","../../../geometry","../../../core/JSONSupport","../../../core/accessorSupport/decorators/property","../../../core/arrayUtils","../../../core/has","../../../core/accessorSupport/ensureType","../../../core/accessorSupport/decorators/reader","../../../core/accessorSupport/decorators/subclass","../../../core/accessorSupport/decorators/writer","./NetworkElement","../../../geometry/Polyline"],(function(e,r,o,t,n,l,p,a,d,i,c,s,u){"use strict";let m=function(r){function o(e){var o;return(o=r.call(this,e)||this).globalId=null,o.associationType=null,o.fromNetworkElement=null,o.toNetworkElement=null,o.geometry=null,o.errorMessage=null,o.percentAlong=null,o.errorCode=null,o.isContentVisible=null,o.status=null,o}e._inheritsLoose(o,r);var t=o.prototype;return t.readFromNetworkElement=function(e,r){const o=new s;return o.globalId=r.fromGlobalId,o.networkSourceId=r.fromNetworkSourceId,o.terminalId=r.fromTerminalId,o},t.writeFromNetworkElement=function(e,r){e&&(r.fromGlobalId=e.globalId,r.fromNetworkSourceId=e.networkSourceId,r.fromTerminalId=e.terminalId)},t.readToNetworkElement=function(e,r){const o=new s;return o.globalId=r.toGlobalId,o.networkSourceId=r.toNetworkSourceId,o.terminalId=r.toTerminalId,o},t.writeToNetworkElement=function(e,r){e&&(r.toGlobalId=e.globalId,r.toNetworkSourceId=e.networkSourceId,r.toTerminalId=e.terminalId)},o}(t.JSONSupport);r.__decorate([n.property({type:String,json:{write:!0}})],m.prototype,"globalId",void 0),r.__decorate([n.property({type:["attachment","connectivity","containment"],json:{write:!0}})],m.prototype,"associationType",void 0),r.__decorate([n.property({type:s,json:{write:{target:{fromGlobalId:{type:String},fromNetworkSourceId:{type:Number},fromTerminalId:{type:Number}}},read:{source:["fromGlobalId","fromNetworkSourceId","fromTerminalId"]}}})],m.prototype,"fromNetworkElement",void 0),r.__decorate([d.reader("fromNetworkElement")],m.prototype,"readFromNetworkElement",null),r.__decorate([c.writer("fromNetworkElement")],m.prototype,"writeFromNetworkElement",null),r.__decorate([n.property({type:s,json:{write:{target:{toGlobalId:{type:String},toNetworkSourceId:{type:Number},toTerminalId:{type:Number}}},read:{source:["toGlobalId","toNetworkSourceId","toTerminalId"]}}})],m.prototype,"toNetworkElement",void 0),r.__decorate([d.reader("toNetworkElement")],m.prototype,"readToNetworkElement",null),r.__decorate([c.writer("toNetworkElement")],m.prototype,"writeToNetworkElement",null),r.__decorate([n.property({type:u,json:{write:!0}})],m.prototype,"geometry",void 0),r.__decorate([n.property({type:String,json:{write:!0}})],m.prototype,"errorMessage",void 0),r.__decorate([n.property({type:Number,json:{write:!0}})],m.prototype,"percentAlong",void 0),r.__decorate([n.property({type:Number,json:{write:!0}})],m.prototype,"errorCode",void 0),r.__decorate([n.property({type:Boolean,json:{write:!0}})],m.prototype,"isContentVisible",void 0),r.__decorate([n.property({type:Number,json:{write:!0}})],m.prototype,"status",void 0),m=r.__decorate([i.subclass("esri.rest.networks.support.Association")],m);return m}));
