{
  "typeName" : "AWS::Connect::HoursOfOperation",
  "description" : "Resource Type definition for AWS::Connect::HoursOfOperation",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-connect",
  "definitions" : {
    "HoursOfOperationTimeSlice" : {
      "description" : "The start time or end time for an hours of operation.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Hours" : {
          "type" : "integer",
          "description" : "The hours.",
          "minimum" : 0,
          "maximum" : 23
        },
        "Minutes" : {
          "type" : "integer",
          "description" : "The minutes.",
          "minimum" : 0,
          "maximum" : 59
        }
      },
      "required" : [ "Hours", "Minutes" ]
    },
    "HoursOfOperationConfig" : {
      "description" : "Contains information about the hours of operation.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Day" : {
          "type" : "string",
          "description" : "The day that the hours of operation applies to.",
          "enum" : [ "SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY" ]
        },
        "StartTime" : {
          "description" : "The start time that your contact center opens.",
          "$ref" : "#/definitions/HoursOfOperationTimeSlice"
        },
        "EndTime" : {
          "description" : "The end time that your contact center closes.",
          "$ref" : "#/definitions/HoursOfOperationTimeSlice"
        }
      },
      "required" : [ "Day", "StartTime", "EndTime" ]
    },
    "Tag" : {
      "description" : "A key-value pair to associate with a resource.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Key" : {
          "type" : "string",
          "description" : "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ",
          "minLength" : 1,
          "maxLength" : 128,
          "pattern" : "^(?!aws:)[a-zA-Z+-=._:/]+$"
        },
        "Value" : {
          "type" : "string",
          "description" : "The value for the tag. You can specify a value that is maximum of 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ",
          "maxLength" : 256
        }
      },
      "required" : [ "Key", "Value" ]
    }
  },
  "properties" : {
    "InstanceArn" : {
      "description" : "The identifier of the Amazon Connect instance.",
      "type" : "string",
      "pattern" : "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*$"
    },
    "Name" : {
      "description" : "The name of the hours of operation.",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 127
    },
    "Description" : {
      "description" : "The description of the hours of operation.",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 250
    },
    "TimeZone" : {
      "description" : "The time zone of the hours of operation.",
      "type" : "string"
    },
    "Config" : {
      "description" : "Configuration information for the hours of operation: day, start time, and end time.",
      "type" : "array",
      "maxItems" : 100,
      "uniqueItems" : true,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/HoursOfOperationConfig"
      }
    },
    "HoursOfOperationArn" : {
      "description" : "The Amazon Resource Name (ARN) for the hours of operation.",
      "type" : "string",
      "pattern" : "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*/operating-hours/[-a-zA-Z0-9]*$"
    },
    "Tags" : {
      "description" : "One or more tags.",
      "type" : "array",
      "maxItems" : 50,
      "uniqueItems" : true,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    }
  },
  "required" : [ "InstanceArn", "Name", "TimeZone", "Config" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "connect:CreateHoursOfOperation", "connect:TagResource" ]
    },
    "read" : {
      "permissions" : [ "connect:DescribeHoursOfOperation" ]
    },
    "delete" : {
      "permissions" : [ "connect:DeleteHoursOfOperation", "connect:UntagResource" ]
    },
    "update" : {
      "permissions" : [ "connect:UpdateHoursOfOperation", "connect:TagResource", "connect:UntagResource" ]
    }
  },
  "additionalProperties" : false,
  "primaryIdentifier" : [ "/properties/HoursOfOperationArn" ],
  "readOnlyProperties" : [ "/properties/HoursOfOperationArn" ]
}