{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Fast Stream Data Export",
    "properties": {
        "application": {
            "properties": {
                "applicationId": {
                    "_format": "uuid",
                    "maxLength": 36,
                    "minLength": 36,
                    "type": "string"
                },
                "assessment-location": {
                    "enum": [
                        "London",
                        "Newcastle"
                    ],
                    "type": "string"
                },
                "assistance-details": {
                    "properties": {
                        "etray": {
                            "properties": {
                                "invigilatedInfo": {
                                    "maxLength": 256,
                                    "minLength": 1,
                                    "type": "string"
                                },
                                "otherInfo": {
                                    "maxLength": 256,
                                    "minLength": 1,
                                    "type": "string"
                                },
                                "timeNeeded": {
                                    "type": "integer"
                                }
                            },
                            "type": "object"
                        },
                        "guaranteedInterview": {
                            "type": "boolean"
                        },
                        "hasDisability": {
                            "maxLength": 35,
                            "minLength": 2,
                            "type": "string"
                        },
                        "hasDisabilityDescription": {
                            "maxLength": 200,
                            "minLength": 0,
                            "type": "string"
                        },
                        "needsSupportAtVenue": {
                            "type": "boolean"
                        },
                        "needsSupportAtVenueDescription": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                        },
                        "needsSupportForOnlineAssessment": {
                            "type": "boolean"
                        },
                        "needsSupportForOnlineAssessmentDescription": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                        },
                        "video": {
                            "properties": {
                                "invigilatedInfo": {
                                    "maxLength": 256,
                                    "minLength": 1,
                                    "type": "string"
                                },
                                "otherInfo": {
                                    "maxLength": 256,
                                    "minLength": 1,
                                    "type": "string"
                                },
                                "timeNeeded": {
                                    "type": "integer"
                                }
                            },
                            "type": "object"
                        }
                    },
                    "required": [
                        "hasDisability",
                        "needsSupportForOnlineAssessment",
                        "needsSupportAtVenue",
                        "guaranteedInterview"
                    ],
                    "type": "object"
                },
                "civil-service-experience-details": {
                    "properties": {
                        "applicable": {
                            "type": "boolean"
                        },
                        "certificateNumber": {
                            "maxLength": 7,
                            "minLength": 1,
                            "type": "string"
                        },
                        "civilServiceExperienceType": {
                            "enum": [
                                "CivilServant",
                                "CivilServantViaFastTrack",
                                "DiversityInternship"
                            ],
                            "maxLength": 100,
                            "minLength": 1,
                            "type": "string"
                        },
                        "fastPassReceived": {
                            "type": "boolean"
                        },
                        "internshipTypes": {
                            "items": {
                                "enum": [
                                    "EDIP",
                                    "SDIPPreviousYear",
                                    "SDIPCurrentYear"
                                ],
                                "maxLength": 100,
                                "minLength": 1,
                                "type": "string"
                            },
                            "minItems": 1,
                            "type": "array",
                            "_uniqueItems": true
                        }
                    },
                    "required": [
                        "applicable"
                    ],
                    "type": "object"
                },
                "contact-details": {
                    "properties": {
                        "address": {
                            "properties": {
                                "line1": {
                                    "maxLength": 100,
                                    "minLength": 1,
                                    "type": "string"
                                },
                                "line2": {
                                    "maxLength": 100,
                                    "type": "string"
                                },
                                "line3": {
                                    "maxLength": 100,
                                    "type": "string"
                                },
                                "line4": {
                                    "maxLength": 100,
                                    "type": "string"
                                }
                            },
                            "required": [
                                "line1"
                            ],
                            "type": "object"
                        },
                        "country": {
                            "maxLength": 100,
                            "minLength": 1,
                            "type": "string"
                        },
                        "email": {
                            "_format": "email",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                        },
                        "outsideUk": {
                            "type": "boolean"
                        },
                        "phone": {
                            "maxLength": 20,
                            "minLength": 1,
                            "type": "string"
                        },
                        "postCode": {
                            "maxLength": 10,
                            "minLength": 1,
                            "type": "string"
                        }
                    },
                    "required": [
                        "outsideUk",
                        "address",
                        "email",
                        "phone"
                    ],
                    "type": "object"
                },
                "diversity-questionnaire": {
                    "properties": {
                        "questions": {
                            "properties": {
                                "Between the ages of 11 to 16, in which school did you spend most of your education?": {
                                    "properties": {
                                        "answer": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "otherDetails": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "unknown": {
                                            "type": "boolean"
                                        }
                                    },
                                    "type": "object"
                                },
                                "Between the ages of 16 to 18, in which school did you spend most of your education?": {
                                    "properties": {
                                        "answer": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "otherDetails": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "unknown": {
                                            "type": "boolean"
                                        }
                                    },
                                    "type": "object"
                                },
                                "Did they supervise employees?": {
                                    "properties": {
                                        "answer": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "otherDetails": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "unknown": {
                                            "type": "boolean"
                                        }
                                    },
                                    "type": "object"
                                },
                                "Did they work as an employee or were they self-employed?": {
                                    "properties": {
                                        "answer": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "otherDetails": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "unknown": {
                                            "type": "boolean"
                                        }
                                    },
                                    "type": "object"
                                },
                                "Did you live in the UK between the ages of 14 and 18?": {
                                    "properties": {
                                        "answer": {
                                            "maxLength": 256,
                                            "minLength": 1,
                                            "type": "string"
                                        },
                                        "otherDetails": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "unknown": {
                                            "type": "boolean"
                                        }
                                    },
                                    "type": "object"
                                },
                                "Do you have a parent or guardian that has completed a university degree course or equivalent?": {
                                    "properties": {
                                        "answer": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "otherDetails": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "unknown": {
                                            "type": "boolean"
                                        }
                                    },
                                    "type": "object"
                                },
                                "I understand this won't affect my application": {
                                    "properties": {
                                        "answer": {
                                            "enum": [
                                                "Yes",
                                                "No"
                                            ],
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "answer"
                                    ],
                                    "type": "object"
                                },
                                "Were you at any time eligible for free school meals?": {
                                    "properties": {
                                        "answer": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "otherDetails": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "unknown": {
                                            "type": "boolean"
                                        }
                                    },
                                    "type": "object"
                                },
                                "What is the name of the university you received your degree from?": {
                                    "properties": {
                                        "answer": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "otherDetails": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "unknown": {
                                            "type": "boolean"
                                        }
                                    },
                                    "type": "object"
                                },
                                "What is the name of your current university?": {
                                    "properties": {
                                        "answer": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "otherDetails": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "unknown": {
                                            "type": "boolean"
                                        }
                                    },
                                    "type": "object"
                                },
                                "What is your ethnic group?": {
                                    "properties": {
                                        "answer": {
                                            "maxLength": 256,
                                            "minLength": 1,
                                            "type": "string"
                                        },
                                        "otherDetails": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "unknown": {
                                            "type": "boolean"
                                        }
                                    },
                                    "type": "object"
                                },
                                "What is your gender identity?": {
                                    "properties": {
                                        "answer": {
                                            "maxLength": 256,
                                            "minLength": 1,
                                            "type": "string"
                                        },
                                        "otherDetails": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "unknown": {
                                            "type": "boolean"
                                        }
                                    },
                                    "type": "object"
                                },
                                "What is your sexual orientation?": {
                                    "properties": {
                                        "answer": {
                                            "maxLength": 256,
                                            "minLength": 1,
                                            "type": "string"
                                        },
                                        "otherDetails": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "unknown": {
                                            "type": "boolean"
                                        }
                                    },
                                    "type": "object"
                                },
                                "What was your home postcode when you were 14?": {
                                    "properties": {
                                        "answer": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "otherDetails": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "unknown": {
                                            "type": "boolean"
                                        }
                                    },
                                    "type": "object"
                                },
                                "When you were 14, what kind of work did your highest-earning parent or guardian do?": {
                                    "properties": {
                                        "answer": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "otherDetails": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "unknown": {
                                            "type": "boolean"
                                        }
                                    },
                                    "type": "object"
                                },
                                "Which category best describes your degree?": {
                                    "properties": {
                                        "answer": {
                                            "enum": [
                                                "(J)",
                                                "(5)",
                                                "(A)",
                                                "(3)",
                                                "(D)",
                                                "(H)",
                                                "(8)",
                                                "(I)",
                                                "(9)",
                                                "(G)",
                                                "(F)",
                                                "(C)",
                                                "(E)",
                                                "(7)",
                                                "(1)",
                                                "(2)",
                                                "(6)",
                                                "(B)",
                                                "(4)"
                                            ],
                                            "type": "string"
                                        },
                                        "unknown": {
                                            "type": "boolean"
                                        }
                                    },
                                    "type": "object"
                                },
                                "Which size would best describe their place of work?": {
                                    "properties": {
                                        "answer": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "otherDetails": {
                                            "maxLength": 256,
                                            "minLength": 0,
                                            "type": "string"
                                        },
                                        "unknown": {
                                            "type": "boolean"
                                        }
                                    },
                                    "type": "object"
                                }
                            },
                            "required": [
                                "I understand this won't affect my application",
                                "What is your gender identity?",
                                "What is your sexual orientation?",
                                "What is your ethnic group?",
                                "Did you live in the UK between the ages of 14 and 18?"
                            ],
                            "type": "object"
                        },
                        "scoring": {
                            "properties": {
                                "ses": {
                                    "type": "number"
                                }
                            },
                            "required": [
                                "ses"
                            ],
                            "type": "object"
                        }
                    },
                    "required": [
                        "questions",
                        "scoring"
                    ],
                    "type": "object"
                },
                "frameworkId": {
                    "maxLength": 15,
                    "minLength": 15,
                    "type": "string"
                },
                "media": {
                    "maxLength": 100,
                    "minLength": 0,
                    "type": "string"
                },
                "personal-details": {
                    "properties": {
                        "dateOfBirth": {
                            "_format": "date",
                            "minLength": 1,
                            "type": "string"
                        },
                        "firstName": {
                            "maxLength": 256,
                            "minLength": 1,
                            "type": "string"
                        },
                        "lastName": {
                            "maxLength": 256,
                            "minLength": 1,
                            "type": "string"
                        },
                        "preferredName": {
                            "maxLength": 256,
                            "minLength": 1,
                            "type": "string"
                        }
                    },
                    "required": [
                        "firstName",
                        "lastName",
                        "preferredName",
                        "dateOfBirth"
                    ],
                    "type": "object"
                },
                "results": {
                    "properties": {
                        "passed-schemes": {
                            "items": {
                                "enum": [
                                    "Generalist",
                                    "Commercial",
                                    "DigitalAndTechnology",
                                    "DiplomaticService",
                                    "DiplomaticServiceEconomics",
                                    "DiplomaticServiceEuropean",
                                    "European",
                                    "Finance",
                                    "GovernmentCommunicationService",
                                    "GovernmentEconomicsService",
                                    "GovernmentOperationalResearchService",
                                    "GovernmentSocialResearchService",
                                    "GovernmentStatisticalService",
                                    "HousesOfParliament",
                                    "HumanResources",
                                    "ProjectDelivery",
                                    "ScienceAndEngineering",
                                    "Edip",
                                    "Sdip"
                                ],
                                "maxLength": 64,
                                "minLength": 1,
                                "type": "string"
                            },
                            "minItems": 1,
                            "type": "array",
                            "_uniqueItems": true
                        }
                    },
                    "required": [
                        "passed-schemes"
                    ],
                    "type": "object"
                },
                "scheme-preferences": {
                    "properties": {
                        "eligible": {
                            "type": "boolean"
                        },
                        "orderAgreed": {
                            "type": "boolean"
                        },
                        "schemes": {
                            "items": {
                                "enum": [
                                    "Generalist",
                                    "Commercial",
                                    "DigitalAndTechnology",
                                    "DiplomaticService",
                                    "DiplomaticServiceEconomics",
                                    "DiplomaticServiceEuropean",
                                    "European",
                                    "Finance",
                                    "GovernmentCommunicationService",
                                    "GovernmentEconomicsService",
                                    "GovernmentOperationalResearchService",
                                    "GovernmentSocialResearchService",
                                    "GovernmentStatisticalService",
                                    "HousesOfParliament",
                                    "HumanResources",
                                    "ProjectDelivery",
                                    "ScienceAndEngineering",
                                    "Edip",
                                    "Sdip"
                                ],
                                "maxLength": 64,
                                "minLength": 1,
                                "type": "string"
                            },
                            "minItems": 1,
                            "type": "array",
                            "_uniqueItems": true
                        }
                    },
                    "required": [
                        "schemes",
                        "orderAgreed",
                        "eligible"
                    ],
                    "type": "object"
                },
                "userId": {
                    "_format": "uuid",
                    "maxLength": 36,
                    "minLength": 36,
                    "type": "string"
                },
                "withdraw": {
                    "properties": {
                        "otherReason": {
                            "maxLength": 300,
                            "minLength": 1,
                            "type": "string"
                        },
                        "reason": {
                            "maxLength": 64,
                            "minLength": 1,
                            "type": "string"
                        },
                        "withdrawer": {
                            "maxLength": 36,
                            "minLength": 1,
                            "type": "string"
                        }
                    },
                    "required": [
                        "reason",
                        "withdrawer"
                    ],
                    "type": "object"
                }
            },
            "required": [
                "userId",
                "applicationId",
                "contact-details",
                "frameworkId",
                "personal-details",
                "civil-service-experience-details",
                "scheme-preferences",
                "assistance-details",
                "diversity-questionnaire",
                "assessment-location",
                "results"
            ],
            "type": "object"
        },
        "token": {
            "_format": "uuid",
            "maxLength": 36,
            "minLength": 36,
            "type": "string"
        }
    },
    "required": [
        "application",
        "token"
    ],
    "type": "object"
}