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/references/core/rest/geoprocessor/) 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/references/core/rest/support/GPMessage/#type) and [description](https://developers.arcgis.com/javascript/latest/references/core/rest/support/GPMessage/#description).
 *
 * @since 4.20
 * @see [geoprocessor](https://developers.arcgis.com/javascript/latest/references/core/rest/geoprocessor/)
 * @see [ParameterValue](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ParameterValue/)
 * @see [JobInfo](https://developers.arcgis.com/javascript/latest/references/core/rest/support/JobInfo/)
 */
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;
}