{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/webex/json-schema/webex-modify-forwarding-rule-object-schema.json",
  "title": "ModifyForwardingRuleObject",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/webex-features-hunt-group-api-openapi.yml#/components/schemas/ModifyForwardingRuleObject",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Unique name for the selective rule in the hunt group."
    },
    "enabled": {
      "type": "boolean",
      "description": "Reflects if rule is enabled."
    },
    "holidaySchedule": {
      "type": "string",
      "description": "Name of the location's holiday schedule which determines when this selective call forwarding rule is in effect."
    },
    "businessSchedule": {
      "type": "string",
      "description": "Name of the location's business schedule which determines when this selective call forwarding rule is in effect."
    },
    "forwardTo": {
      "type": "object",
      "properties": {
        "selection": {
          "type": "string",
          "enum": [
            "FORWARD_TO_DEFAULT_NUMBER",
            "FORWARD_TO_SPECIFIED_NUMBER",
            "DO_NOT_FORWARD"
          ],
          "description": "Controls what happens when the rule matches.\n * `FORWARD_TO_DEFAULT_NUMBER` - When the rule matches, forward to the destination for the hunt group.\n * `FORWARD_TO_SPECIFIED_NUMBER` - When the rule matches, forward to the destination for this rule.\n * `DO_NOT_FORWARD` - When the rule matches, do not forward to another number.\n"
        },
        "phoneNumber": {
          "type": "string",
          "description": "Phone number used if selection is `FORWARD_TO_SPECIFIED_NUMBER`."
        }
      },
      "description": "Controls what happens when the rule matches including the destination number for the call forwarding."
    },
    "callsFrom": {
      "type": "object",
      "properties": {
        "selection": {
          "type": "string",
          "enum": [
            "ANY",
            "CUSTOM"
          ],
          "description": "If `CUSTOM`, use `customNumbers` to specific which incoming caller ID values cause this rule to match. `ANY` means any incoming call matches assuming the rule is in effect based on the associated schedules.\n * `ANY` - Rule matches for calls from any number.\n * `CUSTOM` - Rule matches based on the numbers and options in `customNumbers`.\n"
        },
        "customNumbers": {
          "type": "object",
          "properties": {
            "privateNumberEnabled": {
              "type": "boolean",
              "description": "Match if caller ID indicates the call is from a private number."
            },
            "unavailableNumberEnabled": {
              "type": "boolean",
              "description": "Match if caller ID is unavailable."
            },
            "numbers": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Array of number strings to be matched against incoming caller ID."
            }
          },
          "description": "Custom rules for matching incoming caller ID information."
        }
      },
      "description": "Settings related the rule matching based on incoming caller ID."
    },
    "callsTo": {
      "type": "object",
      "properties": {
        "numbers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CallForwardingNumbers"
          },
          "description": "Array of numbers to be matched against the calling destination number."
        }
      },
      "description": "Settings related to the rule matching based on the destination number."
    }
  },
  "$defs": {
    "CallForwardingNumbers": {
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "phoneNumber": {
          "type": "string",
          "description": "Only return call queues with matching primary phone number or extension."
        },
        "extension": {
          "type": "string",
          "description": "Primary phone extension of the call queue."
        },
        "type": {
          "type": "string",
          "enum": [
            "PRIMARY",
            "ALTERNATE"
          ],
          "description": "Type of\n * `PRIMARY` - Indicates that the given `phoneNumber` or `extension` associated with this rule's containing object is a primary number or extension.\n * `ALTERNATE` - Indicates that the given `phoneNumber` or `extension` associated with this rule's containing object is an alternate number or extension.\n"
        }
      }
    }
  }
}