{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/epa/refs/heads/main/json-schema/echo-cwa-cwa04-schema.json",
  "title": "cwa04",
  "description": "Results Object",
  "type": "object",
  "properties": {
    "BadSystemIDs": {
      "description": "Identifies which passed query system identifiers are invalid.",
      "type": "string",
      "example": "12345"
    },
    "BioCVRows": {
      "description": "Number of facilities with current biosolid-related violations.",
      "type": "string",
      "example": "string"
    },
    "BioV3Rows": {
      "description": "Number of facilities having one or more quarters of biosolid-related non-compliance in the last three years.",
      "type": "string",
      "example": "string"
    },
    "CVRows": {
      "description": "Summary count of the number of CWA facilities or SDWA public drinking water systems with current violations.",
      "example": "0",
      "type": "string"
    },
    "FEARows": {
      "description": "Summary count of the number of facilities with a formal enforcement action in the past five years",
      "example": "1",
      "type": "string"
    },
    "Facilities": {
      "description": "A complex array of facility information.",
      "items": {
        "$ref": "#/definitions/cwa01"
      },
      "title": "Facilities",
      "type": "array",
      "xml": {
        "name": "Facilities",
        "wrapped": true
      },
      "example": [
        "string"
      ]
    },
    "INSPRows": {
      "description": "Number of facilities with insp_5yr_flag populated (CWP_DATE_LAST_INSPECTION)",
      "example": "1",
      "type": "string"
    },
    "IndianCountryRows": {
      "description": "Number of facilities with tribal_flag populated",
      "example": "0",
      "title": "Indian Country Row Count",
      "type": "string"
    },
    "InfFEARows": {
      "description": "Number of facilities with infea_5yr_flag populated (INFORMAL_ENF_ACT_COUNT > 0)",
      "example": "0",
      "type": "string"
    },
    "MapOutput": {
      "$ref": "#/definitions/cwa03"
    },
    "Message": {
      "description": "Field to record messages (typically performance-related) about packet processing",
      "example": "Success",
      "title": "Message",
      "type": "string"
    },
    "PageNo": {
      "description": "The number of pages of results returned",
      "example": "1",
      "title": "Page Number",
      "type": "string"
    },
    "QueryID": {
      "description": "Sequential number assigned to entire search result",
      "example": "245",
      "title": "Query Identifier",
      "type": "string"
    },
    "QueryRows": {
      "description": "Number of query results returned",
      "example": "5",
      "title": "Query Row Count",
      "type": "string"
    },
    "SVRows": {
      "description": "Number of facilities with curr_sv_flag populated (CWP_STATUS = \"Significant Violation\")",
      "example": "0",
      "title": "Significant Violation Result Count",
      "type": "string"
    },
    "TotalPenalties": {
      "description": "The total dollar amount of either assessed or final penalties within the five year time period",
      "example": "$963,531",
      "title": "Total Penalties",
      "type": "string"
    },
    "V3Rows": {
      "description": "Number of facilities having one or more quarters in non-compliance (QNC) in the last three years",
      "example": "2",
      "type": "string"
    },
    "Version": {
      "description": "Version of the SDWA system service",
      "example": "v2016-02-02 14:",
      "title": "Version",
      "type": "string"
    },
    "VioLast4QRows": {
      "description": "The number of facilities with a violation in the last year.",
      "title": "Facilities in Violation in the Last Year",
      "type": "string",
      "example": "string"
    }
  },
  "required": [
    "Message",
    "Version",
    "QueryRows",
    "IndianCountryRows",
    "SVRows",
    "CVRows",
    "V3Rows",
    "FEARows",
    "InfFEARows",
    "INSPRows",
    "BioCVRows",
    "BioV3Rows",
    "VioLast4QRows",
    "TotalPenalties",
    "BadSystemIDs",
    "QueryID",
    "PageNo"
  ]
}