import type { ClonableMixin } from "../../core/Clonable.js";
import type { JSONSupport } from "../../core/JSONSupport.js";
import type { BarrierJSON, FunctionBarrierJSON, FunctionJSON, OutputConditionJSON } from "./jsonTypes.js";

export interface TraceConfigurationProperties extends Partial<Pick<TraceConfiguration, "conditionBarriers" | "functionBarriers" | "functions" | "ignoreBarriersAtStartingPoints" | "includeBarriers" | "outputConditions" | "shortestPathNetworkAttributeName" | "traversabilityScope" | "validateConsistency">> {}

/**
 * The TraceConfiguration class provides the ability to configure custom trace properties required to run a network trace. These properties control trace settings for [traversability](https://developers.arcgis.com/javascript/latest/references/core/networks/support/TraceConfiguration/#traversabilityScope), [functions](https://developers.arcgis.com/javascript/latest/references/core/networks/support/TraceConfiguration/#functions), filters, and [outputs](https://developers.arcgis.com/javascript/latest/references/core/networks/support/TraceConfiguration/#outputConditions). The [Configure a trace](https://doc.esri.com/en/arcgis-pro/latest/help/data/utility-network/configure-a-trace.html) and [Add Trace Configuration (Utility Network)](https://pro.arcgis.com/en/pro-app/latest/tool-reference/utility-networks/add-trace-configuration.htm) documentation is helpful to learn more about trace configuration parameters.
 *
 * The Trace Configuration differs from the [NamedTraceConfiguration](https://developers.arcgis.com/javascript/latest/references/core/networks/support/NamedTraceConfiguration/). A NamedTraceConfiguration allows for configuring and storing properties on complex traces in a utility network. These configurations are created and stored within the utility network, and can be reused and shared across an organization. The named trace configurations can be referenced by a [globalID](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/TraceParameters/#namedTraceConfigurationGlobalId).
 *
 * The benefit of using a TraceConfiguration is the ability to configure custom trace properties without having to create and share a new named trace configuration within the utility network. This improves user experience because it does not require users to understand all the details that go into creating an entire named trace configuration. Users can just modify certain trace properties and then execute their own custom trace.
 * In order to achieve this, users can fetch the NamedTraceConfigurations available in the [utility network](https://developers.arcgis.com/javascript/latest/references/core/networks/UtilityNetwork/#sharedNamedTraceConfigurations) and override it. To override an existing named trace configuration, create a TraceConfiguration instance and assign it to the [NamedTraceConfiguration.traceConfiguration](https://developers.arcgis.com/javascript/latest/references/core/networks/support/NamedTraceConfiguration/#traceConfiguration) property of the NamedTraceConfiguration.
 *
 * @since 4.21
 * @see [UtilityNetwork](https://developers.arcgis.com/javascript/latest/references/core/networks/UtilityNetwork/)
 * @see [NamedTraceConfiguration](https://developers.arcgis.com/javascript/latest/references/core/networks/support/NamedTraceConfiguration/)
 * @see [TraceParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/TraceParameters/)
 * @see [Configure a trace](https://doc.esri.com/en/arcgis-pro/latest/help/data/utility-network/configure-a-trace.html)
 * @see [Add Trace Configuration (Utility Network)](https://pro.arcgis.com/en/pro-app/latest/tool-reference/utility-networks/add-trace-configuration.htm)
 */
export default class TraceConfiguration extends TraceConfigurationSuperclass {
  constructor(properties?: TraceConfigurationProperties);
  /** An array of objects representing network attribute or category conditions that serve as barriers. */
  accessor conditionBarriers: BarrierJSON[];
  /**
   * An array of objects representing function barriers. Function barriers define when a trace should stop when an aggregated function condition is satisfied. For example,
   * stop the trace when the sum of the shape length network attribute exceeds 100 meters.
   */
  accessor functionBarriers: FunctionBarrierJSON[];
  /**
   * An array of objects representing function. A function allows the ability to run calculations on network attributes associated with traced network features.
   * Multiple functions can be specified for a single trace.
   */
  accessor functions: FunctionJSON[];
  /** Do not stop the trace if the starting point is a barrier. */
  accessor ignoreBarriersAtStartingPoints: boolean | null | undefined;
  /** Specifies whether the traversability barrier features will be included in the trace results. */
  accessor includeBarriers: boolean | null | undefined;
  /**
   * Specifies the type of features returned based on a network attribute or check for a category string.
   * A condition barrier uses a network attribute, an operator, a type, and an attribute value.
   *
   * @see [Trace REST API](https://developers.arcgis.com/rest/services-reference/enterprise/trace-utility-network-server-.htm)
   */
  accessor outputConditions: OutputConditionJSON[];
  /** Specifies the network attribute name used for determining the shortest path. The shortest path is calculated using a numeric network attribute such as shape length. */
  accessor shortestPathNetworkAttributeName: string | null | undefined;
  /**
   * Determines whether traversability is applied to both junctions and edges, junctions only, or edges only. For example, if we set the `traversabilityScope` to be `junctions` only, `edges` will not get evaluated
   * against traversability conditions and filters.
   *
   * Value | Description
   * ------|------------
   * junctions | Traversability will be applied to junctions only.
   * edges | Traversability will be applied to edges only.
   * junctionsAndEdges | Traversability will be applied to both junctions and edges.
   */
  accessor traversabilityScope: "junctions" | "edges" | "junctionsAndEdges" | null | undefined;
  /**
   * Specifies whether an error will be returned if dirty areas are encountered in any of the traversed features. If set to `false` the trace will succeed even when dirty areas were encountered. However, the
   * trace results might not be consistent.
   */
  accessor validateConsistency: boolean | null | undefined;
}
declare const TraceConfigurationSuperclass: typeof JSONSupport & typeof ClonableMixin