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

export interface FunctionResultProperties {}

/**
 * A trace can optionally return a aggregated function result if the trace configuration asked for it. An example sum or an average of a network attribute.
 *
 * @since 4.20
 * @see [trace](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/trace/)
 */
export default class FunctionResult extends JSONSupport {
  constructor(properties?: FunctionResultProperties);
  /**
   * An alias to describe and provide context for the function output.
   *
   * @since 5.1
   */
  get functionName(): string | null | undefined;
  /** The aggregate function type used in the supplied trace configuration. */
  get functionType(): "add" | "subtract" | "average" | "count" | "min" | "max" | null | undefined;
  /** The name of the function result. */
  get networkAttributeName(): string | null | undefined;
  /** Actual result of the aggregate function. */
  get result(): number | null | undefined;
}