{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "check": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "description": "Resource identifier returned by the operation."
        },
        "checked_at": {
          "type": "string",
          "description": "UTC timestamp of the saved check."
        },
        "method": {
          "type": "string",
          "enum": [
            "text",
            "counts"
          ]
        },
        "result": {
          "type": "string",
          "enum": [
            "match",
            "differs",
            "counts_match",
            "counts_differ"
          ],
          "description": "Saved result; null when this operation has no completed result."
        },
        "missing_in_google": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "extra_in_google": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "examples": {
          "type": "object",
          "properties": {
            "missing_in_google": {
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "extra_in_google": {
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "missing_in_google",
            "extra_in_google"
          ],
          "additionalProperties": false
        },
        "google": {
          "type": "object",
          "properties": {
            "domains": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "urls": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "domains",
            "urls"
          ],
          "additionalProperties": false
        },
        "uploaded_on": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "checked_by": {
          "type": "string",
          "enum": [
            "person",
            "agent"
          ]
        }
      },
      "required": [
        "id",
        "checked_at",
        "method",
        "result",
        "missing_in_google",
        "extra_in_google",
        "examples",
        "google",
        "uploaded_on",
        "checked_by"
      ],
      "additionalProperties": false
    },
    "status": {
      "type": "object",
      "properties": {
        "project_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "description": "Project that owns this record."
        },
        "rules": {
          "type": "object",
          "properties": {
            "active": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "effective": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "domains": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "urls": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "active",
            "effective",
            "domains",
            "urls"
          ],
          "additionalProperties": false
        },
        "changed_since_download": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "last_change_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "last_download": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "description": "Resource identifier returned by the operation."
                },
                "workspace_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "description": "Workspace that owns this record."
                },
                "project_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "description": "Project that owns this record."
                },
                "format_version": {
                  "type": "number",
                  "const": 1
                },
                "sha256": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "stored_active_count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "effective_count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "byte_length": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "collection_revision": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "source_revisions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200,
                        "description": "Resource identifier returned by the operation."
                      },
                      "revision": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991,
                        "description": "Optimistic concurrency revision; supply it as expectedRevision on the next write."
                      }
                    },
                    "required": [
                      "id",
                      "revision"
                    ],
                    "additionalProperties": false
                  }
                },
                "created_by": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "created_at": {
                  "type": "string",
                  "description": "UTC timestamp when the record was created."
                },
                "exported_by_label": {
                  "type": "string",
                  "enum": [
                    "you",
                    "owner",
                    "admin",
                    "member",
                    "viewer",
                    "former member"
                  ]
                }
              },
              "required": [
                "id",
                "workspace_id",
                "project_id",
                "format_version",
                "sha256",
                "stored_active_count",
                "effective_count",
                "byte_length",
                "collection_revision",
                "source_revisions",
                "created_by",
                "created_at"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "google": {
          "type": "object",
          "properties": {
            "state": {
              "type": "string",
              "enum": [
                "never_checked",
                "in_sync",
                "behind",
                "differs",
                "counts_only"
              ],
              "description": "Saved lifecycle or evidence state, as enumerated for this record."
            },
            "changes_since_check": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "last_check": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200,
                      "description": "Resource identifier returned by the operation."
                    },
                    "checked_at": {
                      "type": "string",
                      "description": "UTC timestamp of the saved check."
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "text",
                        "counts"
                      ]
                    },
                    "result": {
                      "type": "string",
                      "enum": [
                        "match",
                        "differs",
                        "counts_match",
                        "counts_differ"
                      ],
                      "description": "Saved result; null when this operation has no completed result."
                    },
                    "missing_in_google": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "extra_in_google": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "examples": {
                      "type": "object",
                      "properties": {
                        "missing_in_google": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "extra_in_google": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "missing_in_google",
                        "extra_in_google"
                      ],
                      "additionalProperties": false
                    },
                    "google": {
                      "type": "object",
                      "properties": {
                        "domains": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "urls": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "domains",
                        "urls"
                      ],
                      "additionalProperties": false
                    },
                    "uploaded_on": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "checked_by": {
                      "type": "string",
                      "enum": [
                        "person",
                        "agent"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "checked_at",
                    "method",
                    "result",
                    "missing_in_google",
                    "extra_in_google",
                    "examples",
                    "google",
                    "uploaded_on",
                    "checked_by"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "state",
            "changes_since_check",
            "last_check"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "project_id",
        "rules",
        "changed_since_download",
        "last_change_at",
        "last_download",
        "google"
      ],
      "additionalProperties": false,
      "description": "Resource lifecycle status."
    }
  },
  "required": [
    "check",
    "status"
  ],
  "additionalProperties": {}
}
