{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "type": "object",
  "title": "WebOcConfigurationResponse",
  "description": "Web OC Configuration Response",
  "required": [
    "general",
    "components"
  ],
  "additionalProperties": false,
  "properties": {
    "components": {
      "type": "array",
      "description": "WebOcComponents",
      "items": {
        "anyOf": [
          {
            "$ref": "#/definitions/SpatialDisplayConfig"
          },
          {
            "$ref": "#/definitions/SchematicStatusDisplayConfig"
          },
          {
            "$ref": "#/definitions/SystemMonitorConfig"
          },
          {
            "$ref": "#/definitions/TopologyDisplayConfig"
          }
        ]
      }
    },
    "general": {
      "type": "object",
      "$ref": "#/definitions/GeneralConfig"
    }
  },
  "definitions": {
    "HelpMenuConfig": {
      "type": "object",
      "title": "HelpMenuConfig",
      "additionalProperties": false,
      "properties": {
        "url": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/HelpMenuConfigUrl"
          }
        },
        "path": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/HelpMenuConfigPath"
          }
        }
      }
    },
    "HelpMenuConfigUrl": {
      "type": "object",
      "title": "HelpMenuConfigUrl",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      }
    },
    "HelpMenuConfigPath": {
      "type": "object",
      "title": "HelpMenuConfigPath",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string"
        },
        "path": {
          "type": "string"
        }
      }
    },
    "TaskMenuConfig": {
      "type": "object",
      "title": "TaskMenuConfig",
      "additionalProperties": false,
      "properties": {
        "enabled": {
          "type": "boolean"
        }
      }
    },
    "GeneralConfig": {
      "type": "object",
      "title": "WebOcGeneralConfig",
      "additionalProperties": false,
      "properties": {
        "title": {
          "type": "string"
        },
        "defaultComponent": {
          "type": "string"
        },
        "customStyleSheet": {
          "type": "string"
        },
        "splashScreen": {
          "type": "string"
        },
        "helpMenu": {
          "type": "object",
          "$ref": "#/definitions/HelpMenuConfig"
        },
        "taskMenu": {
          "type": "object",
          "$ref": "#/definitions/TaskMenuConfig"
        },
        "icons": {
          "type": "object",
          "$ref": "#/definitions/IconsConfig"
        },
        "login": {
          "type": "object",
          "$ref": "#/definitions/LoginConfig"
        },
        "readonlyMode": {
          "type": "boolean",
          "description": "set to false if it is also possible to use edit functionality"
        },
        "permissionsEnabled": {
          "type": "boolean",
          "description": "Set to true if permissions are applied as used in the Permissions.xml and UserGroups.xml configurations. Als required if using OIDC integration with the web service."
        },
        "timeSettings": {
          "type": "object",
          "$ref": "#/definitions/TimeSettings"
        },
        "agreeToTermsAndConditions": {
          "type": "object",
          "$ref": "#/definitions/AgreeToTermsAndConditions",
          "description": "Set to true if the user has to agree to the terms and conditions before using the application"
        },
        "manifestFile": {
          "type": "string"
        },
        "mapLayerConfig": {
          "type": "object",
          "$ref": "#/definitions/MapLayerConfig",
          "description": "Map layer config options"
        },
        "sidePanel": {
          "type": "object",
          "$ref": "#/definitions/SidePanelConfig",
          "description": "SidePanel config options"
        }
      }
    },
    "SidePanelConfig": {
      "type": "object",
      "description": "Side Panel Configuration",
      "title": "SidePanelConfig",
      "additionalProperties": false,
      "properties": {
        "taskOverview": {
          "type": "object",
          "$ref": "#/definitions/SidePanelTaskOverviewConfig",
          "description": "SidePanel Task Overview config options"
        },
        "nonCurrentData": {
          "type": "object",
          "$ref": "#/definitions/SidePanelNonCurrentDataConfig",
          "description": "SidePanel Non Current Data config options"
        },
        "importStatus": {
          "type": "object",
          "$ref": "#/definitions/SidePanelImportStatusConfig",
          "description": "SidePanel Import Status config options"
        },
        "exportStatus": {
          "type": "object",
          "$ref": "#/definitions/SidePanelExportStatusConfig",
          "description": "SidePanel Export Status config options"
        },
        "runTask": {
          "type": "object",
          "$ref": "#/definitions/SidePanelRunTaskConfig",
          "description": "SidePanel Run Task config options"
        },
        "documentFile": {
          "type": "object",
          "$ref": "#/definitions/SidePanelDocumentFileConfig",
          "description": "SidePanel Document File config options"
        },
        "logDisplay": {
          "type": "object",
          "$ref": "#/definitions/SidePanelLogDisplayConfig",
          "description": "SidePanel log dispaly config options"
        }
      }
    },
    "SidePanelTaskOverviewConfig": {
      "type": "object",
      "description": "Side Panel Task Overview Config",
      "title": "SidePanelTaskOverviewConfig",
      "additionalProperties": false,
      "properties": {
        "enabled": {
          "description": "enable",
          "type": "boolean"
        }
      }
    },
    "SidePanelNonCurrentDataConfig": {
      "type": "object",
      "description": "Side Panel Non Current Data Config",
      "title": "SidePanelNonCurrentDataConfig",
      "additionalProperties": false,
      "properties": {
        "enabled": {
          "description": "enable",
          "type": "boolean"
        }
      }
    },
    "SidePanelImportStatusConfig": {
      "type": "object",
      "description": "Side Panel Import Status Config",
      "title": "SidePanelImportStatusConfig",
      "additionalProperties": false,
      "properties": {
        "enabled": {
          "description": "enable",
          "type": "boolean"
        }
      }
    },
    "SidePanelExportStatusConfig": {
      "type": "object",
      "description": "Side Panel Export Status Config",
      "title": "SidePanelExportStatusConfig",
      "additionalProperties": false,
      "properties": {
        "enabled": {
          "description": "enable",
          "type": "boolean"
        }
      }
    },
    "SidePanelRunTaskConfig": {
      "type": "object",
      "description": "Side Panel Run Task Config",
      "title": "SidePanelRunTaskConfig",
      "additionalProperties": false,
      "properties": {
        "enabled": {
          "description": "enable",
          "type": "boolean"
        }
      }
    },
    "SidePanelDocumentFileConfig": {
      "type": "object",
      "description": "Side Panel Document File Config",
      "title": "SidePanelDocumentFileConfig",
      "additionalProperties": false,
      "properties": {
        "enabled": {
          "description": "enable",
          "type": "boolean"
        }
      }
    },
    "SidePanelLogDisplayConfig": {
      "type": "object",
      "description": "Side Panel Log Display Config",
      "required": [
        "logDisplayId"
      ],
      "title": "SidePanelLogDisplayConfig",
      "additionalProperties": false,
      "properties": {
        "enabled": {
          "description": "enable",
          "type": "boolean"
        },
        "logDisplayId": {
          "description": "log display id",
          "type": "string"
        }
      }
    },
    "MapLayerConfig": {
      "type": "object",
      "description": "Map layer config",
      "required": [
        "mapLayers"
      ],
      "title": "MapLayerConfig",
      "additionalProperties": true,
      "properties": {
        "mapLayers": {
          "description": "Map layers",
          "type": "array",
          "items": {
            "$ref": "#/definitions/MapLayer"
          }
        },
        "defaultLightModeMapLayerId": {
          "description": "The default map for light mode",
          "type": "string"
        },
        "defaultDarkModeMapLayerId": {
          "description": "The default map for dark mode",
          "type": "string"
        }
      }
    },
    "MapLayer": {
      "type": "object",
      "description": "Map layer",
      "title": "MapLayer",
      "additionalProperties": false,
      "properties": {
        "id": {
          "description": "id of the layer",
          "type": "string"
        },
        "name": {
          "description": "name of the layer",
          "type": "string"
        },
        "styleJsonFile": {
          "description": "This can be an absolute url when the file is externally hosted, if the file is in WebResourcesFiles then it should be a relative url",
          "type": "string"
        },
        "insertWmsBeforeLayerId": {
          "description": "Definition of where the layer should be inserted, if nothing is defined the wms layer placed on top of all layers.",
          "type": "string"
        },
        "iconId": {
          "description": "Define an icon for the map layer.",
          "type": "string"
        }
      }
    },
    "IconsConfig": {
      "type": "object",
      "description": "Icons Configuration",
      "title": "WebOcIconsConfig",
      "additionalProperties": false,
      "properties": {
        "logo": {
          "description": "URL or resource id from the WebResourceFiles folder or any of its sub folder",
          "type": "string"
        },
        "favicon": {
          "description": "URL or resource id from the WebResourceFiles folder or any of its sub folder",
          "type": "string"
        }
      }
    },
    "LoginConfig": {
      "type": "object",
      "description": "Login Configuration",
      "title": "WebOcLoginConfig",
      "additionalProperties": false,
      "properties": {
        "backgroundImage": {
          "description": "URL or resource id from the WebResourceFiles folder or any of its sub folder with the background image that will be used on the login screen",
          "type": "string"
        }
      }
    },
    "AgreeToTermsAndConditions": {
      "type": "object",
      "description": "Terms and Conditions",
      "title": "TermsAndConditions",
      "additionalProperties": false,
      "properties": {
        "enabled": {
          "description": "Enable terms and conditions",
          "type": "boolean"
        }
      }
    },
    "TimeSettings": {
      "type": "object",
      "description": "View Period Presets",
      "title": "TimeSettingsViewPeriodPresets",
      "additionalProperties": false,
      "properties": {
        "viewPeriodPresets": {
          "description": "View period presets",
          "type": "array",
          "items": {
            "$ref": "#/definitions/TimeSettingsViewPeriodPreset"
          }
        }
      }
    },
    "TimeSettingsViewPeriodPreset": {
      "type": "object",
      "description": "View Period",
      "required": [
        "unit",
        "label"
      ],
      "title": "TimeSettingsViewPeriodPreset",
      "additionalProperties": false,
      "properties": {
        "unit": {
          "description": "Unit of the view period",
          "type": "string",
          "enum": [
            "second",
            "minute",
            "hour",
            "day",
            "week"
          ]
        },
        "label": {
          "description": "Label of the view period",
          "type": "string"
        },
        "start": {
          "description": "Start of the view period. Optional.",
          "type": "string"
        },
        "end": {
          "description": "End of the view period. Optional.",
          "type": "string"
        }
      }
    },
    "SpatialDisplayConfig": {
      "type": "object",
      "title": "WebOcSpatialDisplayConfig",
      "additionalProperties": false,
      "description": "Spatial Display Configuration",
      "required": [
        "id",
        "type"
      ],
      "properties": {
        "id": {
          "description": "id of the component",
          "type": "string"
        },
        "type": {
          "description": "Type of the component",
          "type": "string"
        },
        "title": {
          "description": "Title of the component",
          "type": "string"
        },
        "defaultPath": {
          "type": "object",
          "description": "Default spatial display",
          "$ref": "#/definitions/SpatialDisplayDefaultPath"
        },
        "showInNavigationMenu": {
          "description": "Show in navigation menu.",
          "type": "boolean"
        },
        "icon": {
          "description": "Configure an icon from the IconFiles config folder",
          "type": "string"
        },
        "iconId": {
          "description": "The id of the icon to use, for example an mdi icon",
          "type": "string"
        }
      }
    },
    "SchematicStatusDisplayConfig": {
      "type": "object",
      "title": "WebOcSchematicStatusDisplayConfig",
      "description": "Schematic Status Display Configuration",
      "additionalProperties": false,
      "required": [
        "id",
        "type"
      ],
      "properties": {
        "id": {
          "description": "id of the component",
          "type": "string"
        },
        "type": {
          "description": "Type of the component",
          "type": "string"
        },
        "title": {
          "description": "Title of the component",
          "type": "string"
        },
        "defaultPath": {
          "type": "object",
          "description": "Default schematic status display",
          "$ref": "#/definitions/SchematicStatusDisplayDefaultPath"
        },
        "showInNavigationMenu": {
          "description": "Show in navigation menu.",
          "type": "boolean"
        },
        "icon": {
          "type": "string"
        },
        "iconId": {
          "type": "string"
        }
      }
    },
    "SystemMonitorConfig": {
      "type": "object",
      "title": "WebOcSystemMonitorConfig",
      "description": "System Monitor Configuration",
      "additionalProperties": false,
      "required": [
        "id",
        "type"
      ],
      "properties": {
        "id": {
          "description": "id of the component",
          "type": "string"
        },
        "type": {
          "description": "Type of the component",
          "type": "string"
        },
        "title": {
          "description": "Title of the component",
          "type": "string"
        },
        "showInNavigationMenu": {
          "description": "Show in navigation menu.",
          "type": "boolean"
        },
        "icon": {
          "type": "string"
        },
        "iconId": {
          "type": "string"
        }
      }
    },
    "TopologyDisplayConfig": {
      "type": "object",
      "title": "WebOcTopologyDisplayConfig",
      "description": "Topology Display Configuration",
      "additionalProperties": false,
      "required": [
        "id",
        "type"
      ],
      "properties": {
        "id": {
          "description": "id of the component",
          "type": "string"
        },
        "type": {
          "description": "Type of the component",
          "type": "string"
        },
        "title": {
          "description": "Title of the component",
          "type": "string"
        },
        "showLeafNodesAsButtons": {
          "description": "If this option is set to true. The leaf nodes are not displayed in the topology tree but as buttons in map.",
          "type": "boolean"
        },
        "defaultPath": {
          "type": "object",
          "description": "Default grid display",
          "$ref": "#/definitions/TopologyDisplayDefaultPath"
        },
        "showInNavigationMenu": {
          "description": "Show in navigation menu.",
          "type": "boolean"
        },
        "enableTaskRuns": {
          "description": "Enable the task runs button in the topology display",
          "type": "boolean"
        },
        "showActiveThresholdCrossingsForFilters": {
          "description": "Enable the task runs button in the topology display",
          "type": "boolean"
        },
        "icon": {
          "type": "string"
        },
        "iconId": {
          "type": "string"
        }
      }
    },
    "TopologyDisplayDefaultPath": {
      "type": "object",
      "title": "TopologyDisplayDefaultPath",
      "description": "Topology Display Default Path",
      "additionalProperties": false,
      "required": [
        "nodeId"
      ],
      "properties": {
        "nodeId": {
          "description": "Node Id",
          "type": "string"
        }
      }
    },
    "SpatialDisplayDefaultPath": {
      "type": "object",
      "title": "SpatialDisplayDefaultPath",
      "description": "Spatial Default Path",
      "additionalProperties": false,
      "required": [
        "gridPlotId"
      ],
      "properties": {
        "gridPlotId": {
          "description": "Grid Plot id",
          "type": "string"
        }
      }
    },
    "SchematicStatusDisplayDefaultPath": {
      "type": "object",
      "title": "SchematicStatusDisplayDefaultPath",
      "description": "Topology Display Default Path",
      "additionalProperties": false,
      "required": [
        "groupId",
        "panelId"
      ],
      "properties": {
        "groupId": {
          "description": "groupId Id",
          "type": "string"
        },
        "panelId": {
          "description": "Panel Id",
          "type": "string"
        }
      }
    }
  }
}
