{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trimble/json-schema/trimble-hierarchy-relations-response-schema.json",
  "title": "HierarchyRelationsResponse",
  "description": "A response containing a collection of hierarchy relations.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trimble-connect-model-openapi.yml#/components/schemas/HierarchyRelationsResponse",
  "type": "object",
  "required": [
    "items",
    "total",
    "count",
    "offset"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/HierarchyRelation"
      },
      "description": "The Collection of HierarchyRelation items."
    },
    "offset": {
      "type": "integer",
      "description": "The offset of the first item returned in this page."
    },
    "offsetNext": {
      "type": "integer",
      "description": "The first item of the next page. If null, then this is the last page in the result set. If not null, then this value must be passed in the `offset` query parameter to fetch the next page."
    },
    "total": {
      "type": "integer",
      "description": "The total number of items in the result set."
    },
    "count": {
      "type": "integer",
      "description": "The number of items on the current page."
    }
  },
  "$defs": {
    "HierarchyRelation": {
      "type": "object",
      "properties": {
        "parentId": {
          "type": "string",
          "description": "The Parent Id (external identifier) in the hierarchy structure. In case of the root hierarchy relations the value is `root`."
        },
        "childId": {
          "type": "string",
          "description": "The Child Id (external identifier) in the hierarchy structure."
        },
        "parentIdc": {
          "type": "string",
          "description": "The connect Parent Id in the hierarchy structure. In case of the root hierarchy relations the value is `root`."
        },
        "childIdc": {
          "type": "string",
          "description": "The connect Child Id in the hierarchy structure."
        },
        "parentIdx": {
          "type": "integer",
          "description": "The Parent Id (internal identifier) in the hierarchy structure. In case of the root hierarchy relations the value is `-1`."
        },
        "childIdx": {
          "type": "integer",
          "description": "The Child Id (internal identifier) in the hierarchy structure."
        },
        "type": {
          "type": "string",
          "description": "The hierarchy type it belongs to."
        }
      },
      "description": "A hierarchy relation of a given type between two model entities."
    }
  }
}