{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "http://json-schema.org/openstudio-urban-modeling/district_system_properties.json#",
  "title": "URBANopt District System",
  "description": "Schema for an URBANopt District System object",
  "type": "object",
  "properties": {
    "id": {
      "description": "Unique id used to refer to this feature within this dataset.",
      "type": "string"
    },
    "project_id": {
      "description": "Project which this feature belongs to.",
      "type": "string"
    },
    "type": {
      "description": "Type of feature.",
      "type": "string",
      "enum": [
        "District System"
      ]
    },
    "source_name": {
      "description": "Name of the original data source.",
      "type": "string"
    },
    "source_id": {
      "description": "Id of the feature in original data source.",
      "type": "string"
    },
    "name": {
      "description": "Feature name",
      "type": "string"
    },
    "legal_name": {
      "description": "Legal name used to identify this feature.",
      "type": "string"
    },
    "address": {
      "description": "Street address",
      "type": "string"
    },
    "district_system_type": {
      "$ref": "#/definitions/districtSystemType"
    },
    "detailed_model_filename": {
      "description": "Name of a detailed model which can be loaded from disk as a seed model or complete model. Mapper class decides which measures to disable if this is present.",
      "type": "string"
    },
    "weather_filename": {
      "description": "Name of EPW weather file for this district system. Defaults to site's weather_filename.",
      "type": "string"
    },
    "tariff_filename": {
      "description": "Name of the tariff file for this district system. Defaults to site's tariff_filename.",
      "type": "string"
    },
    "equipment": {
      "description": "List of equipment in this plant",
      "type": "array",
      "items": {
          "$ref": "#/definitions/equipmentType",
          "type": "string"
      }
    },
    "user_data": {
      "description": "Arbitrary user data"
    }
  },
  "required": [
    "type",
    "district_system_type"
  ],
  "additionalProperties": false,
  "definitions": {
    "districtSystemType": {
      "description": "Type of district system.",
      "type": "string",
      "enum": [
        "Central Chilled Water",
        "Central Hot Water",
        "Central Hot and Chilled Water",
		    "Central Ambient Water",
		    "Central Hot and Cold Water", 
		    "Community Photovoltaic", 
        "Transformer",
        "Transformer with Storage",
		    "Capacitor",
		    "Electrical Substation" 
      ]
    },
    "equipmentType": {
      "description": "Type of equipment, listed in order of load served.",
      "type": "string",
      "enum": [
        "Air-Cooled Chiller--Cold Water",
        "Air-Cooled Chiller--Ambient Water",
        "Water-Cooled Chiller--Cold Water",
        "Water-Cooled Chiller---Ambient Water",
        "Capacitor--150KVAR",
        "Capacitor--450KVAR",
        "Cooling Tower--Heat Rejection from Chiller, Cold Water",
        "Cooling Tower--Heat Rejection from Chiller, Ambient Water",
        "Cooling Tower--Direct--Chilled Water",
        "Cooling Tower--Direct--Ambient Water",
        "Boiler--Hot Water",
        "Boiler--Ambient Water",
        "Boiler--Combined Heat and Power--Hot Water",
        "Boiler--Combined Heat and Power--Ambient Water",
        "Water to Water Heat Pump--Ambient Water",
        "Water to Water Heat Pump--Cold Water",
        "Water to Water Heat Pump--Hot Water",
        "Air to Water Heat Pump--Ambient Water",
        "Air to Water Heat Pump--Cold Water",
        "Air to Water Heat Pump--Hot Water",
        "Ground Source Heat Pump--Ambient Water",
        "Ground Source Heat Pump--Cold Water",
        "Ground Source Heat Pump--Hot Water",
        "Solar Thermal Array--Ambient Water",
        "Solar Thermal Array--Hot Water",
        "Storage--Hot Water",
        "Storage--Cold Water",
        "Storage--Ambient Water",
        "Transformer--25KVA CT",
        "Transformer--50KVA CT",
        "Transformer--75KVA CT",
        "Transformer--25KVA PM",
        "Transformer--50KVA PM",
        "Transformer--75KVA PM",
        "Transformer--100KVA PM",
        "Transformer--150KVA PM",
        "Transformer--300KVA PM",
        "Transformer--500KVA PM",
        "Transformer--750KVA PM",
        "Waste Heat Source--Hot Water",
        "Waste Heat Source--Ambient Water"
      ]
    }
  }
}