/*
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 r}from"../../core/lang.js";import{property as o,subclass as i}from"../../core/accessorSupport/decorators.js";import s from"../../geometry/Point.js";import{getJsonType as n}from"../../geometry/support/jsonTypeUtils.js";import{geometryTypes as l}from"../../geometry/support/typeUtils.js";import u from"../../layers/support/MosaicRule.js";import p from"../../layers/support/RasterFunction.js";import a from"../../time/TimeExtent.js";import{writer as m}from"../../core/accessorSupport/decorators/writer.js";var c;let y=c=class extends e{constructor(t){super(t),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(t,e,r){null!=t&&(e.geometryType=n(t),e[r]=JSON.stringify(t.toJSON()))}set mosaicRule(t){let e=t;e?.mosaicMethod&&(e=u.fromJSON({...e.toJSON(),mosaicMethod:e.mosaicMethod,mosaicOperation:e.mosaicOperation})),this._set("mosaicRule",e)}writeMosaicRule(t,e,r){null!=t&&(e[r]=JSON.stringify(t.toJSON()))}set rasterFunction(t){let e=t;e?.rasterFunction&&(e=p.fromJSON({...e.toJSON(),rasterFunction:e.rasterFunction,rasterFunctionArguments:e.rasterFunctionArguments})),this._set("rasterFunction",e)}writeRasterFunction(t,e,r){null!=t&&(e[r]=JSON.stringify(t.toJSON())),t.rasterFunctionDefinition&&(e[r]=JSON.stringify(t.rasterFunctionDefinition))}writeRasterFunctions(t,e,r){null!=t&&(e[r]=JSON.stringify(t.map(t=>t.rasterFunctionDefinition||t.toJSON())))}writePixelSize(t,e,r){null!=t&&(e[r]=JSON.stringify(t))}writeTimeExtent(t,e,r){if(null!=t){const o=null!=t.start?t.start.getTime():null,i=null!=t.end?t.end.getTime():null;e[r]=null!=o?null!=i?`${o},${i}`:`${o}`:null}}clone(){return new c(r({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};t([o({types:l,json:{write:!0}})],y.prototype,"geometry",void 0),t([m("geometry")],y.prototype,"writeGeometry",null),t([o({type:u,json:{write:!0}})],y.prototype,"mosaicRule",null),t([m("mosaicRule")],y.prototype,"writeMosaicRule",null),t([o({type:p,json:{write:!0,name:"renderingRule"}})],y.prototype,"rasterFunction",null),t([m("rasterFunction")],y.prototype,"writeRasterFunction",null),t([o({type:[p],json:{write:!0,name:"renderingRules"}})],y.prototype,"rasterFunctions",void 0),t([m("rasterFunctions")],y.prototype,"writeRasterFunctions",null),t([o({type:s,json:{write:!0}})],y.prototype,"pixelSize",void 0),t([m("pixelSize")],y.prototype,"writePixelSize",null),t([o({type:Boolean,json:{write:!0}})],y.prototype,"returnGeometry",void 0),t([o({type:Boolean,json:{write:!0}})],y.prototype,"returnCatalogItems",void 0),t([o({type:Boolean,json:{write:!0}})],y.prototype,"returnPixelValues",void 0),t([o({type:Number,json:{write:!0}})],y.prototype,"maxItemCount",void 0),t([o({type:a,json:{write:{target:"time"}}})],y.prototype,"timeExtent",void 0),t([m("timeExtent")],y.prototype,"writeTimeExtent",null),t([o({json:{write:!0}})],y.prototype,"raster",void 0),t([o({json:{write:!0}})],y.prototype,"viewId",void 0),t([o({type:Boolean,json:{write:!0}})],y.prototype,"processAsMultidimensional",void 0),y=c=t([i("esri.rest.support.ImageIdentifyParameters")],y);export{y as default};
