{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "ts": {
      "type": "integer"
    },
    "user_info": {
      "type": "object",
      "properties": {
        "source_user_id": {
          "type": ["string", "null"]
        },
        "user_id": {
          "type": ["string", "null"]
        },
        "name": {
          "type": ["string", "null"]
        },
        "email": {
          "type": ["string", "null"]
        },
        "title": {
          "type": ["string", "null"]
        },
        "birthday": {
          "type": ["string", "null"]
        },
        "company": {
          "type": ["object", "null"],
          "properties": {
            "name": {
              "type": ["string", "null"]
            },
            "id": {
              "type": ["string", "null"]
            },
            "industry": {
              "type": ["string", "null"]
            },
            "employee_count": {
              "type": ["integer", "null"]
            },
            "plan": {
              "type": ["string", "null"]
            }
          },
          "required": ["name", "id", "industry", "employee_count", "plan"]
        },
        "created_at": {
          "type": ["integer", "null"]
        },
        "age": {
          "type": ["integer", "null"]
        },
        "gender": {
          "type": ["string", "null"]
        },
        "website": {
          "type": ["string", "null"]
        },
        "ip": {
          "type": ["string", "null"]
        },
        "avatar": {
          "type": ["string", "null"]
        },
        "nickname": {
          "type": ["string", "null"]
        },
        "phone": {
          "type": ["string", "null"]
        },
        "city": {
          "type": ["string", "null"]
        },
        "continent_code": {
          "type": ["string", "null"]
        },
        "country": {
          "type": ["string", "null"]
        },
        "postal_code": {
          "type": ["string", "null"]
        },
        "region": {
          "type": ["string", "null"]
        },
        "address_line1": {
          "type": ["string", "null"]
        },
        "address_line2": {
          "type": ["string", "null"]
        },
        "timezone": {
          "type": ["string", "null"]
        },
        "country_code": {
          "type": ["string", "null"]
        },
        "user_agent": {
          "type": ["string", "null"]
        },
        "is_employee": {
          "type": ["boolean", "null"]
        },
        "custom_attributes": {
          "type": ["string", "null"]
        }
      },
      "required": [
        "source_user_id",
        "user_id",
        "name",
        "email",
        "title",
        "birthday",
        "company",
        "created_at",
        "age",
        "gender",
        "website",
        "ip",
        "avatar",
        "nickname",
        "phone",
        "city",
        "continent_code",
        "country",
        "postal_code",
        "region",
        "timezone",
        "country_code",
        "user_agent",
        "is_employee",
        "custom_attributes"
      ]
    },
    "text": {
      "type": ["string", "null"]
    },
    "href": {
      "type": ["string", "null"]
    },
    "is_bad": {
      "type": ["boolean", "null"]
    },
    "direction": {
      "type": ["string", "null"]
    },
    "source": {
      "type": ["string", "null"]
    },
    "stream": {
      "type": ["string", "null"]
    },
    "_raw": {
      "type": ["string", "null"]
    },
    "_version": {
      "type": ["string", "null"]
    }
  },
  "required": [
    "id",
    "ts",
    "user_info",
    "text",
    "href",
    "is_bad",
    "direction",
    "source",
    "stream",
    "_raw",
    "_version"
  ]
}
