{
    "definitions": {
        "setConfigValue": {
            "type": "object",
            "properties": {
                "command": {
                    "enum": [
                        "set-configvalue"
                    ]
                },
                "parameters": {
                    "type": "object",
                    "properties": {
                        "pid": {
                            "type": "string"
                        },
                        "key": {
                            "type": "string"
                        },
                        "value": {
                            "type": "string"
                        }
                    },
                    "required": [
                        "pid",
                        "key",
                        "value"
                    ]
                }
            }
        },
        "setConfigValueResult": {
            "type": "object",
            "properties": {
                "command": {
                    "enum": [
                        "set-configvalue-result"
                    ]
                },
                "parameters": {
                    "type": "object",
                    "properties": {
                        "pid": {
                            "type": "string"
                        },
                        "key": {
                            "type": "string"
                        },
                        "value": {
                            "type": "string"
                        },
                        "status": {
                            "pattern": "OK"
                        }
                    },
                    "required": [
                        "pid",
                        "key",
                        "value",
                        "status"
                    ]
                }
            }
        },
        "getConfigValue": {
            "type": "object",
            "properties": {
                "command": {
                    "enum": [
                        "get-configvalue"
                    ]
                },
                "parameters": {
                    "type": "object",
                    "properties": {
                        "pid": {
                            "type": "string"
                        },
                        "key": {
                            "type": "string"
                        }
                    },
                    "required": [
                        "pid",
                        "key"
                    ]
                }
            }
        },
        "getConfigValueResult": {
            "type": "object",
            "properties": {
                "command": {
                    "enum": [
                        "get-configvalue-result"
                    ]
                },
                "parameters": {
                    "type": "object",
                    "properties": {
                        "pid": {
                            "type": "string"
                        },
                        "key": {
                            "type": "string"
                        },
                        "value": {
                            "type": "string"
                        }
                    },
                    "required": [
                        "pid",
                        "key",
                        "value"
                    ]
                }
            }
        },
        "errorResult": {
            "type": "object",
            "properties": {
                "command": {
                    "enum": [
                        "error"
                    ]
                },
                "parameters": {
                    "type": "object",
                    "properties": {
                        "command": {
                            "enum": [
                                "get-configvalue",
                                "set-configvalue"
                            ]
                        },
                        "cause": {
                            "enum": [
                                "missing-parameter",
                                "unknown-configvalue",
                                "exception"
                            ]
                        },
                        "missing-parameter": {
                            "type": "string"
                        },
                        "unknown-configvalue": {
                            "type": "string"
                        },
                        "exception-cause": {
                            "type": "string"
                        },
                        "exception-message": {
                            "type": "string"
                        },
                        "exception-stacktrace": {
                            "type": "string"
                        }
                    },
                    "required": [
                        "command",
                        "cause"
                    ]
                }
            }
        }
    },
    "type": "object",
    "oneOf": [
        {
            "$ref": "#/definitions/setConfigValue"
        },
        {
            "$ref": "#/definitions/setConfigValueResult"
        },
        {
            "$ref": "#/definitions/getConfigValue"
        },
        {
            "$ref": "#/definitions/getConfigValueResult"
        },
        {
            "$ref": "#/definitions/errorResult"
        }
    ]
}