import { Equals } from "@tsplus/stdlib/structure/Equals";
import { Hash } from "@tsplus/stdlib/structure/Hash";
import { MetricKeyType } from "@effect/core/io/Metrics/MetricKeyType";
import { HashMap } from "@tsplus/stdlib/collections/HashMap/definition";
import { Chunk } from "@tsplus/stdlib/collections/Chunk/definition";
import { Tuple } from "@tsplus/stdlib/data/Tuple/definition";
import { Maybe } from "@tsplus/stdlib/data/Maybe/definition";
export declare const MetricStateSym: unique symbol;
export declare type MetricStateSym = typeof MetricStateSym;
export declare const _Type: unique symbol;
export declare type _Type = typeof _Type;
export declare const CounterStateSym: unique symbol;
export declare type CounterStateSym = typeof CounterStateSym;
export declare const GaugeStateSym: unique symbol;
export declare type GaugeStateSym = typeof GaugeStateSym;
export declare const FrequencyStateSym: unique symbol;
export declare type FrequencyStateSym = typeof FrequencyStateSym;
export declare const HistogramStateSym: unique symbol;
export declare type HistogramStateSym = typeof HistogramStateSym;
export declare const SummaryStateSym: unique symbol;
export declare type SummaryStateSym = typeof SummaryStateSym;
/**
 * A `MetricState` describes the state of a metric. The type parameter of a
 * metric state corresponds to the type of the metric key (`MetricKeyType`).
 * This phantom type parameter is used to tie keys to their expected states.
 *
 * @tsplus type ets/Metrics/MetricState
 */
export interface MetricState<Type> extends Equals {
    readonly [MetricStateSym]: MetricStateSym;
    readonly [_Type]: (_: Type) => void;
}
export declare namespace MetricState {
    type Untyped = MetricState<any>;
    type Counter = CounterState;
    type Frequency = FrequencyState;
    type Gauge = GaugeState;
    type Histogram = HistogramState;
    type Summary = SummaryState;
}
/**
 * @tsplus type ets/Metrics/MetricState/Ops
 */
export interface MetricStateOps {
}
export declare const MetricState: MetricStateOps;
export declare abstract class BaseMetricState<Type> implements MetricState<Type> {
    readonly [MetricStateSym]: MetricStateSym;
    readonly [_Type]: (_: Type) => void;
    abstract [Hash.sym](): number;
    abstract [Equals.sym](u: unknown): boolean;
}
export declare class CounterState extends BaseMetricState<MetricKeyType.Counter> {
    readonly count: number;
    readonly [CounterStateSym]: CounterStateSym;
    constructor(count: number);
    [Hash.sym](): number;
    [Equals.sym](u: unknown): boolean;
}
export declare class GaugeState extends BaseMetricState<MetricKeyType.Gauge> {
    readonly value: number;
    readonly [GaugeStateSym]: GaugeStateSym;
    constructor(value: number);
    [Hash.sym](): number;
    [Equals.sym](u: unknown): boolean;
}
export declare class FrequencyState extends BaseMetricState<MetricKeyType.Frequency> {
    readonly occurrences: HashMap<string, number>;
    readonly [FrequencyStateSym]: FrequencyStateSym;
    constructor(occurrences: HashMap<string, number>);
    [Hash.sym](): number;
    [Equals.sym](u: unknown): boolean;
}
export declare class HistogramState extends BaseMetricState<MetricKeyType.Histogram> {
    readonly buckets: Chunk<Tuple<[number, number]>>;
    readonly count: number;
    readonly min: number;
    readonly max: number;
    readonly sum: number;
    readonly [HistogramStateSym]: HistogramStateSym;
    constructor(buckets: Chunk<Tuple<[number, number]>>, count: number, min: number, max: number, sum: number);
    [Hash.sym](): number;
    [Equals.sym](u: unknown): boolean;
}
export declare class SummaryState extends BaseMetricState<MetricKeyType.Summary> {
    readonly error: number;
    readonly quantiles: Chunk<Tuple<[number, Maybe<number>]>>;
    readonly count: number;
    readonly min: number;
    readonly max: number;
    readonly sum: number;
    readonly [SummaryStateSym]: SummaryStateSym;
    constructor(error: number, quantiles: Chunk<Tuple<[number, Maybe<number>]>>, count: number, min: number, max: number, sum: number);
    [Hash.sym](): number;
    [Equals.sym](u: unknown): boolean;
}
/**
 * @tsplus static ets/Metrics/MetricState/Ops Counter
 * @tsplus location "@effect/core/io/Metrics/MetricState"
 */
export declare function counter(count: number): MetricState.Counter;
/**
 * @tsplus static ets/Metrics/MetricState/Ops Gauge
 * @tsplus location "@effect/core/io/Metrics/MetricState"
 */
export declare function gauge(value: number): MetricState.Gauge;
/**
 * @tsplus static ets/Metrics/MetricState/Ops Frequency
 * @tsplus location "@effect/core/io/Metrics/MetricState"
 */
export declare function frequency(occurrences: HashMap<string, number>): MetricState.Frequency;
/**
 * @tsplus static ets/Metrics/MetricState/Ops Histogram
 * @tsplus location "@effect/core/io/Metrics/MetricState"
 */
export declare function histogram(buckets: Chunk<Tuple<[number, number]>>, count: number, min: number, max: number, sum: number): MetricState.Histogram;
/**
 * @tsplus static ets/Metrics/MetricState/Ops Summary
 * @tsplus location "@effect/core/io/Metrics/MetricState"
 */
export declare function summary(error: number, quantiles: Chunk<Tuple<[number, Maybe<number>]>>, count: number, min: number, max: number, sum: number): MetricState.Summary;
/**
 * @tsplus static ets/Metrics/MetricState/Ops isCounterState
 * @tsplus location "@effect/core/io/Metrics/MetricState"
 */
export declare function isCounterState(u: unknown): u is MetricState.Counter;
/**
 * @tsplus static ets/Metrics/MetricState/Ops isGaugeState
 * @tsplus location "@effect/core/io/Metrics/MetricState"
 */
export declare function isGaugeState(u: unknown): u is MetricState.Gauge;
/**
 * @tsplus static ets/Metrics/MetricState/Ops isFrequencyState
 * @tsplus location "@effect/core/io/Metrics/MetricState"
 */
export declare function isFrequencyState(u: unknown): u is MetricState.Frequency;
/**
 * @tsplus static ets/Metrics/MetricState/Ops isHistogramState
 * @tsplus location "@effect/core/io/Metrics/MetricState"
 */
export declare function isHistogramState(u: unknown): u is MetricState.Histogram;
/**
 * @tsplus static ets/Metrics/MetricState/Ops isSummaryState
 * @tsplus location "@effect/core/io/Metrics/MetricState"
 */
export declare function isSummaryState(u: unknown): u is MetricState.Summary;
//# sourceMappingURL=MetricState.d.ts.map