/*
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","../../TimeExtent","../../core/JSONSupport","../../core/lang","../../core/accessorSupport/decorators/property","../../core/accessorSupport/ensureType","../../core/accessorSupport/decorators/subclass","../../core/accessorSupport/decorators/writer","../../geometry/support/jsonUtils","../../layers/support/MosaicRule","../../layers/support/rasterEnums","../../geometry/Point","../../geometry/Multipoint"],(function(e,t,o,r,i,p,s,n,l,a,u,c,y,m,d){"use strict";var _;let g=_=function(t){function o(){var e;return(e=t.apply(this,arguments)||this).geometry=null,e.interpolation="nearest",e.mosaicRule=null,e.outFields=null,e.pixelSize=null,e.returnFirstValueOnly=!0,e.sampleDistance=null,e.sampleCount=null,e.sliceId=null,e.timeExtent=null,e}e._inheritsLoose(o,t);var r=o.prototype;return r.writeGeometry=function(e,t,o){null!=e&&(t.geometryType=u.getJsonType(e),t[o]=e.toJSON())},r.clone=function(){return new _(p.clone({geometry:this.geometry,locations:this.locations,interpolation:this.interpolation,mosaicRule:this.mosaicRule,outFields:this.outFields,raster:this.raster,returnFirstValueOnly:this.returnFirstValueOnly,sampleDistance:this.sampleDistance,sampleCount:this.sampleCount,sliceId:this.sliceId,pixelSize:this.pixelSize,timeExtent:this.timeExtent}))},e._createClass(o,[{key:"locations",set:function(e){if(null!=e&&e.length){const t=new d({spatialReference:e[0].spatialReference});t.points=e.map((e=>[e.x,e.y])),this._set("locations",e),this.geometry=t}}}]),o}(i.JSONSupport);t.__decorate([s.property({types:o.geometryTypes,json:{read:u.fromJSON}})],g.prototype,"geometry",void 0),t.__decorate([a.writer("geometry")],g.prototype,"writeGeometry",null),t.__decorate([s.property()],g.prototype,"locations",null),t.__decorate([s.property({type:String,json:{type:y.interpolationKebab.jsonValues,read:y.interpolationKebab.read,write:y.interpolationKebab.write}})],g.prototype,"interpolation",void 0),t.__decorate([s.property({type:c,json:{write:!0}})],g.prototype,"mosaicRule",void 0),t.__decorate([s.property({type:[String],json:{write:!0}})],g.prototype,"outFields",void 0),t.__decorate([s.property({type:m,json:{write:!0}})],g.prototype,"pixelSize",void 0),t.__decorate([s.property({type:String,json:{write:!0}})],g.prototype,"raster",void 0),t.__decorate([s.property({type:Boolean,json:{write:!0}})],g.prototype,"returnFirstValueOnly",void 0),t.__decorate([s.property({type:Number,json:{write:!0}})],g.prototype,"sampleDistance",void 0),t.__decorate([s.property({type:Number,json:{write:!0}})],g.prototype,"sampleCount",void 0),t.__decorate([s.property({type:Number,json:{write:!0}})],g.prototype,"sliceId",void 0),t.__decorate([s.property({type:r,json:{read:{source:"time"},write:{target:"time"}}})],g.prototype,"timeExtent",void 0),g=_=t.__decorate([l.subclass("esri.rest.support.ImageSampleParameters")],g);return g}));
