{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "additionalProperties": false,
    "properties": {
        "stdCollection": {
            "$ref": "#/definitions/StdCollectionType"
        },
        "geoCollection": {
            "$ref": "#/definitions/GeoCollectionType"
        },
        "locCollection": {
            "$ref": "#/definitions/LocCollectionType"
        },
        "cycCollection": {
            "$ref": "#/definitions/CycCollectionType"
        },
        "detCollection": {
            "$ref": "#/definitions/DetCollectionType"
        },
        "timCollection": {
            "$ref": "#/definitions/TimCollectionType"
        },
        "cn": {
            "$ref": "#/definitions/CnResponseType"
        }
    },
    "definitions": {
        "StdCollectionType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "signalTimingData": {
                    "$ref": "#/definitions/SignalTimingDataType"
                },
                "version": {
                    "type": "string"
                }
            }
        },
        "SignalTimingDataType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "std": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Std"
                    }
                },
                "numsys": {
                    "type": "integer"
                }
            }
        },
        "Std": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "timingPlans": {
                    "$ref": "#/definitions/TimingPlans"
                },
                "id": {
                    "type": "string"
                },
                "file": {
                    "type": "string",
                    "enum": [
                        "OK",
                        "NONE"
                    ]
                },
                "path": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "TimingPlans": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "timingPlan": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/TimingPlan"
                    }
                }
            }
        },
        "TimingPlan": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "phases": {
                    "$ref": "#/definitions/Phases"
                },
                "id": {
                    "type": "string"
                },
                "cycle": {
                    "type": "integer"
                },
                "min": {
                    "type": "integer"
                },
                "offset": {
                    "type": "integer"
                },
                "sigplan": {
                    "type": "integer"
                }
            }
        },
        "Phases": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "phase": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/PhaseType"
                    }
                }
            }
        },
        "PhaseType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "value": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "serves": {
                    "type": "integer"
                },
                "rof": {
                    "type": "integer"
                },
                "split": {
                    "type": "integer"
                },
                "disp": {
                    "type": "string",
                    "enum": [
                        "EW_L",
                        "SB_L",
                        "NB_W",
                        "SB_W",
                        "WB_G",
                        "NB_L",
                        "EW_W",
                        "NS_W",
                        "EB_W",
                        "NS_E",
                        "NS_L",
                        "WB_L",
                        "SB_G",
                        "EB_L",
                        "WB_B",
                        "EW_G"
                    ]
                },
                "minvar": {
                    "type": "integer"
                },
                "variable": {
                    "type": "integer"
                },
                "clear": {
                    "type": "integer"
                },
                "fixed": {
                    "type": "integer"
                }
            }
        },
        "GeoCollectionType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "geometries": {
                    "$ref": "#/definitions/GeometriesType"
                },
                "version": {
                    "type": "string"
                }
            }
        },
        "GeometriesType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "geometry": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/GeometryType"
                    }
                },
                "path": {
                    "type": "string"
                }
            }
        },
        "GeometryType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "directions": {
                    "$ref": "#/definitions/Directions"
                },
                "id": {
                    "type": "string"
                },
                "file": {
                    "type": "string",
                    "enum": [
                        "OK",
                        "NONE"
                    ]
                },
                "path": {
                    "type": "string"
                }
            }
        },
        "Directions": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "direction": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/DirectionType"
                    }
                }
            }
        },
        "DirectionType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "movements": {
                    "$ref": "#/definitions/Movements"
                },
                "id": {
                    "type": "string"
                },
                "bound": {
                    "type": "string",
                    "enum": [
                        "NORTH",
                        "SOUTH",
                        "EAST",
                        "WEST"
                    ]
                },
                "exitlanes": {
                    "type": "integer"
                },
                "speed": {
                    "type": "integer"
                },
                "next": {
                    "type": "string"
                },
                "distance": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "Movements": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "movement": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/MovementType"
                    }
                }
            }
        },
        "MovementType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "value": {
                    "type": "string"
                },
                "dir": {
                    "type": "string",
                    "enum": [
                        "LT",
                        "ST",
                        "RT"
                    ]
                },
                "lanes": {
                    "type": "integer"
                },
                "faze": {
                    "type": "integer"
                },
                "overlap": {
                    "type": "string",
                    "enum": [
                        "E",
                        "F",
                        "A",
                        "G",
                        "B",
                        "C",
                        "H",
                        "D"
                    ]
                },
                "perm": {
                    "type": "integer"
                },
                "display": {
                    "type": "string",
                    "enum": [
                        "BALL",
                        "ARROW",
                        "STDLEFT"
                    ]
                }
            }
        },
        "LocCollectionType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "locations": {
                    "$ref": "#/definitions/LocationsType"
                },
                "version": {
                    "type": "string"
                }
            }
        },
        "LocationsType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "location": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/LocationType"
                    }
                },
                "numsys": {
                    "type": "integer"
                }
            }
        },
        "LocationType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "detectors": {
                    "$ref": "#/definitions/Detectors"
                },
                "id": {
                    "type": "string"
                },
                "file": {
                    "type": "string",
                    "enum": [
                        "OK",
                        "NONE"
                    ]
                },
                "path": {
                    "type": "string"
                }
            }
        },
        "Detectors": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "detector": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/DetectorType"
                    }
                }
            }
        },
        "DetectorType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "id": {
                    "type": "string"
                },
                "code": {
                    "type": "integer"
                },
                "faze": {
                    "type": "integer"
                },
                "lane": {
                    "type": "integer"
                },
                "mode": {
                    "type": "string"
                }
            }
        },
        "CycCollectionType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "cycles": {
                    "$ref": "#/definitions/CyclesType"
                },
                "version": {
                    "type": "string"
                }
            }
        },
        "CyclesType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "cycle": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/CycleType"
                    }
                },
                "period": {
                    "type": "integer"
                },
                "numsys": {
                    "type": "integer"
                }
            }
        },
        "CycleType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "greens": {
                    "$ref": "#/definitions/Greens"
                },
                "id": {
                    "type": "string"
                },
                "num": {
                    "type": "integer"
                },
                "cyc": {
                    "type": "integer"
                },
                "valid": {
                    "type": "integer"
                },
                "err": {
                    "type": "integer"
                },
                "trans": {
                    "type": "integer"
                },
                "offcor": {
                    "type": "integer"
                },
                "now": {
                    "type": "integer"
                },
                "std": {
                    "__aggregationType": "aggregation",
                    "$ref": "#/definitions/Std"
                },
                "geo": {
                    "type": "integer"
                },
                "node": {
                    "type": "integer"
                },
                "send": {
                    "type": "string",
                    "enum": [
                        "OK",
                        "FAIL"
                    ]
                },
                "errno": {
                    "type": "integer"
                },
                "sys": {
                    "type": "string"
                }
            }
        },
        "Greens": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "green": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/GreenType"
                    }
                }
            }
        },
        "GreenType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "id": {
                    "type": "string"
                },
                "grn": {
                    "type": "integer"
                },
                "ped": {
                    "type": "integer"
                },
                "tim": {
                    "type": "integer"
                },
                "gap": {
                    "type": "integer"
                },
                "max": {
                    "type": "integer"
                },
                "fo": {
                    "type": "integer"
                }
            }
        },
        "DetCollectionType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "sums": {
                    "$ref": "#/definitions/Sums"
                },
                "version": {
                    "type": "string"
                }
            }
        },
        "Sums": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "detection": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/DetectionType"
                    }
                },
                "period": {
                    "type": "integer"
                },
                "numsys": {
                    "type": "integer"
                }
            }
        },
        "DetectionType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "dets": {
                    "$ref": "#/definitions/Dets"
                },
                "id": {
                    "type": "string"
                },
                "now": {
                    "type": "integer"
                },
                "comm": {
                    "type": "string",
                    "enum": [
                        "OK",
                        "FAIL"
                    ]
                },
                "num": {
                    "type": "integer"
                }
            }
        },
        "Dets": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "det": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/DetType"
                    }
                }
            }
        },
        "DetType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "id": {
                    "type": "string"
                },
                "pos": {
                    "type": "integer"
                },
                "vol": {
                    "type": "integer"
                },
                "occ": {
                    "type": "integer"
                },
                "grn": {
                    "type": "integer"
                }
            }
        },
        "TimCollectionType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "timings": {
                    "$ref": "#/definitions/TimingsType"
                },
                "version": {
                    "type": "string"
                }
            }
        },
        "TimingsType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "timing": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/TimingType"
                    }
                },
                "numsys": {
                    "type": "integer"
                }
            }
        },
        "TimingType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "curPlan": {
                    "$ref": "#/definitions/TimingPlanType"
                },
                "id": {
                    "type": "integer"
                },
                "adaptive": {
                    "type": "string",
                    "enum": [
                        "PLAN",
                        "PATTERN",
                        "STANDBY"
                    ]
                },
                "adaPlan": {
                    "type": "integer"
                },
                "adaMode": {
                    "type": "string",
                    "enum": [
                        "FREE",
                        "FLASH"
                    ]
                },
                "adaPattern": {
                    "type": "integer"
                },
                "tod": {
                    "type": "string",
                    "enum": [
                        "PLAN",
                        "PATTERN",
                        "STANDBY"
                    ]
                },
                "todPlan": {
                    "type": "integer"
                },
                "todMode": {
                    "type": "string",
                    "enum": [
                        "FREE",
                        "FLASH"
                    ]
                },
                "todPattern": {
                    "type": "integer"
                },
                "todnum": {
                    "type": "integer"
                },
                "override": {
                    "type": "string",
                    "enum": [
                        "PLAN",
                        "PATTERN",
                        "STANDBY"
                    ]
                },
                "ovrPlan": {
                    "type": "integer"
                },
                "ovrMode": {
                    "type": "string",
                    "enum": [
                        "FREE",
                        "FLASH"
                    ]
                },
                "ovrPattern": {
                    "type": "integer"
                },
                "now": {
                    "type": "string",
                    "enum": [
                        "PATTERN",
                        "FLASH",
                        "TBC",
                        "STANDBY",
                        "FAIL",
                        "PLAN",
                        "UNKNOWN"
                    ]
                },
                "op": {
                    "type": "string",
                    "enum": [
                        "PICKUP",
                        "OFFSET",
                        "NCS",
                        "TRANSITION"
                    ]
                },
                "to": {
                    "type": "integer"
                },
                "fail": {
                    "type": "string",
                    "enum": [
                        "CONFLICT",
                        "CDI",
                        "PRE_EMPT",
                        "UNKNOWN",
                        "RESET"
                    ]
                }
            }
        },
        "TimingPlanType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "phases_id": {
                    "$ref": "#/definitions/Phases"
                },
                "id": {
                    "type": "string"
                },
                "cycle": {
                    "type": "integer"
                },
                "min": {
                    "type": "integer"
                },
                "offset": {
                    "type": "integer"
                },
                "sigplan": {
                    "type": "integer"
                }
            }
        },
        "CnResponseType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "version": {
                    "type": "string"
                }
            }
        }
    }
}