{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9_-]{1,128}$",
      "description": "Resource identifier returned by the operation."
    },
    "project_id": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9_-]{1,128}$",
      "description": "Project that owns this record."
    },
    "collection_revision": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "config_version": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "provider": {
      "type": "string",
      "const": "dataforseo"
    },
    "data_mode": {
      "type": "string",
      "const": "synthetic"
    },
    "metric": {
      "type": "string",
      "const": "rank"
    },
    "rank_scale": {
      "type": "string",
      "const": "one_thousand"
    },
    "target": {
      "type": "string",
      "minLength": 1,
      "maxLength": 253
    },
    "include_subdomains": {
      "type": "boolean"
    },
    "state": {
      "type": "string",
      "enum": [
        "active",
        "paused"
      ],
      "description": "Saved lifecycle or evidence state, as enumerated for this record."
    },
    "anchor_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
    },
    "cadence_seconds": {
      "type": "integer",
      "minimum": 86400,
      "maximum": 2592000
    },
    "stale_after_seconds": {
      "type": "integer",
      "minimum": 86400,
      "maximum": 5184000
    },
    "alerts": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "direction": {
          "type": "string",
          "enum": [
            "increase",
            "decrease",
            "either"
          ]
        },
        "minimum_change": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1000
        }
      },
      "required": [
        "enabled",
        "direction",
        "minimum_change"
      ],
      "additionalProperties": false
    },
    "last_admitted_slot": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$",
      "description": "UTC timestamp when the record was created."
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$",
      "description": "UTC timestamp of the last record update."
    },
    "availability": {
      "type": "object",
      "properties": {
        "collection": {
          "type": "string",
          "enum": [
            "disabled",
            "synthetic"
          ]
        },
        "alert_delivery": {
          "type": "string",
          "const": "not_enabled"
        }
      },
      "required": [
        "collection",
        "alert_delivery"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "id",
    "project_id",
    "collection_revision",
    "config_version",
    "provider",
    "data_mode",
    "metric",
    "rank_scale",
    "target",
    "include_subdomains",
    "state",
    "anchor_at",
    "cadence_seconds",
    "stale_after_seconds",
    "alerts",
    "last_admitted_slot",
    "created_at",
    "updated_at",
    "availability"
  ],
  "additionalProperties": false
}
