{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Resource identifier returned by the operation."
    },
    "watch_id": {
      "type": "string"
    },
    "operation_key": {
      "type": "string"
    },
    "state": {
      "type": "string",
      "enum": [
        "pending",
        "running",
        "completed",
        "partial"
      ],
      "description": "Saved lifecycle or evidence state, as enumerated for this record."
    },
    "source": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "queued",
            "running",
            "completed",
            "skipped",
            "unavailable",
            "failed",
            "waiting_source"
          ],
          "description": "Saved lifecycle or evidence state, as enumerated for this record."
        },
        "job_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "reason": {
          "anyOf": [
            {
              "type": "string",
              "description": "Recorded explanation; null when no explanation applies."
            },
            {
              "type": "null"
            }
          ],
          "description": "Recorded explanation; null when no explanation applies."
        },
        "result": {
          "anyOf": [
            {
              "type": "string",
              "description": "Saved result; null when this operation has no completed result."
            },
            {
              "type": "null"
            }
          ],
          "description": "Saved result; null when this operation has no completed result."
        },
        "lane": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "last_crawl_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "state",
        "job_id",
        "reason",
        "result",
        "lane"
      ],
      "additionalProperties": false
    },
    "target": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "queued",
            "running",
            "completed",
            "skipped",
            "unavailable",
            "failed",
            "waiting_source"
          ],
          "description": "Saved lifecycle or evidence state, as enumerated for this record."
        },
        "job_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "reason": {
          "anyOf": [
            {
              "type": "string",
              "description": "Recorded explanation; null when no explanation applies."
            },
            {
              "type": "null"
            }
          ],
          "description": "Recorded explanation; null when no explanation applies."
        },
        "result": {
          "anyOf": [
            {
              "type": "string",
              "description": "Saved result; null when this operation has no completed result."
            },
            {
              "type": "null"
            }
          ],
          "description": "Saved result; null when this operation has no completed result."
        },
        "lane": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "last_crawl_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "state",
        "job_id",
        "reason",
        "result",
        "lane"
      ],
      "additionalProperties": false
    },
    "classification": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "queued",
            "running",
            "completed",
            "skipped",
            "unavailable",
            "failed",
            "waiting_source"
          ],
          "description": "Saved lifecycle or evidence state, as enumerated for this record."
        },
        "job_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "reason": {
          "anyOf": [
            {
              "type": "string",
              "description": "Recorded explanation; null when no explanation applies."
            },
            {
              "type": "null"
            }
          ],
          "description": "Recorded explanation; null when no explanation applies."
        },
        "result": {
          "anyOf": [
            {
              "type": "string",
              "description": "Saved result; null when this operation has no completed result."
            },
            {
              "type": "null"
            }
          ],
          "description": "Saved result; null when this operation has no completed result."
        },
        "lane": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "last_crawl_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "state",
        "job_id",
        "reason",
        "result",
        "lane"
      ],
      "additionalProperties": false
    },
    "google": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "queued",
            "running",
            "completed",
            "skipped",
            "unavailable",
            "failed",
            "waiting_source"
          ],
          "description": "Saved lifecycle or evidence state, as enumerated for this record."
        },
        "job_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "reason": {
          "anyOf": [
            {
              "type": "string",
              "description": "Recorded explanation; null when no explanation applies."
            },
            {
              "type": "null"
            }
          ],
          "description": "Recorded explanation; null when no explanation applies."
        },
        "result": {
          "anyOf": [
            {
              "type": "string",
              "description": "Saved result; null when this operation has no completed result."
            },
            {
              "type": "null"
            }
          ],
          "description": "Saved result; null when this operation has no completed result."
        },
        "lane": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "last_crawl_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "state",
        "job_id",
        "reason",
        "result",
        "lane"
      ],
      "additionalProperties": false
    },
    "follow_up_required": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "watch_id",
    "operation_key",
    "state",
    "source",
    "target",
    "classification",
    "google",
    "follow_up_required"
  ],
  "additionalProperties": false
}
