{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Fibaro Home Center Variable JSON Schema",
    "name": "variable",
    "type": "object",
    "properties": {
        "name": {
            "description": "Identifier for the variable",
            "type": "string",
            "maxLength": 18,
            "minLength": 1,
            "pattern": "^[A-Za-z][A-Za-z0-9_]*"
        },
        "value": {
            "description": "Value of the variable",
            "type": "string",
            "maxLength": 8177
        },
        "readOnly": {
            "description": "Read only flag",
            "type": "boolean"
        },
        "isEnum": {
            "description": "Is Predefined Variable Flag",
            "type": "boolean"
        },
        "enumValues": {
            "description": "Predefined values",
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "created": {
            "description": "Variable created timestamp",
            "type": "integer",
            "minimum": 0
        },
        "modified": {
            "description": "Variable modified timestamp",
            "type": "integer",
            "minimum": 0
        }
    },
    "required": [
        "name",
        "value"
    ],
    "additionalProperties": false
}