{
    "title": "G5 Services Schema",
    "type": "object",
    "additionalProperties": false,
    "properties": {
        "id": {
            "type": "string",
            "pattern": "^5\\-.*"
        },
        "status": {
            "enum": [
                "disabled",
                "enabled",
                "published"
            ]
        },
        "supplierId": {
            "type": "integer"
        },
        "lot": {
            "enum": [
                "SaaS",
                "PaaS",
                "IaaS",
                "SCS"
            ]
        },
        "title": {
            "type": "string"
        },
        "serviceName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
        },
        "serviceSummary": {
            "type": "string",
            "maxLength": 10000
        },
        "serviceBenefits": {
            "type": "array",
            "minItems": 1,
            "maxItems": 10,
            "items": {
                "type": "string",
                "maxLength": 120,
                "pattern": "^(?:\\S+\\s+){0,9}\\S+$"
            }
        },
        "serviceFeatures": {
            "type": "array",
            "minItems": 1,
            "maxItems": 10,
            "items": {
                "type": "string",
                "maxLength": 120,
                "pattern": "^(?:\\S+\\s+){0,9}\\S+$"
            }
        },
        "serviceDefinitionDocumentURL": {
            "type": "string",
            "_format": "uri"
        },
        "termsAndConditionsDocumentURL": {
            "type": "string",
            "_format": "uri"
        },
        "pricingDocumentURL": {
            "type": "string",
            "_format": "uri"
        },
        "sfiaRateDocumentURL": {
            "type": "string",
            "_format": "uri"
        },
        "additionalDocumentURLs": {
            "type": "array",
            "_uniqueItems": true,
            "items": {
                "type": "string",
                "_format": "uri"
            }
        },
        "minimumContractPeriod": {
            "enum": [
                "hour",
                "day",
                "month",
                "year",
                "other",
                "Hour",
                "Day",
                "Month",
                "Year",
                "Other"
            ]
        },
        "freeOption": {
            "type": "boolean"
        },
        "trialOption": {
            "type": "boolean"
        },
        "terminationCost": {
            "type": "boolean"
        },
        "priceMin": {
            "type": "number"
        },
        "priceUnit": {
            "type": "string"
        },
        "priceString": {
            "type": "string"
        },
        "priceMax": {
            "type": [
                "number",
                "null"
            ]
        },
        "priceInterval": {
            "enum": [
                "",
                "Second",
                "Minute",
                "Hour",
                "Day",
                "Week",
                "Month",
                "Quarter",
                "6 months",
                "Year"
            ]
        },
        "vatIncluded": {
            "type": "boolean"
        },
        "serviceTypes": {
            "oneOf": [
                {
                    "id": "SaaS - G5",
                    "type": "array",
                    "_uniqueItems": true,
                    "maxItems": 25,
                    "items": {
                        "enum": [
                            "Accessibility",
                            "Agile Tools",
                            "Analytics",
                            "Antispam / CAPTCHA",
                            "Asset Management",
                            "Content Management Systems (CMS)",
                            "Customer Relationship Management (CRM)",
                            "Data Visualisation",
                            "EDRM / Collaboration",
                            "Email",
                            "End User Device (EUD)",
                            "Enterprise Resource Planning",
                            "Forms",
                            "Gamification",
                            "Geographic Search",
                            "Identity",
                            "Learning Management Systems (LMS)",
                            "Office Productivity",
                            "Polls/Surveys",
                            "Search",
                            "Service Monitoring",
                            "Simulation & Training",
                            "Un-listed",
                            "User Alerts"
                        ]
                    }
                },
                {
                    "id": "SaaS - Updated to G6",
                    "type": "array",
                    "_uniqueItems": true,
                    "maxItems": 25,
                    "items": {
                        "enum": [
                            "Accounting and finance",
                            "Business intelligence and analytics",
                            "Collaboration",
                            "Customer relationship management (CRM)",
                            "Creative and design",
                            "Data management",
                            "Electronic document and records management (EDRM)",
                            "Energy and environment",
                            "Healthcare",
                            "Human resources and employee management",
                            "IT management",
                            "Legal",
                            "Libraries",
                            "Marketing",
                            "Operations management",
                            "Project management and planning",
                            "Sales",
                            "Schools and education",
                            "Security",
                            "Software development tools",
                            "Telecoms",
                            "Transport and logistics"
                        ]
                    }
                },
                {
                    "id": "PaaS - G5",
                    "type": "array",
                    "_uniqueItems": true,
                    "maxItems": 25,
                    "items": {
                        "enum": [
                            "Application Deployment",
                            "Components"
                        ]
                    }
                },
                {
                    "id": "IaaS - G5",
                    "type": "array",
                    "_uniqueItems": true,
                    "maxItems": 25,
                    "items": {
                        "enum": [
                            "Compute",
                            "Content Delivery Network (CDN)",
                            "Storage",
                            "Other"
                        ]
                    }
                },
                {
                    "id": "SCS - G5",
                    "type": "array",
                    "_uniqueItems": true,
                    "maxItems": 25,
                    "items": {
                        "enum": [
                            "Business Analysis",
                            "Data quality",
                            "Data recovery, conversion and migration",
                            "Data storage consultancy",
                            "Deployment",
                            "Design and Development",
                            "Design Authority",
                            "eDiscovery",
                            "Digital archiving",
                            "Enterprise Architecture",
                            "Helpdesk",
                            "Information Management and Digital Continuity",
                            "Onboarding services",
                            "Project Management, Programme Management and Governance",
                            "Project Specification and Selection",
                            "Service Integration and Management Services (SIAM)",
                            "Service Management",
                            "Software Support",
                            "Specialist Cloud Services",
                            "Transition Management",
                            "User Management"
                        ]
                    }
                },
                {
                    "id": "SCS - Updated to G6",
                    "type": "array",
                    "_uniqueItems": true,
                    "maxItems": 25,
                    "items": {
                        "enum": [
                            "Implementation",
                            "Ongoing Support",
                            "Planning",
                            "Testing",
                            "Training"
                        ]
                    }
                }
            ]
        },
        "educationPricing": {
            "type": "boolean"
        },
        "networksConnected": {
            "type": "array",
            "_uniqueItems": true,
            "maxItems": 7,
            "items": {
                "enum": [
                    "Internet",
                    "Public Services Network (PSN)",
                    "Government Secure intranet (GSi)",
                    "Police National Network (PNN)",
                    "New NHS Network (N3)",
                    "Joint Academic Network (JANET)",
                    "Other"
                ]
            }
        },
        "apiAccess": {
            "type": "boolean"
        },
        "elasticCloud": {
            "type": "boolean"
        },
        "guaranteedResources": {
            "type": "boolean"
        },
        "persistentStorage": {
            "type": "boolean"
        },
        "openStandardsSupported": {
            "type": "boolean"
        },
        "openSource": {
            "type": "boolean"
        },
        "serviceOnboarding": {
            "type": "boolean"
        },
        "serviceOffboarding": {
            "type": "boolean"
        },
        "dataExtractionRemoval": {
            "type": "boolean"
        },
        "datacentresEUCode": {
            "type": "boolean"
        },
        "datacentreTier": {
            "type": "string"
        },
        "dataBackupRecovery": {
            "type": "boolean"
        },
        "selfServiceProvisioning": {
            "type": "boolean"
        },
        "supportForThirdParties": {
            "type": "boolean"
        }
    },
    "required": [
        "id",
        "status",
        "supplierId",
        "lot",
        "title",
        "serviceName",
        "serviceSummary",
        "serviceDefinitionDocumentURL",
        "termsAndConditionsDocumentURL",
        "pricingDocumentURL",
        "minimumContractPeriod",
        "freeOption",
        "trialOption",
        "terminationCost",
        "priceMin",
        "priceUnit",
        "priceString"
    ]
}