import type { JSONSupport } from "../../core/JSONSupport.js";
import type { MessageType } from "./types.js";

export interface GPMessageProperties extends Partial<Pick<GPMessage, "description" | "type">> {}

/**
 * Represents a message generated during the execution of a [geoprocessor](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-geoprocessor.html) method.
 * It includes information such as
 * when the processing started, what parameter values are being used, the task progress, and
 * warnings of potential problems and errors. It is composed of a message
 * [type](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-GPMessage.html#type) and [description](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-GPMessage.html#description).
 *
 * @since 4.20
 * @see [geoprocessor](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-geoprocessor.html)
 * @see [ParameterValue](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ParameterValue.html)
 * @see [JobInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-JobInfo.html)
 */
export default class GPMessage extends JSONSupport {
  constructor(properties?: GPMessageProperties);
  /** The geoprocessing message. */
  accessor description: string | null | undefined;
  /** The geoprocessing message type. */
  accessor type: MessageType | null | undefined;
}