import type Accessor from "../../core/Accessor.js";
import type TraceConfiguration from "./TraceConfiguration.js";
import type { MultiOriginJSONSupportMixin } from "../../core/MultiOriginJSONSupport.js";
import type { ResultType } from "./jsonTypes.js";
import type { TraceType } from "./typeUtils.js";
import type { TraceConfigurationProperties } from "./TraceConfiguration.js";

export interface NamedTraceConfigurationProperties extends Partial<Pick<NamedTraceConfiguration, "creator" | "description" | "globalId" | "minStartingPoints" | "resultTypes" | "tags" | "title" | "traceType">> {
  /**
   * The date/time when the trace configuration has been added to the utility network.
   * Trace configurations can be added using the [Add Trace configuration](https://pro.arcgis.com/en/pro-app/latest/tool-reference/utility-networks/add-trace-configuration.htm) gp tool or the [REST end point](https://developers.arcgis.com/rest/services-reference/enterprise/create-traceconfiguration-utility-network-server-.htm) gp tool
   * or the [REST](https://developers.arcgis.com/rest/services-reference/enterprise/create-traceconfiguration-utility-network-server-.htm) end point.
   */
  creationDate?: (Date | number | string) | null;
  /** The full definition of the trace configuration. Only available when fully loading a utility network. */
  traceConfiguration?: TraceConfigurationProperties | null;
}

/**
 * This class describes a trace configuration object. It contains the necessary properties used to perform a trace, and identifies what the trace should return.
 * Trace configurations can be shared across an organization through a webmap during publishing, and are part of the webmap spec. Named trace configurations improve the user experience associated with tracing, since it allows users to run pre-configured traces without needing to understand every configuration detail.
 * Trace configurations can be added using the [Add Trace Configuration](https://pro.arcgis.com/en/pro-app/latest/tool-reference/utility-networks/add-trace-configuration.htm) gp tool or the [REST end point](https://developers.arcgis.com/rest/services-reference/enterprise/create-traceconfiguration-utility-network-server-.htm).
 *
 * @since 4.20
 * @see [Learn more about Named Trace Configurations](https://pro.arcgis.com/en/pro-app/latest/help/data/utility-network/about-trace-configurations.htm)
 * @see [Add Trace Configurations](https://pro.arcgis.com/en/pro-app/latest/tool-reference/utility-networks/add-trace-configuration.htm)
 * @see [UtilityNetwork](https://developers.arcgis.com/javascript/latest/references/core/networks/UtilityNetwork/)
 * @see [TraceConfiguration](https://developers.arcgis.com/javascript/latest/references/core/networks/support/TraceConfiguration/)
 */
export default class NamedTraceConfiguration extends NamedTraceConfigurationSuperclass {
  constructor(properties?: NamedTraceConfigurationProperties);
  /**
   * The date/time when the trace configuration has been added to the utility network.
   * Trace configurations can be added using the [Add Trace configuration](https://pro.arcgis.com/en/pro-app/latest/tool-reference/utility-networks/add-trace-configuration.htm) gp tool or the [REST end point](https://developers.arcgis.com/rest/services-reference/enterprise/create-traceconfiguration-utility-network-server-.htm) gp tool
   * or the [REST](https://developers.arcgis.com/rest/services-reference/enterprise/create-traceconfiguration-utility-network-server-.htm) end point.
   */
  get creationDate(): Date | null | undefined;
  set creationDate(value: (Date | number | string) | null | undefined);
  /**
   * The portal user who created the trace configuration.
   * Trace configurations can be added using the `Add Trace configuration` gp tool or the REST end point.
   */
  accessor creator: string | null | undefined;
  /** Short description of what kind of trace this trace configuration performs. */
  accessor description: string | null | undefined;
  /** The `globalId` (UUID) uniquely identifies a trace configuration. Users can pass this id to a trace to reference the trace configuration to be used by the trace. */
  accessor globalId: string;
  /**
   * The minimum number of starting points required to perform a trace with this particular trace configuration.
   * Some trace configurations (`e.g. Subnetwork`) does not require any starting points because the persisted subnetwork name is used to determine the starting locations.
   * This property can be used to derive a user experience, for instance, hide or show the starting location control if `minStartingPoints` is `none`.
   */
  accessor minStartingPoints: "none" | "one" | "many" | null | undefined;
  /** The result types of the trace configuration. The trace can return elements and aggregated geometries of the results. Specifies the expected trace results. */
  accessor resultTypes: ResultType[];
  /** Labels that help identify and search for a particular trace configuration. */
  accessor tags: string[];
  /** The title or the name of the trace configuration. Trace configuration names are not unique. */
  accessor title: string;
  /** The full definition of the trace configuration. Only available when fully loading a utility network. */
  get traceConfiguration(): TraceConfiguration | null | undefined;
  set traceConfiguration(value: TraceConfigurationProperties | null | undefined);
  /**
   * The trace type defined in this trace configuration.
   *
   * > [!WARNING]
   * >
   * > The `path` and `circuit` types is reserved for future use.
   */
  accessor traceType: TraceType | null | undefined;
}
declare const NamedTraceConfigurationSuperclass: typeof Accessor & typeof MultiOriginJSONSupportMixin