import type Extent from "../../../geometry/Extent.js";
import type SpatialReference from "../../../geometry/SpatialReference.js";
import type { JSONSupport } from "../../../core/JSONSupport.js";
import type { ExtentProperties } from "../../../geometry/Extent.js";
import type { SpatialReferenceProperties } from "../../../geometry/SpatialReference.js";

export interface SynthesizeAssociationGeometriesParametersProperties extends Partial<Pick<SynthesizeAssociationGeometriesParameters, "gdbVersion" | "maxGeometryCount" | "returnAttachmentAssociations" | "returnConnectivityAssociations" | "returnContainmentAssociations">> {
  /** The extent within which to synthesize association geometries. */
  extent?: ExtentProperties | null;
  /**
   * The date/timestamp (in UTC) to execute the function. This could be used to run the function in a moment in the past or in long transaction mode (undo/redo). Applicable to branch versioned datasets only.
   *
   * @see [Learn more about branch versioning](https://doc.esri.com/en/arcgis-pro/latest/help/data/geodatabases/overview/data-management-strategies.html#ESRI_SECTION1_6FA2CFB5F9484FF096740D653C674B5D).
   */
  moment?: (Date | number | string) | null;
  /** The spatial reference of the returned geometry. If not specified, the geometry is returned in the spatial reference of the feature service. */
  outSpatialReference?: SpatialReferenceProperties | null;
}

/**
 * This class describes the parameters required to execute the synthesizeAssociationGeometries function which synthesizes and returns the associations geometries in a given extent.
 *
 * @since 4.20
 * @see [synthesizeAssociationGeometries](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/synthesizeAssociationGeometries/)
 */
export default class SynthesizeAssociationGeometriesParameters extends JSONSupport {
  constructor(properties?: SynthesizeAssociationGeometriesParametersProperties);
  /** The extent within which to synthesize association geometries. */
  get extent(): Extent | null | undefined;
  set extent(value: ExtentProperties | null | undefined);
  /** The geodatabase version to execute the function against. Defaults to `SDE.DEFAULT`, if no version is provided. */
  accessor gdbVersion: string | null | undefined;
  /**
   * A number that indicates the maximum associations that should be synthesized after which the operation should immediately return.
   * Useful to avoid slowing down the operation in case many associations need to be rendered. When this count is exceeded, `synthesizeAssociationGeometries` will set a `MaxGeometryCountExceeded` to `true` in the result.
   */
  accessor maxGeometryCount: number | null | undefined;
  /**
   * The date/timestamp (in UTC) to execute the function. This could be used to run the function in a moment in the past or in long transaction mode (undo/redo). Applicable to branch versioned datasets only.
   *
   * @see [Learn more about branch versioning](https://doc.esri.com/en/arcgis-pro/latest/help/data/geodatabases/overview/data-management-strategies.html#ESRI_SECTION1_6FA2CFB5F9484FF096740D653C674B5D).
   */
  get moment(): Date | null | undefined;
  set moment(value: (Date | number | string) | null | undefined);
  /** The spatial reference of the returned geometry. If not specified, the geometry is returned in the spatial reference of the feature service. */
  get outSpatialReference(): SpatialReference | null | undefined;
  set outSpatialReference(value: SpatialReferenceProperties | null | undefined);
  /**
   * If `true`, attachment associations will be included in the results.
   *
   * @default false
   */
  accessor returnAttachmentAssociations: boolean;
  /**
   * If `true`, connectivity associations will be included in the results.
   *
   * @default false
   */
  accessor returnConnectivityAssociations: boolean;
  /**
   * Indicates whether to synthesize and return containment associations. Containment associations can be created between polygons, as a result the centroid of that polygon is used as anchor to synthesize the association geometry.
   *
   * @default false
   */
  accessor returnContainmentAssociations: boolean;
}