{
    "title": "ApprovalRequests",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.security.foureyes.ApprovalRequests",
    "type": "object",
    "required": [
        "deliveryDate",
        "requests"
    ],
    "properties": {
        "deliveryDate": {
            "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
            "type": "string",
            "format": "date-time"
        },
        "requests": {
            "type": "array",
            "items": {
                "javaType": "com.sos.joc.model.security.foureyes.ApprovalRequest",
                "type": "object",
                "extends": {
                    "javaType": "com.sos.joc.model.security.foureyes.ApprovalBase",
                    "type": "object",
                    "properties": {
                        "requestor": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255,
                            "minLength": 1
                        },
                        "requestUrl": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255,
                            "minLength": 1
                        },
                        "requestBody": {
                            "type": "object",
                            "javaType": "com.sos.joc.model.security.foureyes.RequestBody",
                            "additionalProperties": true
                        },
                        "category": {
                            "javaType": "com.sos.joc.model.audit.CategoryType",
                            "type": "string",
                            "enum": [
                                "INVENTORY",
                                "CONTROLLER",
                                "DAILYPLAN",
                                "OTHERS",
                                "DEPLOYMENT",
                                "DOCUMENTATIONS",
                                "CERTIFICATES",
                                "IDENTITY",
                                "SETTINGS",
                                "MONITORING",
                                "UNKNOWN"
                            ]
                        }
                    },
                    "additionalProperties": false
                },
                "properties": {
                    "id": {
                        "type": "number",
                        "format": "utc-millisec",
                        "minimum": 0
                    },
                    "title": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255,
                        "minLength": 1
                    },
                    "approver": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255,
                        "minLength": 1
                    },
                    "unknownApprover": {
                        "description": "An approver was selected for the approval request but is not longer configured as approver",
                        "type": "boolean",
                        "default": false
                    },
                    "reason": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "approverState": {
                        "javaType": "com.sos.joc.model.security.foureyes.ApproverState",
                        "type": "string",
                        "enum": [
                            "PENDING",
                            "APPROVED",
                            "REJECTED"
                        ]
                    },
                    "approverStateDate": {
                        "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
                        "type": "string",
                        "format": "date-time"
                    },
                    "requestorState": {
                        "javaType": "com.sos.joc.model.security.foureyes.RequestorState",
                        "type": "string",
                        "enum": [
                            "REQUESTED",
                            "WITHDRAWN",
                            "EXECUTED"
                        ]
                    },
                    "requestorStateDate": {
                        "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "additionalProperties": false
            }
        },
        "approvers": {
            "type": "array",
            "items": {
                "javaType": "com.sos.joc.model.security.foureyes.Approver",
                "type": "object",
                "required": [
                    "accountName",
                    "firstName",
                    "lastName"
                ],
                "properties": {
                    "accountName": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255,
                        "minLength": 1
                    },
                    "firstName": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 30,
                        "minLength": 1
                    },
                    "lastName": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 30,
                        "minLength": 1
                    },
                    "email": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    }
                },
                "additionalProperties": false
            }
        }
    },
    "additionalProperties": false
}