{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schemas.ectropy.ai/flow/waste-stream.schema.json",
  "title": "Waste Stream",
  "version": "0.2.0",
  "description": "A site waste stream keyed by EU List of Waste code (Decision 2000/532/EC as amended by 2014/955/EU; chapter 17 construction and demolition; a trailing asterisk marks a hazardous entry), with treatment route and weighed mass, so diversion (Waste Framework Directive 70% target, LEED v4.1 MRc) is computable.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "listOfWasteCode",
    "treatmentRoute",
    "mass"
  ],
  "properties": {
    "listOfWasteCode": {
      "type": "string",
      "pattern": "^17 [0-9]{2} [0-9]{2}\\*?$"
    },
    "treatmentRoute": {
      "enum": [
        "reuse",
        "recycling",
        "other-recovery",
        "incineration",
        "landfill"
      ]
    },
    "mass": {
      "$ref": "https://schemas.ectropy.ai/flow/flow-common.schema.json#/definitions/figure"
    },
    "carrierRef": {
      "$ref": "https://schemas.ectropy.ai/flow/flow-common.schema.json#/definitions/partyUri"
    },
    "destination": {
      "type": "string"
    },
    "transferNoteRef": {
      "type": "string"
    },
    "location": {
      "$ref": "https://schemas.ectropy.ai/flow/flow-common.schema.json#/definitions/location"
    }
  }
}
