var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import AnalyticsBaseModel from "./AnalyticsBaseModel/AnalyticsBaseModel";
import Route from "../../Types/API/Route";
import AnalyticsTableEngine from "../../Types/AnalyticsDatabase/AnalyticsTableEngine";
import AnalyticsTableName from "../../Types/AnalyticsDatabase/AnalyticsTableName";
import AnalyticsTableColumn, { SkipIndexType, } from "../../Types/AnalyticsDatabase/TableColumn";
import TableColumnType from "../../Types/AnalyticsDatabase/TableColumnType";
import OperationalResource from "../../Types/Database/AccessControl/OperationalResource";
import OwnedThrough from "../../Types/Database/AccessControl/OwnedThrough";
import Permission from "../../Types/Permission";
import Service from "../DatabaseModels/Service";
let Profile = class Profile extends AnalyticsBaseModel {
    constructor() {
        const projectIdColumn = new AnalyticsTableColumn({
            key: "projectId",
            title: "Project ID",
            description: "ID of project",
            required: true,
            type: TableColumnType.ObjectID,
            isTenantId: true,
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        const primaryEntityIdColumn = new AnalyticsTableColumn({
            key: "primaryEntityId",
            title: "Service ID",
            description: "ID of the resource the profile belongs to (Service / Host / DockerHost / KubernetesCluster / Monitor — disambiguated by primaryEntityType)",
            required: true,
            type: TableColumnType.ObjectID,
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        const primaryEntityTypeColumn = new AnalyticsTableColumn({
            key: "primaryEntityType",
            isLowCardinality: true,
            title: "Service Type",
            description: "Discriminator for primaryEntityId — tells the read side which resource table to dispatch to",
            required: false,
            type: TableColumnType.Text,
            skipIndex: {
                name: "idx_service_type",
                type: SkipIndexType.Set,
                params: [10],
                granularity: 4,
            },
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        const profileIdColumn = new AnalyticsTableColumn({
            key: "profileId",
            title: "Profile ID",
            description: "Unique identifier for the profile",
            required: true,
            type: TableColumnType.Text,
            codec: { codec: "ZSTD", level: 1 },
            skipIndex: {
                name: "idx_profile_id",
                type: SkipIndexType.BloomFilter,
                params: [0.01],
                granularity: 1,
            },
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        const traceIdColumn = new AnalyticsTableColumn({
            key: "traceId",
            title: "Trace ID",
            description: "Correlation with traces",
            required: false,
            type: TableColumnType.Text,
            codec: { codec: "ZSTD", level: 1 },
            skipIndex: {
                name: "idx_trace_id",
                type: SkipIndexType.BloomFilter,
                params: [0.01],
                granularity: 1,
            },
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        const spanIdColumn = new AnalyticsTableColumn({
            key: "spanId",
            title: "Span ID",
            description: "Correlation with spans",
            required: false,
            type: TableColumnType.Text,
            codec: { codec: "ZSTD", level: 1 },
            skipIndex: {
                name: "idx_span_id",
                type: SkipIndexType.BloomFilter,
                params: [0.01],
                granularity: 1,
            },
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        const startTimeColumn = new AnalyticsTableColumn({
            key: "startTime",
            codec: [{ codec: "DoubleDelta" }, { codec: "ZSTD", level: 1 }],
            title: "Start Time",
            description: "Profile start timestamp",
            required: true,
            type: TableColumnType.DateTime64,
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        const endTimeColumn = new AnalyticsTableColumn({
            key: "endTime",
            /*
             * DoubleDelta works here (unlike Span.endTime): profiles cover
             * fixed-length collection windows, so endTime tracks startTime —
             * and endTimeUnixNano already compresses well with DoubleDelta.
             */
            codec: [{ codec: "DoubleDelta" }, { codec: "ZSTD", level: 1 }],
            title: "End Time",
            description: "Profile end timestamp",
            required: true,
            type: TableColumnType.DateTime64,
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        const startTimeUnixNanoColumn = new AnalyticsTableColumn({
            key: "startTimeUnixNano",
            title: "Start Time in Unix Nano",
            description: "Profile start timestamp in unix nanoseconds",
            required: true,
            type: TableColumnType.UInt64,
            codec: [{ codec: "DoubleDelta" }, { codec: "ZSTD", level: 1 }],
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        const endTimeUnixNanoColumn = new AnalyticsTableColumn({
            key: "endTimeUnixNano",
            title: "End Time in Unix Nano",
            description: "Profile end timestamp in unix nanoseconds",
            required: true,
            type: TableColumnType.UInt64,
            codec: [{ codec: "DoubleDelta" }, { codec: "ZSTD", level: 1 }],
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        const durationNanoColumn = new AnalyticsTableColumn({
            key: "durationNano",
            title: "Duration in Nanoseconds",
            description: "Duration of the profile in nanoseconds",
            required: true,
            type: TableColumnType.UInt64,
            codec: { codec: "ZSTD", level: 1 },
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        const profileTypeColumn = new AnalyticsTableColumn({
            key: "profileType",
            title: "Profile Type",
            description: "Type of profile (e.g., cpu, wall, alloc_objects, alloc_space, goroutine)",
            required: true,
            type: TableColumnType.Text,
            skipIndex: {
                name: "idx_profile_type",
                type: SkipIndexType.Set,
                params: [20],
                granularity: 4,
            },
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        const unitColumn = new AnalyticsTableColumn({
            key: "unit",
            title: "Unit",
            description: "Unit of the profile values (e.g., nanoseconds, bytes)",
            required: true,
            type: TableColumnType.Text,
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        const periodTypeColumn = new AnalyticsTableColumn({
            key: "periodType",
            title: "Period Type",
            description: "Sampling period type",
            required: false,
            type: TableColumnType.Text,
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        const periodColumn = new AnalyticsTableColumn({
            key: "period",
            codec: { codec: "ZSTD", level: 1 },
            title: "Period",
            description: "Sampling period value",
            required: false,
            type: TableColumnType.UInt64,
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        const attributesColumn = new AnalyticsTableColumn({
            key: "attributes",
            codec: { codec: "ZSTD", level: 3 },
            title: "Attributes",
            description: "Profile-level attributes",
            required: true,
            defaultValue: {},
            type: TableColumnType.MapStringString,
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        const entityKeysColumn = new AnalyticsTableColumn({
            key: "entityKeys",
            codec: { codec: "ZSTD", level: 3 },
            title: "Entity Keys",
            description: "Stable keys of every OpenTelemetry entity (service, host, k8s.pod, container, ...) this signal belongs to. A superset that includes the primary entity. Enables cross-cutting membership queries via has(entityKeys, :key).",
            required: true,
            defaultValue: [],
            type: TableColumnType.ArrayText,
            skipIndex: {
                name: "idx_entity_keys",
                type: SkipIndexType.BloomFilter,
                params: [0.01],
                granularity: 1,
            },
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        const attributeKeysColumn = new AnalyticsTableColumn({
            key: "attributeKeys",
            codec: { codec: "ZSTD", level: 3 },
            title: "Attribute Keys",
            description: "Attribute keys extracted from attributes",
            required: true,
            defaultValue: [],
            type: TableColumnType.ArrayText,
            skipIndex: {
                name: "idx_attribute_keys",
                type: SkipIndexType.BloomFilter,
                params: [0.01],
                granularity: 1,
            },
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        const sampleCountColumn = new AnalyticsTableColumn({
            key: "sampleCount",
            title: "Sample Count",
            description: "Number of samples in this profile",
            required: true,
            type: TableColumnType.Number,
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        const originalPayloadFormatColumn = new AnalyticsTableColumn({
            key: "originalPayloadFormat",
            title: "Original Payload Format",
            description: "Format of the original payload (e.g., pprofext)",
            required: false,
            type: TableColumnType.Text,
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [],
            },
        });
        /*
         * Scalar per-entity-type key columns — denormalized single-value
         * siblings of `entityKeys`. Each holds the 16-hex key (see
         * Common/Utils/Telemetry/EntityKey) of the row's entity of that type,
         * or '' when the resource carries no such entity (non-Nullable String,
         * so old rows read the type default ''). Unlike the array column, a
         * scalar equality predicate is usable as an MV/sort key and gets a
         * cheaper bloom-filter probe; only the high-traffic keys
         * (service/host/k8s.pod) carry skip indexes. Stamped at ingest by the
         * same extractor that fills `entityKeys`; never part of identity.
         */
        const scalarEntityKeyColumns = [
            {
                key: "serviceEntityKey",
                title: "Service Entity Key",
                indexName: "idx_service_entity_key",
            },
            {
                key: "hostEntityKey",
                title: "Host Entity Key",
                indexName: "idx_host_entity_key",
            },
            {
                key: "k8sPodEntityKey",
                title: "Kubernetes Pod Entity Key",
                indexName: "idx_k8s_pod_entity_key",
            },
            { key: "k8sNodeEntityKey", title: "Kubernetes Node Entity Key" },
            { key: "k8sClusterEntityKey", title: "Kubernetes Cluster Entity Key" },
            { key: "containerEntityKey", title: "Container Entity Key" },
        ].map((def) => {
            return new AnalyticsTableColumn({
                key: def.key,
                title: def.title,
                description: "Scalar entity key for this entity type (see entityKeys); '' when the resource has no entity of this type.",
                required: true,
                defaultValue: "",
                type: TableColumnType.Text,
                codec: { codec: "ZSTD", level: 1 },
                skipIndex: def.indexName
                    ? {
                        name: def.indexName,
                        type: SkipIndexType.BloomFilter,
                        params: [0.01],
                        granularity: 1,
                    }
                    : undefined,
                accessControl: entityKeysColumn.accessControl,
            });
        });
        const retentionDateColumn = new AnalyticsTableColumn({
            key: "retentionDate",
            codec: [{ codec: "DoubleDelta" }, { codec: "ZSTD", level: 1 }],
            title: "Retention Date",
            description: "Date after which this row is eligible for TTL deletion, computed at ingest time as startTime + service.retainTelemetryDataForDays",
            required: true,
            type: TableColumnType.Date,
            defaultValue: undefined,
        });
        super({
            tableName: AnalyticsTableName.Profile,
            tableEngine: AnalyticsTableEngine.MergeTree,
            singularName: "Profile",
            pluralName: "Profiles",
            crudApiPath: new Route("/profile"),
            accessControl: {
                read: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.Viewer,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.TelemetryViewer,
                    Permission.ReadTelemetryServiceProfiles,
                ],
                create: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.CreateTelemetryServiceProfiles,
                ],
                update: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.EditTelemetryServiceProfiles,
                ],
                delete: [
                    Permission.ProjectOwner,
                    Permission.ProjectAdmin,
                    Permission.ProjectMember,
                    Permission.TelemetryAdmin,
                    Permission.TelemetryMember,
                    Permission.DeleteTelemetryServiceProfiles,
                ],
            },
            tableColumns: [
                projectIdColumn,
                primaryEntityIdColumn,
                primaryEntityTypeColumn,
                profileIdColumn,
                traceIdColumn,
                spanIdColumn,
                startTimeColumn,
                endTimeColumn,
                startTimeUnixNanoColumn,
                endTimeUnixNanoColumn,
                durationNanoColumn,
                profileTypeColumn,
                unitColumn,
                periodTypeColumn,
                periodColumn,
                attributesColumn,
                attributeKeysColumn,
                entityKeysColumn,
                ...scalarEntityKeyColumns,
                sampleCountColumn,
                originalPayloadFormatColumn,
                retentionDateColumn,
            ],
            sortKeys: ["projectId", "startTime", "primaryEntityId", "profileType"],
            primaryKeys: ["projectId", "startTime", "primaryEntityId", "profileType"],
            partitionKey: "toYYYYMMDD(startTime)",
            tableSettings: "ttl_only_drop_parts = 1, non_replicated_deduplication_window = 10000",
            ttlExpression: "retentionDate DELETE",
            defaultSortColumn: "startTime",
        });
    }
    get projectId() {
        return this.getColumnValue("projectId");
    }
    set projectId(v) {
        this.setColumnValue("projectId", v);
    }
    get primaryEntityId() {
        return this.getColumnValue("primaryEntityId");
    }
    set primaryEntityId(v) {
        this.setColumnValue("primaryEntityId", v);
    }
    get primaryEntityType() {
        return this.getColumnValue("primaryEntityType");
    }
    set primaryEntityType(v) {
        this.setColumnValue("primaryEntityType", v);
    }
    get profileId() {
        return this.getColumnValue("profileId");
    }
    set profileId(v) {
        this.setColumnValue("profileId", v);
    }
    get traceId() {
        return this.getColumnValue("traceId");
    }
    set traceId(v) {
        this.setColumnValue("traceId", v);
    }
    get spanId() {
        return this.getColumnValue("spanId");
    }
    set spanId(v) {
        this.setColumnValue("spanId", v);
    }
    get startTime() {
        return this.getColumnValue("startTime");
    }
    set startTime(v) {
        this.setColumnValue("startTime", v);
    }
    get endTime() {
        return this.getColumnValue("endTime");
    }
    set endTime(v) {
        this.setColumnValue("endTime", v);
    }
    get startTimeUnixNano() {
        return this.getColumnValue("startTimeUnixNano");
    }
    set startTimeUnixNano(v) {
        this.setColumnValue("startTimeUnixNano", v);
    }
    get endTimeUnixNano() {
        return this.getColumnValue("endTimeUnixNano");
    }
    set endTimeUnixNano(v) {
        this.setColumnValue("endTimeUnixNano", v);
    }
    get durationNano() {
        return this.getColumnValue("durationNano");
    }
    set durationNano(v) {
        this.setColumnValue("durationNano", v);
    }
    get profileType() {
        return this.getColumnValue("profileType");
    }
    set profileType(v) {
        this.setColumnValue("profileType", v);
    }
    get unit() {
        return this.getColumnValue("unit");
    }
    set unit(v) {
        this.setColumnValue("unit", v);
    }
    get periodType() {
        return this.getColumnValue("periodType");
    }
    set periodType(v) {
        this.setColumnValue("periodType", v);
    }
    get period() {
        return this.getColumnValue("period");
    }
    set period(v) {
        this.setColumnValue("period", v);
    }
    get attributes() {
        return this.getColumnValue("attributes");
    }
    set attributes(v) {
        this.setColumnValue("attributes", v);
    }
    get attributeKeys() {
        return this.getColumnValue("attributeKeys");
    }
    set attributeKeys(v) {
        this.setColumnValue("attributeKeys", v);
    }
    get entityKeys() {
        return this.getColumnValue("entityKeys");
    }
    set entityKeys(v) {
        this.setColumnValue("entityKeys", v);
    }
    get sampleCount() {
        return this.getColumnValue("sampleCount");
    }
    set sampleCount(v) {
        this.setColumnValue("sampleCount", v);
    }
    get originalPayloadFormat() {
        return this.getColumnValue("originalPayloadFormat");
    }
    set originalPayloadFormat(v) {
        this.setColumnValue("originalPayloadFormat", v);
    }
    get retentionDate() {
        return this.getColumnValue("retentionDate");
    }
    set retentionDate(v) {
        this.setColumnValue("retentionDate", v);
    }
};
Profile = __decorate([
    OperationalResource(),
    OwnedThrough("primaryEntityId", Service, { includeProjectScope: true }),
    __metadata("design:paramtypes", [])
], Profile);
export default Profile;
//# sourceMappingURL=Profile.js.map