{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zoho-desk/json-schema/zoho-desk-rule-group-update-request-schema.json",
  "title": "RuleGroupUpdateRequest",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zoho-desk-openapi.yml#/components/schemas/RuleGroupUpdateRequest",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": ""
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": ""
    },
    "description": {
      "type": "string",
      "description": ""
    },
    "engine": {
      "type": "object",
      "description": "",
      "properties": {
        "id": {
          "type": "string",
          "description": ""
        },
        "systemName": {
          "type": "string",
          "description": ""
        }
      },
      "required": [
        "systemName",
        "id"
      ]
    },
    "departmentProperties": {
      "type": "array",
      "description": "",
      "items": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "string",
            "description": ""
          },
          "ruleGroupStatus": {
            "type": "string",
            "description": ""
          },
          "ruleGroupOrder": {
            "type": "string",
            "description": ""
          },
          "ruleGroupExecutionType": {
            "type": "string",
            "description": ""
          }
        },
        "required": [
          "id",
          "ruleGroupStatus",
          "ruleGroupOrder",
          "ruleGroupExecutionType"
        ]
      }
    },
    "module": {
      "type": "object",
      "description": "",
      "properties": {
        "id": {
          "type": "string",
          "description": ""
        },
        "apiName": {
          "type": "string",
          "description": ""
        }
      },
      "required": [
        "apiName",
        "id"
      ]
    },
    "events": {
      "type": "array",
      "description": "",
      "items": {
        "type": "object",
        "description": "",
        "properties": {
          "sysName": {
            "type": "string",
            "description": ""
          },
          "userCriteria": {
            "type": "object"
          }
        },
        "required": [
          "sysName"
        ]
      }
    },
    "rules": {
      "type": "array",
      "description": "",
      "items": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "string",
            "description": ""
          },
          "name": {
            "type": "string",
            "description": ""
          },
          "order": {
            "type": "integer",
            "description": ""
          },
          "clusters": {
            "type": "array",
            "description": "",
            "items": {
              "type": "object",
              "description": "",
              "properties": {
                "id": {
                  "type": "string",
                  "description": ""
                },
                "type": {
                  "type": "string",
                  "description": "",
                  "enum": [
                    "TREE"
                  ]
                },
                "nodes": {
                  "type": "array",
                  "description": "",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "executionType": {
                        "type": "string",
                        "enum": [
                          "SYNC",
                          "ASYNC"
                        ]
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "ROOT",
                          "DEFAULT",
                          "SUCCESS",
                          "FAILURE"
                        ]
                      },
                      "propertyType": {
                        "type": "string",
                        "enum": [
                          "ACTION_MAPPING",
                          "CRITERIA",
                          "SCHEDULE_ENTITY_MAPPING"
                        ]
                      },
                      "entityInfo": {
                        "type": "object"
                      },
                      "childNodes": {
                        "type": "array",
                        "x-circular-reference": true,
                        "x-max-recursion-depth": 1,
                        "items": {
                          "$ref": "#/$defs/node"
                        }
                      }
                    },
                    "required": [
                      "type",
                      "executionType",
                      "propertyType",
                      "entityInfo",
                      "childNodes"
                    ]
                  }
                }
              },
              "required": [
                "type",
                "nodes",
                "id"
              ]
            }
          }
        },
        "required": [
          "name",
          "order",
          "clusters",
          "id"
        ]
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "departmentProperties",
    "engine",
    "events",
    "id",
    "module",
    "rules"
  ],
  "$defs": {
    "node": {
      "type": "object",
      "description": "",
      "additionalProperties": false,
      "properties": {
        "executionType": {
          "type": "string",
          "description": "",
          "enum": [
            "SYNC",
            "ASYNC"
          ]
        },
        "type": {
          "type": "string",
          "description": "",
          "enum": [
            "ROOT",
            "DEFAULT",
            "SUCCESS",
            "FAILURE"
          ]
        },
        "propertyType": {
          "type": "string",
          "description": "",
          "enum": [
            "ACTION_MAPPING",
            "CRITERIA",
            "SCHEDULE_ENTITY_MAPPING"
          ]
        },
        "entityInfo": {
          "type": "object"
        },
        "childNodes": {
          "type": "array",
          "description": "",
          "items": {
            "$ref": "#/$defs/node"
          }
        }
      },
      "required": [
        "type",
        "executionType",
        "propertyType",
        "entityInfo",
        "childNodes"
      ]
    }
  }
}