{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/webex/main/json-schema/webex-business-hours-dto-schema.json",
  "title": "BusinessHoursDTO",
  "description": "Business Hours schema.",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/webex-business-hour-api-openapi.yml#/components/schemas/BusinessHoursDTO",
  "type": "object",
  "properties": {
    "organizationId": {
      "type": "string",
      "format": "uuid",
      "description": "ID of the contact center organization. This field is required for all bulk save operations.",
      "maxLength": 36,
      "minLength": 32,
      "pattern": "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$"
    },
    "id": {
      "type": "string",
      "description": "ID of this contact center resource. It should not be specified when creating a new resource. However, it is mandatory when updating a resource."
    },
    "version": {
      "type": "integer",
      "format": "int32",
      "description": "The version of this resource. For a newly created resource, it will be 0 unless specified otherwise."
    },
    "name": {
      "type": "string",
      "description": "Enter a name for the agent profile.",
      "maxLength": 80,
      "minLength": 1,
      "pattern": "^[a-zA-Z0-9_-]+(\\s?[a-zA-Z0-9_-]+)*$"
    },
    "description": {
      "type": "string",
      "description": "(Optional) Enter a description of the profile.",
      "maxLength": 255,
      "minLength": 0
    },
    "timezone": {
      "type": "string",
      "description": "The time zone that you provision for your business hour.",
      "minLength": 1
    },
    "workingHours": {
      "type": "array",
      "description": "Working hours",
      "items": {
        "$ref": "#/$defs/WorkingHoursDTO",
        "description": "Working Hour."
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "holidaysId": {
      "type": "string",
      "description": "Holidays Id."
    },
    "overridesId": {
      "type": "string",
      "description": "Overrides Id."
    },
    "workingHoursCount": {
      "type": "integer",
      "format": "int64",
      "description": "Working Hours Count."
    },
    "createdTime": {
      "type": "integer",
      "format": "int64",
      "description": "This is the created time of the entity."
    },
    "lastUpdatedTime": {
      "type": "integer",
      "format": "int64",
      "description": "This is the updated time of the entity."
    }
  },
  "required": [
    "name",
    "timezone",
    "workingHours"
  ],
  "$defs": {
    "WorkingHoursDTO": {
      "type": "object",
      "description": "Working hours",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name.",
          "maxLength": 80,
          "minLength": 1,
          "pattern": "^[a-zA-Z0-9_-]+(\\s?[a-zA-Z0-9_-]+)*$"
        },
        "days": {
          "type": "array",
          "description": "List of Days.",
          "items": {
            "type": "string",
            "description": "Day.",
            "enum": [
              "SUN",
              "MON",
              "TUE",
              "WED",
              "THU",
              "FRI",
              "SAT"
            ]
          },
          "minItems": 1
        },
        "startTime": {
          "type": "string",
          "description": "Start Time."
        },
        "endTime": {
          "type": "string",
          "description": "End Time."
        }
      },
      "required": [
        "days",
        "name"
      ]
    }
  }
}