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

export interface AssociationGeometriesResultProperties extends Partial<Pick<AssociationGeometriesResult, "maxGeometryCountExceeded">> {
  /** List of returned [associations](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/Association/) filtered based on the input parameters in [SynthesizeAssociationGeometriesParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/SynthesizeAssociationGeometriesParameters/). */
  associations?: AssociationProperties[];
}

/**
 * This class defines the results of the function [synthesizeAssociationGeometries](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/synthesizeAssociationGeometries/) which takes an extent and returns an [AggregatedGeometry](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/AggregatedGeometry/) of all
 * [associations](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/Association/) within the extent based on the defined parameters.
 *
 * @since 4.20
 * @see [synthesizeAssociationGeometries](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/synthesizeAssociationGeometries/)
 */
export default class AssociationGeometriesResult extends JSONSupport {
  constructor(properties?: AssociationGeometriesResultProperties);
  /** List of returned [associations](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/Association/) filtered based on the input parameters in [SynthesizeAssociationGeometriesParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/SynthesizeAssociationGeometriesParameters/). */
  get associations(): Association[];
  set associations(value: AssociationProperties[]);
  /**
   * Indicates whether the [SynthesizeAssociationGeometriesParameters.maxGeometryCount](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/SynthesizeAssociationGeometriesParameters/#maxGeometryCount) has exceeded. If the number of associations are larger than the `maxGeometryCount`, this property is set to `true`
   *
   * @default false
   */
  accessor maxGeometryCountExceeded: boolean;
}