{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "ASHRAE 205",
    "description": "Base schema for ASHRAE 205 representations",
    "definitions": {
        "UUID": {
            "type": "string",
            "pattern": "[0-9,a-f,A-F]{8}-[0-9,a-f,A-F]{4}-[0-9,a-f,A-F]{4}-[0-9,a-f,A-F]{4}-[0-9,a-f,A-F]{12}"
        },
        "Date": {
            "type": "string",
            "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}"
        },
        "Timestamp": {
            "type": "string",
            "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}Z"
        },
        "Version": {
            "type": "string",
            "pattern": "(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-((?:0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?"
        },
        "Pattern": {
            "type": "string",
            "regex": true
        },
        "SchemaType": {
            "type": "string",
            "enum": [
                "RS0001",
                "RS0002",
                "RS0003",
                "RS0004",
                "RS0005",
                "RS0006",
                "RS0007"
            ],
            "descriptions": [
                "Chiller",
                "Unitary Cooling Air-Conditioning Equipment",
                "Fan Assembly",
                "Air-to-Air Direct Expansion Refrigerant System",
                "Motor",
                "Electronic Motor Drive",
                "Mechanical Drive"
            ]
        },
        "CompressorType": {
            "type": "string",
            "enum": [
                "RECIPROCATING",
                "SCREW",
                "CENTRIFUGAL",
                "ROTARY",
                "SCROLL"
            ],
            "enum_text": [
                "Reciprocating",
                "Screw",
                "Centrifugal",
                "Rotary",
                "Scroll"
            ],
            "descriptions": [
                "Reciprocating compressor",
                "Screw compressor",
                "Centrifugal compressor",
                "Rotary compressor",
                "Scroll compressor"
            ]
        },
        "SpeedControlType": {
            "type": "string",
            "enum": [
                "DISCRETE",
                "CONTINUOUS"
            ],
            "enum_text": [
                "Discrete",
                "Continuous"
            ],
            "descriptions": [
                "Loading is controlled by cycling between one or more discrete stages",
                "Loading is controlled by continuously varying the speed"
            ]
        },
        "CondenserType": {
            "type": "string",
            "enum": [
                "AIR",
                "LIQUID",
                "EVAPORATIVE"
            ],
            "enum_text": [
                "Air",
                "Liquid",
                "Evaporative"
            ],
            "descriptions": [
                "Air-cooled condenser",
                "Liquid-cooled condenser",
                "Evaporative condenser"
            ],
            "notes": [
                null,
                null,
                "Evaporative condensers include adiabatically-cooled condensers"
            ]
        },
        "LiquidConstituent": {
            "type": "string",
            "enum": [
                "WATER",
                "PROPYLENE_GLYCOL",
                "ETHYLENE_GLYCOL",
                "SODIUM_CHLORIDE",
                "CALCIUM_CHLORIDE",
                "ETHANOL",
                "METHANOL"
            ],
            "enum_text": [
                "Water",
                "Propylene Glycol",
                "Ethylene Glycol",
                "Sodium Chloride",
                "Calcium Chloride",
                "Ethanol",
                "Methanol"
            ],
            "descriptions": [
                "Water",
                "Propylene glycol",
                "Ethylene glycol",
                "Sodium chloride",
                "Calcium chloride",
                "Ethanol",
                "Methanol"
            ]
        },
        "ConcentrationType": {
            "type": "string",
            "enum": [
                "BY_VOLUME",
                "BY_MASS"
            ],
            "enum_text": [
                "By Volume",
                "By Mass"
            ],
            "descriptions": [
                "Concentration is defined as a fraction of total liquid mixture volume",
                "Concentration is defined as a fraction of total liquid mixture mass"
            ]
        },
        "OperationState": {
            "type": "string",
            "enum": [
                "NORMAL",
                "STANDBY"
            ],
            "enum_text": [
                "Normal",
                "Standby"
            ],
            "descriptions": [
                "Indicates that the equipment is in normal operating state",
                "Indicates that the equipment is in standby operating state"
            ]
        },
        "Metadata": {
            "type": "object",
            "properties": {
                "data_model": {
                    "description": "Data model name",
                    "type": "string",
                    "pattern": "ASHRAE_205",
                    "notes": "Identifies the data model where the schema is defined",
                    "requiredText": "True",
                    "constraintsText": "\"ASHRAE_205\""
                },
                "schema": {
                    "description": "Schema name or identifier",
                    "$ref": "ASHRAE205.schema.json#/definitions/SchemaType",
                    "notes": "Identifies the schema used to define the data content",
                    "requiredText": "True"
                },
                "schema_version": {
                    "description": "The version of the schema the data complies with",
                    "$ref": "ASHRAE205.schema.json#/definitions/Version",
                    "requiredText": "True"
                },
                "id": {
                    "description": "Unique equipment identifier",
                    "$ref": "ASHRAE205.schema.json#/definitions/UUID",
                    "notes": [
                        "Assigned by data publisher to identify the contained data",
                        "`id` shall remain unchanged for revised data"
                    ],
                    "requiredText": "True"
                },
                "description": {
                    "description": "Description of data (suitable for display)",
                    "type": "string",
                    "requiredText": "True"
                },
                "data_timestamp": {
                    "description": "Date of publication",
                    "$ref": "ASHRAE205.schema.json#/definitions/Timestamp",
                    "notes": "Date/time of publication of the data",
                    "requiredText": "True"
                },
                "data_version": {
                    "description": "Integer version identifier for the data in the representation",
                    "type": "integer",
                    "minimum": 1,
                    "notes": [
                        "Used by data publisher to track revisions of the data for a specific representation",
                        "`data_version` shall be incremented for each data revision"
                    ],
                    "requiredText": "True",
                    "constraintsText": ">=1"
                },
                "data_source": {
                    "description": "Source(s) of the data",
                    "type": "string",
                    "notes": [
                        "Used by data publisher to document methods (e.g., software and version) used to generate data",
                        "***Informative note:*** `data_source` may be different from other data source(s) included elsewhere within the data"
                    ]
                },
                "disclaimer": {
                    "description": "Characterization of accuracy, limitations, and applicability of this data",
                    "type": "string"
                },
                "notes": {
                    "description": "Additional Information",
                    "type": "string"
                }
            },
            "required": [
                "data_model",
                "schema",
                "schema_version",
                "id",
                "description",
                "data_timestamp",
                "data_version"
            ],
            "additionalProperties": false
        },
        "LiquidMixture": {
            "type": "object",
            "properties": {
                "liquid_components": {
                    "description": "An array of all liquid components within the liquid mixture",
                    "type": "array",
                    "items": {
                        "$ref": "ASHRAE205.schema.json#/definitions/LiquidComponent"
                    },
                    "notes": "Array may contain a single component",
                    "requiredText": "True"
                },
                "concentration_type": {
                    "description": "Defines whether concentration is defined on a volume or mass basis",
                    "$ref": "ASHRAE205.schema.json#/definitions/ConcentrationType",
                    "requiredText": "True"
                }
            },
            "required": [
                "liquid_components",
                "concentration_type"
            ],
            "additionalProperties": false
        },
        "LiquidComponent": {
            "type": "object",
            "properties": {
                "liquid_constituent": {
                    "description": "Substance of this component of the mixture",
                    "$ref": "ASHRAE205.schema.json#/definitions/LiquidConstituent",
                    "requiredText": "True"
                },
                "concentration": {
                    "description": "Concentration of this component of the mixture",
                    "type": "number",
                    "minimum": 0.0,
                    "maximum": 1.0,
                    "notes": "If omitted, assume equal distribution with any other component with no defined concentration (e.g., can be left blank for the primary component)",
                    "constraintsText": [
                        ">=0.0",
                        "<=1.0"
                    ]
                }
            },
            "required": [
                "liquid_constituent"
            ],
            "additionalProperties": false
        },
        "Scaling": {
            "type": "object",
            "properties": {
                "minimum": {
                    "description": "Minimum scaling factor",
                    "type": "number",
                    "exclusiveMinimum": 0.0,
                    "maximum": 1.0,
                    "units": "-",
                    "notes": "If not specified, may be scaled down to any value greater than zero",
                    "constraintsText": [
                        ">0.0",
                        "<=1.0"
                    ]
                },
                "maximum": {
                    "description": "Maximum scaling factor",
                    "type": "number",
                    "minimum": 1.0,
                    "units": "-",
                    "notes": "If not specified, unlimited",
                    "constraintsText": [
                        ">=1.0"
                    ]
                }
            },
            "additionalProperties": false
        }
    },
    "version": "2.0.0"
}