{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/ModesGet",
  "title": "ModesGet",
  "type": "object",
  "required": [
    "normalOperationEnabled",
    "id",
    "name",
    "type",
    "level",
    "forwardTo"
  ],
  "properties": {
    "normalOperationEnabled": {
      "type": "boolean",
      "example": true,
      "description": "Normal operation is enabled or disabled."
    },
    "id": {
      "type": "string",
      "example": "Y2lzY29zcGFyazovL3VzL09QRVJBVElOR19NT0RFL2JiOTc1OTcxLTBjZWYtNDdhNi05Yzc5LTliZWFjY2IwYjg4Mg",
      "description": "The ID of the operating mode."
    },
    "name": {
      "type": "string",
      "example": "Day",
      "description": "The name of the operating mode."
    },
    "type": {
      "type": "string",
      "enum": [
        "NONE",
        "SAME_HOURS_DAILY",
        "DIFFERENT_HOURS_DAILY",
        "HOLIDAY"
      ],
      "description": "The type of the operating mode.\n * `NONE` - The operating mode is not scheduled.\n * `SAME_HOURS_DAILY` - Single time duration for Monday-Friday and single time duration for Saturday-Sunday.\n * `DIFFERENT_HOURS_DAILY` - Individual time durations for every day of the week.\n * `HOLIDAY` - Holidays which have date durations spanning multiple days, as well as an optional yearly recurrence by day or date.\n"
    },
    "level": {
      "type": "string",
      "enum": [
        "LOCATION",
        "ORGANIZATION"
      ],
      "description": "The level of the operating mode.\n * `LOCATION` - The operating mode is at the location level.\n * `ORGANIZATION` - The operating mode is at the organization level.\n"
    },
    "forwardTo": {
      "type": "object",
      "required": [
        "selection",
        "destination",
        "destinationVoicemailEnabled",
        "defaultDestination",
        "defaultDestinationVoicemailEnabled",
        "defaultForwardToSelection"
      ],
      "properties": {
        "selection": {
          "type": "string",
          "enum": [
            "FORWARD_TO_DEFAULT_NUMBER",
            "FORWARD_TO_SPECIFIED_NUMBER",
            "DO_NOT_FORWARD"
          ],
          "description": "The selection for forwarding.\n * `FORWARD_TO_DEFAULT_NUMBER` - When the rule matches, the mode's own default forwarding selection is to be applied.\n * `FORWARD_TO_SPECIFIED_NUMBER` - When the rule matches, forward to the destination.\n * `DO_NOT_FORWARD` - When the rule matches, do not forward to another number.\n"
        },
        "destination": {
          "type": "string",
          "example": "+19705550006",
          "description": "The destination for forwarding. Required when the selection is set to `FORWARD_TO_SPECIFIED_NUMBER`."
        },
        "destinationVoicemailEnabled": {
          "type": "boolean",
          "description": "Sending incoming calls to voicemail is enabled/disabled when the destination is an internal phone number and that number has the voicemail service enabled."
        },
        "defaultDestination": {
          "type": "string",
          "example": "00000",
          "description": "The operating mode's destination."
        },
        "defaultDestinationVoicemailEnabled": {
          "type": "boolean",
          "description": "The operating mode's destination voicemail enabled."
        },
        "defaultForwardToSelection": {
          "type": "string",
          "enum": [
            "FORWARD_TO_SPECIFIED_NUMBER",
            "DO_NOT_FORWARD"
          ],
          "description": "The operating mode's forward to selection.\n * `FORWARD_TO_SPECIFIED_NUMBER` - When the rule matches, forward to the destination.\n * `DO_NOT_FORWARD` - When the rule matches, do not forward to another number.\n"
        }
      },
      "description": "Forward to settings."
    }
  }
}