{
  "$schema": "http://json-schema.org/draft-03/schema#",
  "id": "http://www.popoloproject.com/schemas/vote_event.json#",
  "title": "Vote event",
  "description": "An event at which people's votes are recorded",
  "type": "object",
  "properties": {
    "id": {
      "description": "The vote event's unique identifier",
      "type": ["string", "null"]
    },
    "organization_id": {
      "description": "The ID of the organization whose members are voting",
      "type": ["string", "null"]
    },
    "organization": {
      "description": "The organization whose members are voting",
      "$ref": "http://www.popoloproject.com/schemas/organization.json#"
    },
    "legislative_session_id": {
      "description": "The ID of the legislative session in which the vote occurs",
      "type": ["string", "null"]
    },
    "legislative_session": {
      "description": "The legislative session in which the vote occurs",
      "$ref": "http://www.popoloproject.com/schemas/event.json#"
    },
    "identifier": {
      "description": "An issued identifier",
      "type": ["string", "null"]
    },
    "motion_id": {
      "description": "The ID of the motion being decided",
      "type": ["string", "null"]
    },
    "motion": {
      "description": "The motion being decided",
      "$ref": "http://www.popoloproject.com/schemas/motion.json#"
    },
    "classification": {
      "description": "The vote event's category",
      "type": ["string", "null"]
    },
    "start_date": {
      "description": "The time at which the event begins",
      "type": ["string", "null"],
      "format": "date-time"
    },
    "end_date": {
      "description": "The time at which the event ends",
      "type": ["string", "null"],
      "format": "date-time"
    },
    "result": {
      "description": "The result of the vote event",
      "type": ["string", "null"]
    },
    "group_results": {
      "description": "The result of the vote event within groups of voters",
      "type": "array",
      "items": {
        "$ref": "http://www.popoloproject.com/schemas/group_result.json#"
      }
    },
    "counts": {
      "description": "The number of votes for options",
      "type": "array",
      "items": {
        "$ref": "http://www.popoloproject.com/schemas/count.json#"
      }
    },
    "votes": {
      "description": "Voters' votes",
      "type": "array",
      "items": {
        "$ref": "http://www.popoloproject.com/schemas/vote.json#"
      }
    },
    "created_at": {
      "description": "The time at which the resource was created",
      "type": ["string", "null"],
      "format": "date-time"
    },
    "updated_at": {
      "description": "The time at which the resource was last modified",
      "type": ["string", "null"],
      "format": "date-time"
    },
    "sources": {
      "description": "URLs to documents from which the resource is derived",
      "type": "array",
      "items": {
        "$ref": "http://www.popoloproject.com/schemas/link.json#"
      }
    }
  }
}
