{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zoho-desk/json-schema/zoho-desk-rule-group-response-schema.json",
  "title": "RuleGroupResponse",
  "description": "Rulegroup Response template",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zoho-desk-openapi.yml#/components/schemas/RuleGroupResponse",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdTime": {
      "type": "string",
      "format": "date-time"
    },
    "modifiedTime": {
      "type": "string",
      "format": "date-time"
    },
    "createdBy": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "photoURL": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "modifiedBy": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "photoURL": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "engine": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "systemName": {
          "type": "string"
        }
      }
    },
    "module": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "apiName": {
          "type": "string"
        },
        "displayLabel": {
          "type": "string"
        }
      }
    },
    "draftMeta": {
      "type": [
        "null",
        "object"
      ]
    },
    "events": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "sysName": {
            "type": "string"
          },
          "displayLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "userCriteria": {
            "additionalProperties": true,
            "type": [
              "null",
              "object"
            ],
            "properties": {
              "moduleMapping": {
                "type": "object",
                "properties": {
                  "primaryModule": {
                    "type": "object",
                    "properties": {
                      "apiName": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "criteria": {
                "additionalProperties": true,
                "type": "object"
              }
            }
          }
        }
      }
    },
    "departmentProperties": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "ruleGroupStatus": {
            "type": "string"
          },
          "ruleGroupOrder": {
            "type": "string"
          },
          "ruleGroupExecutionType": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "ruleGroupExecutionType",
          "ruleGroupOrder",
          "ruleGroupStatus"
        ]
      }
    },
    "rules": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "null",
              "string"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "order": {
            "type": "string"
          },
          "criteria": {
            "type": [
              "object",
              "null"
            ]
          },
          "clusters": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "source": {
                  "type": "string"
                },
                "createdBy": {
                  "type": "string"
                },
                "createdTime": {
                  "type": "string",
                  "format": "date-time"
                },
                "modifiedBy": {
                  "type": "string"
                },
                "modifiedTime": {
                  "type": "string",
                  "format": "date-time"
                },
                "nodes": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "executionType": {
                        "type": "string",
                        "enum": [
                          "SYNC",
                          "ASYNC"
                        ]
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "ROOT",
                          "DEFAULT",
                          "SUCCESS",
                          "FAILURE"
                        ]
                      },
                      "propertyType": {
                        "type": "string",
                        "enum": [
                          "ACTION_MAPPING",
                          "CRITERIA",
                          "SCHEDULE_ENTITY_MAPPING"
                        ]
                      },
                      "propertyId": {
                        "type": "string"
                      },
                      "parentNodeId": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "clusterId": {
                        "type": "string"
                      },
                      "entityInfo": {
                        "type": "object",
                        "properties": {
                          "actionMappingId": {
                            "type": "string"
                          },
                          "actionId": {
                            "type": "string"
                          },
                          "actionType": {
                            "type": "string"
                          },
                          "actionParamMappings": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            }
                          }
                        }
                      },
                      "childNodes": {
                        "type": "array",
                        "x-circular-reference": true,
                        "x-max-recursion-depth": 2,
                        "items": {
                          "$ref": "#/$defs/nodeResponse"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "$defs": {
    "nodeResponse": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "executionType": {
          "type": "string",
          "enum": [
            "SYNC",
            "ASYNC"
          ]
        },
        "type": {
          "type": "string",
          "enum": [
            "ROOT",
            "DEFAULT",
            "SUCCESS",
            "FAILURE"
          ]
        },
        "propertyType": {
          "type": "string",
          "enum": [
            "ACTION_MAPPING",
            "CRITERIA",
            "SCHEDULE_ENTITY_MAPPING"
          ]
        },
        "propertyId": {
          "type": "string"
        },
        "parentNodeId": {
          "type": [
            "string",
            "null"
          ]
        },
        "clusterId": {
          "type": "string"
        },
        "entityInfo": {
          "type": "object",
          "additionalProperties": true
        },
        "childNodes": {
          "type": "array",
          "x-circular-reference": true,
          "x-max-recursion-depth": 2,
          "items": {
            "$ref": "#/$defs/nodeResponse"
          }
        }
      },
      "required": [
        "type",
        "executionType",
        "propertyType",
        "entityInfo",
        "childNodes"
      ]
    }
  }
}