import TableColumnType from "../AnalyticsDatabase/TableColumnType";
export var SkipIndexType;
(function (SkipIndexType) {
    SkipIndexType["BloomFilter"] = "bloom_filter";
    SkipIndexType["Set"] = "set";
    SkipIndexType["TokenBF"] = "tokenbf_v1";
    SkipIndexType["NgramBF"] = "ngrambf_v1";
    SkipIndexType["MinMax"] = "minmax";
})(SkipIndexType || (SkipIndexType = {}));
export default class AnalyticsTableColumn {
    get key() {
        return this._key;
    }
    set key(v) {
        this._key = v;
    }
    get title() {
        return this._title;
    }
    set title(v) {
        this._title = v;
    }
    get description() {
        return this._description;
    }
    set description(v) {
        this._description = v;
    }
    get required() {
        return this._required;
    }
    set required(v) {
        this._required = v;
    }
    get isTenantId() {
        return this._isTenantId;
    }
    set isTenantId(v) {
        this._isTenantId = v;
    }
    get type() {
        return this._type;
    }
    set type(v) {
        this._type = v;
    }
    get forceGetDefaultValueOnCreate() {
        return this._forceGetDefaultValueOnCreate;
    }
    set forceGetDefaultValueOnCreate(v) {
        this._forceGetDefaultValueOnCreate = v;
    }
    get defaultValue() {
        return this._defaultValue;
    }
    set defaultValue(v) {
        this._defaultValue = v;
    }
    get isDefaultValueColumn() {
        return Boolean(this.defaultValue !== undefined);
    }
    get billingAccessControl() {
        return this._billingAccessControl;
    }
    set billingAccessControl(v) {
        this._billingAccessControl = v;
    }
    get allowAccessIfSubscriptionIsUnpaid() {
        return this._allowAccessIfSubscriptionIsUnpaid;
    }
    set allowAccessIfSubscriptionIsUnpaid(v) {
        this._allowAccessIfSubscriptionIsUnpaid = v;
    }
    get accessControl() {
        return this._accessControl;
    }
    set accessControl(v) {
        this._accessControl = v;
    }
    get skipIndex() {
        return this._skipIndex;
    }
    set skipIndex(v) {
        this._skipIndex = v;
    }
    get codec() {
        return this._codec;
    }
    set codec(v) {
        this._codec = v;
    }
    get isLowCardinality() {
        return this._isLowCardinality;
    }
    set isLowCardinality(v) {
        this._isLowCardinality = v;
    }
    get aggregateFunctionDefinition() {
        return this._aggregateFunctionDefinition;
    }
    set aggregateFunctionDefinition(v) {
        this._aggregateFunctionDefinition = v;
    }
    constructor(data) {
        this._key = "id";
        this._title = "";
        this._description = "";
        this._required = false;
        this._isTenantId = false;
        this._type = TableColumnType.Text;
        this._allowAccessIfSubscriptionIsUnpaid = false;
        /*
         * When true, the column is stored as LowCardinality(<type>) in ClickHouse
         * (dictionary-encoded). Use for String columns with a small, bounded set of
         * distinct values (e.g. serviceType, severityText, span kind) — it shrinks
         * storage and, more importantly, makes GROUP BY / filters on the column far
         * cheaper in memory. The column's `type` stays its logical type (e.g. Text);
         * only the emitted DDL changes, so every other layer treats it normally.
         */
        this._isLowCardinality = false;
        this.accessControl = data.accessControl;
        this.key = data.key;
        this.title = data.title;
        this.description = data.description;
        this.required = data.required;
        this.type = data.type;
        this.isTenantId = data.isTenantId || false;
        this.forceGetDefaultValueOnCreate = data.forceGetDefaultValueOnCreate;
        this.defaultValue = data.defaultValue;
        this.billingAccessControl = data.billingAccessControl;
        this.allowAccessIfSubscriptionIsUnpaid =
            data.allowAccessIfSubscriptionIsUnpaid || false;
        this.skipIndex = data.skipIndex;
        this.codec = data.codec;
        this.isLowCardinality = data.isLowCardinality || false;
        this.aggregateFunctionDefinition = data.aggregateFunctionDefinition;
    }
}
//# sourceMappingURL=TableColumn.js.map