{
    "title": "available positions for a resume",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.order.OrdersResumePositions",
    "type": "object",
    "required": [
        "deliveryDate",
        "orderIds"
    ],
    "extends": {
        "javaType": "com.sos.joc.model.order.OrdersPositions",
        "type": "object",
        "required": [
            "deliveryDate",
            "orders"
        ],
        "properties": {
            "deliveryDate": {
                "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
                "type": "string",
                "format": "date-time"
            },
            "surveyDate": {
                "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
                "type": "string",
                "format": "date-time"
            },
            "workflowId": {
                "javaType": "com.sos.controller.model.workflow.WorkflowId",
                "type": "object",
                "required": [
                    "path"
                ],
                "properties": {
                    "path": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "versionId": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    }
                },
                "additionalProperties": false
            },
            "positions": {
                "type": "array",
                "uniqueItems": true,
                "items": {
                    "type": "object",
                    "javaType": "com.sos.joc.model.order.Position",
                    "properties": {
                        "position": {
                            "description": "Actually, each even item is a string, each odd item is an integer",
                            "type": "array",
                            "items": {
                                "anyOf": [
                                    {
                                        "type": "integer"
                                    },
                                    {
                                        "type": "string"
                                    }
                                ]
                            }
                        },
                        "positionString": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "type": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "label": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        }
                    }
                }
            }
        }
    },
    "properties": {
        "orderIds": {
            "type": "array",
            "uniqueItems": true,
            "items": {
                "type": "string",
                "pattern": "^[^<>]*$",
                "maxLength": 255
            }
        },
        "disabledPositionChange": {
            "javaType": "com.sos.joc.model.order.PositionChange",
            "type": "object",
            "required": [
                "code",
                "message"
            ],
            "description": "reasons that disallow the position change",
            "properties": {
                "code": {
                    "type": "string",
                    "javaType": "com.sos.joc.model.order.PositionChangeCode",
                    "enum": [
                        "NOT_ONE_WORKFLOW",
                        "NO_COMMON_POSITIONS"
                    ]
                },
                "message": {
                    "type": "string"
                }
            }
        },
        "variables": {
            "description": "a map for arbitrary key-value pairs",
            "javaType": "com.sos.inventory.model.common.Variables",
            "type": "object",
            "additionalProperties": true
        },
        "variablesNotSettable": {
            "description": "only relevant for resuming a single order. Occurs if order starts from the beginning in its scope",
            "type": "boolean"
        }
    }
}