/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{__decorate as t}from"tslib";import{JSONSupport as e}from"../../core/JSONSupport.js";import{clone as o}from"../../core/lang.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";import s from"../../geometry/Multipoint.js";import p from"../../geometry/Point.js";import{getJsonType as l}from"../../geometry/support/jsonTypeUtils.js";import{fromJSON as n}from"../../geometry/support/jsonUtils.js";import{geometryTypes as m}from"../../geometry/support/typeUtils.js";import a from"../../layers/support/MosaicRule.js";import{interpolationKebab as u}from"../../layers/support/rasterEnums.js";import y from"../../time/TimeExtent.js";import{writer as c}from"../../core/accessorSupport/decorators/writer.js";var d;let h=d=class extends e{constructor(){super(...arguments),this.geometry=null,this.interpolation="nearest",this.mosaicRule=null,this.outFields=null,this.pixelSize=null,this.raster=void 0,this.returnFirstValueOnly=!0,this.sampleDistance=null,this.sampleCount=null,this.sliceId=null,this.timeExtent=null}writeGeometry(t,e,o){null!=t&&(e.geometryType=l(t),e[o]=t.toJSON())}set locations(t){if(t?.length){const e=new s({spatialReference:t[0].spatialReference,points:t.map(({x:t,y:e})=>[t,e])});this._set("locations",t),this.geometry=e}}clone(){return new d(o({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}))}};t([r({types:m,json:{read:n}})],h.prototype,"geometry",void 0),t([c("geometry")],h.prototype,"writeGeometry",null),t([r({type:[p]})],h.prototype,"locations",null),t([r({type:String,json:{type:u.jsonValues,read:u.read,write:u.write}})],h.prototype,"interpolation",void 0),t([r({type:a,json:{write:!0}})],h.prototype,"mosaicRule",void 0),t([r({type:[String],json:{write:!0}})],h.prototype,"outFields",void 0),t([r({type:p,json:{write:!0}})],h.prototype,"pixelSize",void 0),t([r({type:String,json:{write:!0}})],h.prototype,"raster",void 0),t([r({type:Boolean,json:{write:!0}})],h.prototype,"returnFirstValueOnly",void 0),t([r({type:Number,json:{write:!0}})],h.prototype,"sampleDistance",void 0),t([r({type:Number,json:{write:!0}})],h.prototype,"sampleCount",void 0),t([r({type:Number,json:{write:!0}})],h.prototype,"sliceId",void 0),t([r({type:y,json:{read:{source:"time"},write:{target:"time"}}})],h.prototype,"timeExtent",void 0),h=d=t([i("esri.rest.support.ImageSampleParameters")],h);export{h as default};
