{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "http://elasticbox.net/schemas/user",
  "type": "object",
  "required": [
    "_id",
    "email",
    "firstname",
    "lastname",
    "metadata",
    "role",
    "schema",
    "username"
  ],
  "additionalProperties": false,
  "properties": {
    "_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 36
    },
    "email": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "email_validated_at": {
      "type": "string"
    },
    "firstname": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "google_id": {
      "type": "string"
    },
    "saml_id": {
      "type": "string"
    },
    "icon": {
      "type": "string",
      "maxLength": 256
    },
    "invite_token": {
      "type": "string"
    },
    "last_login": {
      "type": "string",
      "maxLength": 2048
    },
    "lastname": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "metadata": {
      "type": "object",
      "properties": {
        "creationTimestamp": {
          "type": "number"
        },
        "deletionTimestamp": {
          "type": "number"
        },
        "resourceVersion": {
          "type": "number"
        }
      }
    },
    "password": {
      "type": "object",
      "properties": {
        "hash": {
          "type": "string",
          "maxLength": 256
        },
        "rounds": {
          "enum": [
            20
          ]
        },
        "salt": {
          "type": "string",
          "maxLength": 64
        }
      }
    },
    "role": {
      "type": "string",
      "default": "user",
      "enum": [
        "administrator",
        "user"
      ]
    },
    "schema": {
      "type": "string",
      "enum": [
        "http://elasticbox.net/schemas/user"
      ]
    },
    "username": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    }
  },
  "type:": "object"
}