{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/viridi-parente/main/json-schema/viridi-parente-page-data-tenant-schema.json",
  "title": "PageDataTenant",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/viridi-parente-tenant-controller-api-openapi.yml#/components/schemas/PageDataTenant",
  "properties": {
    "data": {
      "type": "array",
      "description": "Array of the entities",
      "items": {
        "$ref": "#/$defs/Tenant"
      },
      "readOnly": true
    },
    "totalPages": {
      "type": "integer",
      "format": "int32",
      "description": "Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria",
      "readOnly": true
    },
    "totalElements": {
      "type": "integer",
      "format": "int64",
      "description": "Total number of elements in all available pages",
      "readOnly": true
    },
    "hasNext": {
      "type": "boolean",
      "description": "'false' value indicates the end of the result set",
      "readOnly": true
    }
  },
  "$defs": {
    "JsonNode": {
      "description": "A value representing the any type (object or primitive)"
    },
    "Tenant": {
      "description": "A JSON value representing the tenant.",
      "properties": {
        "id": {
          "$ref": "#/$defs/TenantId",
          "description": "JSON object with the tenant Id. Specify this field to update the tenant. Referencing non-existing tenant Id will cause error. Omit this field to create new tenant."
        },
        "createdTime": {
          "type": "integer",
          "format": "int64",
          "description": "Timestamp of the tenant creation, in milliseconds",
          "readOnly": true
        },
        "country": {
          "type": "string",
          "description": "Country"
        },
        "state": {
          "type": "string",
          "description": "State"
        },
        "city": {
          "type": "string",
          "description": "City"
        },
        "address": {
          "type": "string",
          "description": "Address Line 1"
        },
        "address2": {
          "type": "string",
          "description": "Address Line 2"
        },
        "zip": {
          "type": "string",
          "description": "Zip code"
        },
        "phone": {
          "type": "string",
          "description": "Phone number"
        },
        "email": {
          "type": "string",
          "description": "Email"
        },
        "title": {
          "type": "string",
          "description": "Title of the tenant"
        },
        "region": {
          "type": "string",
          "description": "Geo region of the tenant"
        },
        "tenantProfileId": {
          "$ref": "#/$defs/TenantProfileId",
          "description": "JSON object with Tenant Profile Id"
        },
        "name": {
          "type": "string",
          "description": "Name of the tenant. Read-only, duplicated from title for backward compatibility",
          "readOnly": true
        },
        "additionalInfo": {
          "$ref": "#/$defs/JsonNode",
          "description": "Additional parameters of the device"
        }
      },
      "required": [
        "title"
      ]
    },
    "TenantId": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "ID of the entity, time-based UUID v1"
        },
        "entityType": {
          "type": "string",
          "description": "string",
          "enum": [
            "TENANT"
          ]
        }
      },
      "required": [
        "entityType",
        "id"
      ]
    },
    "TenantProfileId": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "ID of the entity, time-based UUID v1"
        },
        "entityType": {
          "type": "string",
          "description": "string",
          "enum": [
            "TENANT_PROFILE"
          ]
        }
      },
      "required": [
        "entityType",
        "id"
      ]
    }
  }
}