{
 "additionalProperties": false,
 "definitions": {
  "EffectiveFrom": {
   "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
   "type": "string"
  },
  "EffectiveTill": {
   "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
   "type": "string"
  },
  "HoursOfOperationConfig": {
   "additionalProperties": false,
   "properties": {
    "Day": {
     "enum": [
      "SUNDAY",
      "MONDAY",
      "TUESDAY",
      "WEDNESDAY",
      "THURSDAY",
      "FRIDAY",
      "SATURDAY"
     ],
     "type": "string"
    },
    "EndTime": {
     "$ref": "#/definitions/HoursOfOperationTimeSlice"
    },
    "StartTime": {
     "$ref": "#/definitions/HoursOfOperationTimeSlice"
    }
   },
   "required": [
    "Day",
    "StartTime",
    "EndTime"
   ],
   "type": "object"
  },
  "HoursOfOperationOverride": {
   "additionalProperties": false,
   "properties": {
    "EffectiveFrom": {
     "$ref": "#/definitions/EffectiveFrom"
    },
    "EffectiveTill": {
     "$ref": "#/definitions/EffectiveTill"
    },
    "HoursOfOperationOverrideId": {
     "$ref": "#/definitions/HoursOfOperationOverrideId"
    },
    "OverrideConfig": {
     "$ref": "#/definitions/OverrideConfig"
    },
    "OverrideDescription": {
     "$ref": "#/definitions/OverrideDescription"
    },
    "OverrideName": {
     "$ref": "#/definitions/OverrideName"
    },
    "OverrideType": {
     "$ref": "#/definitions/OverrideType"
    },
    "RecurrenceConfig": {
     "$ref": "#/definitions/RecurrenceConfig"
    }
   },
   "required": [
    "OverrideName",
    "EffectiveFrom",
    "EffectiveTill",
    "OverrideConfig"
   ],
   "type": "object"
  },
  "HoursOfOperationOverrideConfig": {
   "additionalProperties": false,
   "properties": {
    "Day": {
     "enum": [
      "SUNDAY",
      "MONDAY",
      "TUESDAY",
      "WEDNESDAY",
      "THURSDAY",
      "FRIDAY",
      "SATURDAY"
     ],
     "type": "string"
    },
    "EndTime": {
     "$ref": "#/definitions/OverrideTimeSlice"
    },
    "StartTime": {
     "$ref": "#/definitions/OverrideTimeSlice"
    }
   },
   "required": [
    "Day",
    "StartTime",
    "EndTime"
   ],
   "type": "object"
  },
  "HoursOfOperationOverrideId": {
   "pattern": "^[-a-zA-Z0-9]*$",
   "type": "string"
  },
  "HoursOfOperationTimeSlice": {
   "additionalProperties": false,
   "properties": {
    "Hours": {
     "maximum": 23,
     "minimum": 0,
     "type": "integer"
    },
    "Minutes": {
     "maximum": 59,
     "minimum": 0,
     "type": "integer"
    }
   },
   "required": [
    "Hours",
    "Minutes"
   ],
   "type": "object"
  },
  "HoursOfOperationsIdentifier": {
   "additionalProperties": false,
   "properties": {
    "Id": {
     "type": "string"
    },
    "Name": {
     "maxLength": 127,
     "minLength": 1,
     "type": "string"
    }
   },
   "required": [
    "Id"
   ],
   "type": "object"
  },
  "MonthDayList": {
   "items": {
    "maximum": 31,
    "minimum": -1,
    "type": "integer"
   },
   "type": "array"
  },
  "MonthList": {
   "items": {
    "maximum": 12,
    "minimum": 1,
    "type": "integer"
   },
   "type": "array"
  },
  "OverrideConfig": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/HoursOfOperationOverrideConfig"
   },
   "maxItems": 100,
   "type": "array",
   "uniqueItems": true
  },
  "OverrideDescription": {
   "maxLength": 250,
   "minLength": 1,
   "type": "string"
  },
  "OverrideName": {
   "maxLength": 127,
   "minLength": 1,
   "type": "string"
  },
  "OverrideTimeSlice": {
   "additionalProperties": false,
   "properties": {
    "Hours": {
     "maximum": 23,
     "minimum": 0,
     "type": "integer"
    },
    "Minutes": {
     "maximum": 59,
     "minimum": 0,
     "type": "integer"
    }
   },
   "required": [
    "Hours",
    "Minutes"
   ],
   "type": "object"
  },
  "OverrideType": {
   "enum": [
    "STANDARD",
    "OPEN",
    "CLOSED"
   ],
   "type": "string"
  },
  "RecurrenceConfig": {
   "additionalProperties": false,
   "properties": {
    "RecurrencePattern": {
     "$ref": "#/definitions/RecurrencePattern"
    }
   },
   "required": [
    "RecurrencePattern"
   ],
   "type": "object"
  },
  "RecurrenceFrequency": {
   "enum": [
    "WEEKLY",
    "MONTHLY",
    "YEARLY"
   ],
   "type": "string"
  },
  "RecurrencePattern": {
   "additionalProperties": false,
   "properties": {
    "ByMonth": {
     "$ref": "#/definitions/MonthList"
    },
    "ByMonthDay": {
     "$ref": "#/definitions/MonthDayList"
    },
    "ByWeekdayOccurrence": {
     "items": {
      "maximum": 4,
      "minimum": -1,
      "type": "integer"
     },
     "maxItems": 1,
     "minItems": 0,
     "type": "array"
    },
    "Frequency": {
     "$ref": "#/definitions/RecurrenceFrequency"
    },
    "Interval": {
     "maximum": 6,
     "minimum": 1,
     "type": "integer"
    }
   },
   "type": "object"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "pattern": "^(?!aws:)[a-zA-Z+-=._:/]+$",
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "type": "string"
    }
   },
   "required": [
    "Key",
    "Value"
   ],
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/HoursOfOperationArn"
 ],
 "properties": {
  "ChildHoursOfOperations": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/HoursOfOperationsIdentifier"
   },
   "type": "array"
  },
  "Config": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/HoursOfOperationConfig"
   },
   "maxItems": 100,
   "minItems": 0,
   "type": "array",
   "uniqueItems": true
  },
  "Description": {
   "maxLength": 250,
   "minLength": 1,
   "pattern": "^[\\P{C}\\r\\n\\t]{1,250}$",
   "type": "string"
  },
  "HoursOfOperationArn": {
   "pattern": "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*/operating-hours/[-a-zA-Z0-9]*$",
   "type": "string"
  },
  "HoursOfOperationOverrides": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/HoursOfOperationOverride"
   },
   "maxItems": 50,
   "type": "array"
  },
  "InstanceArn": {
   "pattern": "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*$",
   "type": "string"
  },
  "Name": {
   "maxLength": 127,
   "minLength": 1,
   "pattern": "^[\\P{C}\\r\\n\\t]{1,127}$",
   "type": "string"
  },
  "ParentHoursOfOperations": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/HoursOfOperationsIdentifier"
   },
   "type": "array"
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "maxItems": 50,
   "type": "array",
   "uniqueItems": true
  },
  "TimeZone": {
   "type": "string"
  }
 },
 "readOnlyProperties": [
  "/properties/HoursOfOperationArn"
 ],
 "required": [
  "InstanceArn",
  "Name",
  "TimeZone",
  "Config"
 ],
 "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-connect",
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::Connect::HoursOfOperation"
}
