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);
  /** 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;
}