{
  "$schema": "http://json-schema.org/draft-04/schema#",

  "title": "Config file",
  "description": "Config file to store configuration, e.g.: definition of groups and pools",

  "type": "object",

  "properties": {

    "apps": {
      "description": "APP definitions",
      "type": "array",
      "items": {
        "allOf": [
          { "$ref": "definitions.json#/app" },
          { "properties": {
              "id": {
                "description": "APP ID",
                "$ref": "definitions.json#/uint"
              }
            },
            "required": ["id"]
          }
        ]
      },
      "uniqueItems": true
    },

    "pools": {
      "description": "Pools of APPs definitions",
      "type": "array",
      "items": { "$ref": "pool.json#/pool_cfg" },
      "uniqueItems": true
    },

    "sstbf": {
      "description": "SST-BF configuration",
      "type": "object",
      "properties": {
        "configured": {
          "description": "SST-BF status",
          "type": "boolean"
        }
      },
      "required": ["configured"],
      "additionalProperties": false
    },

    "rdt": {
      "description": "RDT configuration",
      "type": "object",
      "properties": {
        "l2cdp": {
          "description": "Enable L2 CDP",
          "type": "boolean",
          "default": false
        },
        "l3cdp": {
          "description": "Enable L3 CDP",
          "type": "boolean",
          "default": false
        }
      },
      "additionalProperties": false
    },

    "rdt_iface": {
      "description": "RDT configuration - libpqos interface",
      "type": "object",
      "properties": {
        "interface": {
          "description": "RDT interface",
          "type": "string",
          "enum": ["msr", "os"],
          "default": "msr"
        }
      },
      "required": ["interface"],
      "additionalProperties": false
    },

    "mba_ctrl": {
      "description": "MBA SW CTRL configuration",
      "type": "object",
      "properties": {
        "enabled": {
          "description": "MBA SW CTRL status",
          "type": "boolean",
          "default": false
        }
      },
      "required": ["enabled"],
      "additionalProperties": false
    },

    "power_profiles": {
      "description": "Power profiles definitions",
      "type": "array",
      "items": { "$ref": "definitions.json#/power_profile_cfg" },
      "uniqueItems": true
    },

    "power_profiles_verify": {
      "description": "Verify changes to Power Profiles or Pools with Power Profiles assigned",
      "type": "boolean"
    },

    "power_profiles_expert_mode": {
      "description": "Power Profiles Expert mode, make profiles editable",
      "type": "boolean"
    }
  },

  "required": ["pools"],
  "additionalProperties": false
}
