{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "A state for the scenario",
    "type": "object",
    "properties": {
        "parameters": {
            "description": "The values for the parameters",
            "type": "object",
            "properties": {
                "userDefined": {
                    "type": "object",
                    "properties": {
                        "independent": {
                            "type": "object",
                            "patternProperties": {
                                "^p([0-9]+)|t$": {}
                            },
                            "additionalProperties": false,
                            "example": {
                                "p1": false,
                                "p2": 0,
                                "p3": "A string"
                            }
                        },
                        "perCharacter": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "object"
                            }
                        }
                    },
                    "required": [
                        "independent",
                        "perCharacter"
                    ]
                },
                "fixed": {
                    "type": "object",
                    "properties": {
                        "independent": {
                            "type": "object"
                        },
                        "perCharacter": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "object"
                            }
                        }
                    },
                    "required": [
                        "independent",
                        "perCharacter"
                    ]
                }
            }
        },
        "statement": {
            "type": [
                "object",
                "null"
            ],
            "description": "Statement will be present in output, but is not required in input",
            "properties": {
                "type": {
                    "description": "The statement type: whether it is for a computer or a player",
                    "type": "string",
                    "enum": [
                        "player",
                        "computer",
                        "situation"
                    ]
                },
                "text": {
                    "description": "The actual text for the statement",
                    "type": "string"
                },
                "character": {
                    "description": "The character this statement belongs to, if any",
                    "type": "string"
                },
                "propertyValues": {
                    "description": "The property values belonging to this statement",
                    "type": "object",
                    "properties": {
                        "independent": {
                            "type": "object"
                        },
                        "perCharacter": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "object"
                            }
                        }
                    },
                    "required": [
                        "independent",
                        "perCharacter"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "type",
                "text",
                "propertyValues"
            ]
        },
        "internal": {
            "type": "object",
            "description": "This property contains internal data for the ScenarioReasoner and must not be removed from the state. Internal is not always present in output; when it is, it must be sent back in input"
        }
    },
    "required": [
        "parameters"
    ]
}