{
    "title": "daily plan projections response",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.dailyplan.projections.ProjectionsScheduleResponse",
    "type": "object",
    "extends": {
        "javaType": "com.sos.joc.model.dailyplan.projections.items.year.MonthItem",
        "type": "object",
        "additionalProperties": {
            "javaType": "com.sos.joc.model.dailyplan.projections.items.year.DateItem",
            "type": "object",
            "description": "numOfPeriods and numOfNonPeriods are in the ./calendar response, periods and nonPeriods are in the ./dates response",
            "properties": {
                "planned": {
                    "type": "boolean"
                },
                "numOfPeriods": {
                    "type": "integer",
                    "minimum": 0
                },
                "numOfNonPeriods": {
                    "type": "integer",
                    "minimum": 0
                },
                "periods": {
                    "type": "array",
                    "items": {
                        "javaType": "com.sos.joc.model.dailyplan.projections.items.year.DatePeriodItem",
                        "type": "object",
                        "required": [
                            "schedule"
                        ],
                        "properties": {
                            "schedule": {
                                "type": "string",
                                "pattern": "^[^<>]*$",
                                "maxLength": 255
                            },
                            "period": {
                                "javaType": "com.sos.inventory.model.calendar.Period",
                                "type": "object",
                                "properties": {
                                    "singleStart": {
                                        "type": "string",
                                        "pattern": "^([0-1][0-9]|2[0-4])(:[0-5][0-9]){1,2}$"
                                    },
                                    "begin": {
                                        "type": "string",
                                        "pattern": "^([0-1][0-9]|2[0-4])(:[0-5][0-9]){1,2}$"
                                    },
                                    "end": {
                                        "type": "string",
                                        "pattern": "^([0-1][0-9]|2[0-4])(:[0-5][0-9]){1,2}$"
                                    },
                                    "repeat": {
                                        "type": "string",
                                        "pattern": "^([0-1][0-9]|2[0-4])(:[0-5][0-9]){1,2}$"
                                    },
                                    "whenHoliday": {
                                        "javaType": "com.sos.inventory.model.calendar.WhenHolidayType",
                                        "description": "default: SUPPRESS",
                                        "type": "string",
                                        "enum": [
                                            "SUPPRESS",
                                            "IGNORE",
                                            "PREVIOUSNONWORKINGDAY",
                                            "NEXTNONWORKINGDAY"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "nonPeriods": {
                    "type": "array",
                    "items": {
                        "javaType": "com.sos.joc.model.dailyplan.projections.items.year.DatePeriodItem",
                        "type": "object",
                        "required": [
                            "schedule"
                        ],
                        "properties": {
                            "schedule": {
                                "type": "string",
                                "pattern": "^[^<>]*$",
                                "maxLength": 255
                            },
                            "period": {
                                "javaType": "com.sos.inventory.model.calendar.Period",
                                "type": "object",
                                "properties": {
                                    "singleStart": {
                                        "type": "string",
                                        "pattern": "^([0-1][0-9]|2[0-4])(:[0-5][0-9]){1,2}$"
                                    },
                                    "begin": {
                                        "type": "string",
                                        "pattern": "^([0-1][0-9]|2[0-4])(:[0-5][0-9]){1,2}$"
                                    },
                                    "end": {
                                        "type": "string",
                                        "pattern": "^([0-1][0-9]|2[0-4])(:[0-5][0-9]){1,2}$"
                                    },
                                    "repeat": {
                                        "type": "string",
                                        "pattern": "^([0-1][0-9]|2[0-4])(:[0-5][0-9]){1,2}$"
                                    },
                                    "whenHoliday": {
                                        "javaType": "com.sos.inventory.model.calendar.WhenHolidayType",
                                        "description": "default: SUPPRESS",
                                        "type": "string",
                                        "enum": [
                                            "SUPPRESS",
                                            "IGNORE",
                                            "PREVIOUSNONWORKINGDAY",
                                            "NEXTNONWORKINGDAY"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "additionalProperties": false
        }
    },
    "required": [
        "deliveryDate",
        "surveyDate"
    ],
    "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"
        }
    },
    "additionalProperties": false
}