{
    "allOf": [
        {
            "oneOf": [
                {
                    "properties": {
                        "state": {
                            "enum": [
                                "stopped"
                            ],
                            "type": "string"
                        }
                    },
                    "required": [
                        "state"
                    ],
                    "type": "object"
                },
                {
                    "properties": {
                        "state": {
                            "enum": [
                                "waiting"
                            ],
                            "type": "string"
                        },
                        "status": {
                            "type": "string"
                        }
                    },
                    "required": [
                        "state"
                    ],
                    "type": "object"
                },
                {
                    "properties": {
                        "current": {
                            "minimum": 0,
                            "type": "number"
                        },
                        "state": {
                            "enum": [
                                "running"
                            ],
                            "type": "string"
                        },
                        "status": {
                            "type": "string"
                        },
                        "total": {
                            "minimum": 0,
                            "type": "number"
                        }
                    },
                    "required": [
                        "state"
                    ],
                    "type": "object"
                },
                {
                    "properties": {
                        "error": true,
                        "state": {
                            "enum": [
                                "error"
                            ],
                            "type": "string"
                        }
                    },
                    "required": [
                        "state"
                    ],
                    "type": "object"
                }
            ],
            "type": "object"
        },
        {
            "properties": {
                "builder": {
                    "type": "object"
                },
                "id": {
                    "type": "number"
                },
                "target": {
                    "type": "object"
                }
            },
            "required": [
                "builder",
                "id"
            ],
            "type": "object"
        }
    ],
    "title": "Progress schema for builders.",
    "type": "object"
}