{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/acceldata/json-schema/acceldata-service-user-list-response-schema.json",
  "title": "ServiceUserListResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/acceldata-service-users-api-openapi.yml#/components/schemas/ServiceUserListResponse",
  "type": "object",
  "required": [
    "meta",
    "serviceUsers"
  ],
  "properties": {
    "meta": {
      "$ref": "#/$defs/Meta"
    },
    "serviceUsers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ServiceUser"
      }
    }
  },
  "$defs": {
    "ApiKeyDetails": {
      "type": "object",
      "title": "ApiKeyDetails",
      "required": [
        "accessKey",
        "createdAt",
        "displayName",
        "email",
        "secretKey",
        "validTill"
      ],
      "properties": {
        "accessKey": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer"
        },
        "displayName": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "secretKey": {
          "type": "string"
        },
        "userName": {
          "type": [
            "string",
            "null"
          ]
        },
        "validTill": {
          "type": "integer"
        }
      }
    },
    "EntityDomainRoleMapping": {
      "type": "object",
      "title": "EntityDomainRoleMapping",
      "required": [
        "domainId",
        "entityType",
        "roleId",
        "roleType"
      ],
      "properties": {
        "domainId": {
          "type": "integer"
        },
        "entityId": {
          "type": [
            "string",
            "null"
          ]
        },
        "entityType": {
          "type": "string",
          "enum": [
            "USER",
            "USER_GROUP"
          ]
        },
        "id": {
          "type": "integer"
        },
        "roleId": {
          "type": "integer"
        },
        "roleType": {
          "type": "string",
          "enum": [
            "FEATURE_ROLE",
            "RESOURCE_ROLE"
          ]
        }
      }
    },
    "Meta": {
      "type": "object",
      "title": "Meta",
      "required": [
        "page",
        "size",
        "total"
      ],
      "properties": {
        "page": {
          "type": "integer"
        },
        "size": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        }
      }
    },
    "Metadata": {
      "type": "object",
      "title": "Metadata",
      "required": [
        "createdAt",
        "createdBy",
        "numberOfDirectGroupsAssigned",
        "numberOfDirectUsersAssigned",
        "numberOfDomainUserGroupAssigned"
      ],
      "properties": {
        "createdAt": {
          "type": "integer"
        },
        "createdBy": {
          "type": "string"
        },
        "numberOfDirectGroupsAssigned": {
          "type": "integer"
        },
        "numberOfDirectUsersAssigned": {
          "type": "integer"
        },
        "numberOfDomainUserGroupAssigned": {
          "type": "integer"
        },
        "updatedAt": {
          "type": "integer"
        },
        "updatedBy": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "Role": {
      "type": "object",
      "title": "Role",
      "required": [
        "id",
        "name"
      ],
      "properties": {
        "default": {
          "type": "boolean"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "type": "integer"
        },
        "metadata": {
          "oneOf": [
            {
              "$ref": "#/$defs/Metadata"
            },
            {
              "type": "null"
            }
          ]
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "FEATURE_ROLE",
            "RESOURCE_ROLE"
          ]
        }
      }
    },
    "ServiceUser": {
      "type": "object",
      "title": "ServiceUser",
      "required": [
        "apiKeys",
        "domainRoleMappings",
        "email",
        "enabled",
        "id",
        "roles",
        "username"
      ],
      "properties": {
        "apiKeys": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ApiKeyDetails"
          }
        },
        "createdBy": {
          "type": [
            "string",
            "null"
          ]
        },
        "createdOn": {
          "type": "integer"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "domainRoleMappings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EntityDomainRoleMapping"
          }
        },
        "email": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "id": {
          "type": "string"
        },
        "roles": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Role"
          }
        },
        "updatedBy": {
          "type": [
            "string",
            "null"
          ]
        },
        "updatedOn": {
          "type": "integer"
        },
        "username": {
          "type": "string"
        }
      }
    }
  }
}