"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BUILTIN_CONFIG_SCHEMAS = void 0;
const contracts_1 = require("../apis/codiac-api/contracts");
/** @see https://json-schema.org/learn/getting-started-step-by-step#create */
const footprintSchema = {
    $schema: "https://json-schema.org/draft/2020-12/schema",
    $id: "https://domain.codiac.io/container-footprint.config-schema.json",
    title: "ContainerFootprint Config Schema",
    description: "Available configuration setting names for specifying properties of a ContainerFootprint",
    type: "object",
    properties: {
        assetName: { type: "string" },
        replicas: { type: "number" },
        cpuRequest: { type: "string" },
        cpuLimit: { type: "string" },
        memRequest: { type: "string" },
        memLimit: { type: "string" },
        replicasMin: { type: "number" },
        replicasMax: { type: "number" },
        scaleBy: { type: "string" }
    },
    required: ["assetName", "replicas"]
};
/** THese are reflected in the relay as ProbeCallingSettingsEnum */
const probingSchema = {
    $schema: "https://json-schema.org/draft/2020-12/schema",
    $id: "https://domain.codiac.io/probing-behavior.config-schema.json",
    title: "ProbingBehavior Config Schema",
    description: "Available configuration setting names for specifying behavior overrides for health probes",
    type: "object",
    properties: {
        startup: {
            /// <reference path="" />
            type: "object",
            properties: {
                initialDelaySeconds: { type: "number" },
                periodSeconds: { type: "number" },
                timeoutSeconds: { type: "number" },
                successThreshold: { type: "number" },
                failureThreshold: { type: "number" },
                disabled: { type: "boolean" }
            }
        },
        liveness: {
            /// <reference path="" />
            type: "object",
            properties: {
                initialDelaySeconds: { type: "number" },
                periodSeconds: { type: "number" },
                timeoutSeconds: { type: "number" },
                successThreshold: { type: "number" },
                failureThreshold: { type: "number" },
                disabled: { type: "boolean" }
            }
        },
        readiness: {
            /// <reference path="" />
            type: "object",
            properties: {
                initialDelaySeconds: { type: "number" },
                periodSeconds: { type: "number" },
                timeoutSeconds: { type: "number" },
                successThreshold: { type: "number" },
                failureThreshold: { type: "number" },
                disabled: { type: "boolean" }
            }
        }
        // // TODO: Expand these into hierarchy (so we can support proper object schemas)...
        // ["startup.initialDelaySeconds"]: { type: "number" },
        // ["startup.periodSeconds"]: { type: "number" },
        // ["startup.timeoutSeconds"]: { type: "number" },
        // ["startup.successThreshold"]: { type: "number" },
        // ["startup.failureThreshold"]: { type: "number" },
        // ["startup.disabled"]: { type: "boolean" },
        // ["liveness.initialDelaySeconds"]: { type: "number" },
        // ["liveness.periodSeconds"]: { type: "number" },
        // ["liveness.timeoutSeconds"]: { type: "number" },
        // ["liveness.successThreshold"]: { type: "number" },
        // ["liveness.failureThreshold"]: { type: "number" },
        // ["liveness.disabled"]: { type: "boolean" },
        // ["readiness.initialDelaySeconds"]: { type: "number" },
        // ["readiness.periodSeconds"]: { type: "number" },
        // ["readiness.timeoutSeconds"]: { type: "number" },
        // ["readiness.successThreshold"]: { type: "number" },
        // ["readiness.failureThreshold"]: { type: "number" },
        // ["readiness.disabled"]: { type: "boolean" }
    },
    required: []
};
/** Provides the available config settings for config types whose setting names are predefined. */
exports.BUILTIN_CONFIG_SCHEMAS = {
    [contracts_1.ConfigDefTypesEnum.footprint]: footprintSchema,
    [contracts_1.ConfigDefTypesEnum.probing]: probingSchema
};
//# sourceMappingURL=builtin-config-schemas.js.map