{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "enum": [
        "potential_notices_workbook"
      ]
    },
    "@entity": {
      "type": "string",
      "enum": [
        "workbook"
      ]
    },
    "sheets": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "summary_sheet"
                ]
              },
              "@entity": {
                "type": "string",
                "enum": [
                  "sheet"
                ]
              },
              "blocks": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "potential_notices_summary_table"
                          ]
                        },
                        "@entity": {
                          "type": "string",
                          "enum": [
                            "table"
                          ]
                        },
                        "header": {
                          "type": "array",
                          "items": [
                            {
                              "type": "string",
                              "enum": [
                                "type_of_default"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "is_applicable"
                              ]
                            }
                          ],
                          "additionalItems": false,
                          "minItems": 2,
                          "maxItems": 2
                        },
                        "rows": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": [
                              {
                                "type": "string",
                                "enum": [
                                  "short_payment",
                                  "short_deduction",
                                  "late_payment",
                                  "late_deduction",
                                  "late_filing_fee_u/s_427"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Y",
                                  "N",
                                  "N/A"
                                ]
                              }
                            ],
                            "additionalItems": false,
                            "minItems": 2,
                            "maxItems": 2
                          }
                        }
                      },
                      "required": [
                        "name",
                        "@entity",
                        "header",
                        "rows"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "penalty_summary_table"
                          ]
                        },
                        "@entity": {
                          "type": "string",
                          "enum": [
                            "table"
                          ]
                        },
                        "header": {
                          "type": "array",
                          "items": [
                            {
                              "type": "string",
                              "enum": [
                                "particular"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "rate"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "amount"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "notice_reason"
                              ]
                            }
                          ],
                          "additionalItems": false,
                          "minItems": 4,
                          "maxItems": 4
                        },
                        "rows": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": [
                              {
                                "type": "string",
                                "enum": [
                                  "short_payment",
                                  "short_deduction",
                                  "late_payment",
                                  "late_deduction",
                                  "late_filing_fee_u/s_427"
                                ]
                              },
                              {
                                "type": "string"
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal"
                              },
                              {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Explains a result or why the amount is unavailable."
                              }
                            ],
                            "additionalItems": false,
                            "minItems": 4,
                            "maxItems": 4
                          }
                        }
                      },
                      "required": [
                        "name",
                        "@entity",
                        "header",
                        "rows"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "interest_summary_table"
                          ]
                        },
                        "@entity": {
                          "type": "string",
                          "enum": [
                            "table"
                          ]
                        },
                        "header": {
                          "type": "array",
                          "items": [
                            {
                              "type": "string",
                              "enum": [
                                "particular"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "actual"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "required"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "difference"
                              ]
                            }
                          ],
                          "additionalItems": false,
                          "minItems": 4,
                          "maxItems": 4
                        },
                        "rows": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": [
                              {
                                "type": "string"
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal"
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal"
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal",
                                "description": "Required minus actual. A positive difference is a shortage and a negative difference is an excess."
                              }
                            ],
                            "additionalItems": false,
                            "minItems": 4,
                            "maxItems": 4
                          }
                        }
                      },
                      "required": [
                        "name",
                        "@entity",
                        "header",
                        "rows"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "deduction_summary_table"
                          ]
                        },
                        "@entity": {
                          "type": "string",
                          "enum": [
                            "table"
                          ]
                        },
                        "header": {
                          "type": "array",
                          "items": [
                            {
                              "type": "string",
                              "enum": [
                                "particular"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "actual"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "required"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "difference"
                              ]
                            }
                          ],
                          "additionalItems": false,
                          "minItems": 4,
                          "maxItems": 4
                        },
                        "rows": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": [
                              {
                                "type": "string"
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal"
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal"
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal",
                                "description": "Required minus actual. A positive difference is a shortage and a negative difference is an excess."
                              }
                            ],
                            "additionalItems": false,
                            "minItems": 4,
                            "maxItems": 4
                          }
                        }
                      },
                      "required": [
                        "name",
                        "@entity",
                        "header",
                        "rows"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "challan_summary_table"
                          ]
                        },
                        "@entity": {
                          "type": "string",
                          "enum": [
                            "table"
                          ]
                        },
                        "header": {
                          "type": "array",
                          "items": [
                            {
                              "type": "string",
                              "enum": [
                                "particular"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "actual"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "required"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "difference"
                              ]
                            }
                          ],
                          "additionalItems": false,
                          "minItems": 4,
                          "maxItems": 4
                        },
                        "rows": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": [
                              {
                                "type": "string"
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal"
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal"
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal",
                                "description": "Required minus actual. A positive difference is a shortage and a negative difference is an excess."
                              }
                            ],
                            "additionalItems": false,
                            "minItems": 4,
                            "maxItems": 4
                          }
                        }
                      },
                      "required": [
                        "name",
                        "@entity",
                        "header",
                        "rows"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "challan_utilization_summary_table"
                          ]
                        },
                        "@entity": {
                          "type": "string",
                          "enum": [
                            "table"
                          ]
                        },
                        "header": {
                          "type": "array",
                          "items": [
                            {
                              "type": "string",
                              "enum": [
                                "particular"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "actual"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "required"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "difference"
                              ]
                            }
                          ],
                          "additionalItems": false,
                          "minItems": 4,
                          "maxItems": 4
                        },
                        "rows": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": [
                              {
                                "type": "string"
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal"
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal"
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal",
                                "description": "Required minus actual. A positive difference is a shortage and a negative difference is an excess."
                              }
                            ],
                            "additionalItems": false,
                            "minItems": 4,
                            "maxItems": 4
                          }
                        }
                      },
                      "required": [
                        "name",
                        "@entity",
                        "header",
                        "rows"
                      ]
                    }
                  ]
                }
              }
            },
            "required": [
              "name",
              "@entity",
              "blocks"
            ]
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "challan_sheet"
                ]
              },
              "@entity": {
                "type": "string",
                "enum": [
                  "sheet"
                ]
              },
              "blocks": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "challan_table"
                          ]
                        },
                        "@entity": {
                          "type": "string",
                          "enum": [
                            "table"
                          ]
                        },
                        "header": {
                          "type": "array",
                          "items": [
                            {
                              "type": "string",
                              "enum": [
                                "challan_serial"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "bsr_code"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "paid_date_epoch"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "minor_head"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "total_tax_deducted"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "interest"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "late_filing_fees"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "other_penalty"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "utilized_amount"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "notice"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "notice_reason"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "challan_available"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "utilized_amount_in_payments"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "short_payment"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "challan_due_date_epoch"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "short_payment_interest"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "late_payment_interest"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "total_interest_payable"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "additional_amount_to_be_deposited"
                              ]
                            }
                          ],
                          "additionalItems": false,
                          "minItems": 19,
                          "maxItems": 19
                        },
                        "rows": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": [
                              {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              {
                                "type": "integer",
                                "format": "Long"
                              },
                              {
                                "type": "string"
                              },
                              {
                                "type": "number",
                                "format": "BigDecimal"
                              },
                              {
                                "type": "number",
                                "format": "BigDecimal"
                              },
                              {
                                "type": "number",
                                "format": "BigDecimal"
                              },
                              {
                                "type": "number",
                                "format": "BigDecimal"
                              },
                              {
                                "type": "number",
                                "format": "BigDecimal"
                              },
                              {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal"
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal"
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal"
                              },
                              {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "format": "Long",
                                "description": "Deposit due date in epoch milliseconds, or null if not evaluated."
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal",
                                "minimum": 0,
                                "description": "Interest attributable to short payment only. Zero means no interest for this category; null means it could not be assessed."
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal",
                                "minimum": 0,
                                "description": "Interest attributable to late payment only, excluding interest already included in short_payment_interest. Zero means no interest for this category; null means it could not be assessed."
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal",
                                "minimum": 0,
                                "description": "Sum of short_payment_interest and late_payment_interest. Interest only, excluding additional tax and statement fees. Null if either component could not be assessed."
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal",
                                "minimum": 0,
                                "description": "Challan short_payment plus total_interest_payable. Excludes statement fees and any discretionary penalty. Null if either amount could not be assessed."
                              }
                            ],
                            "additionalItems": false,
                            "minItems": 19,
                            "maxItems": 19
                          }
                        }
                      },
                      "required": [
                        "name",
                        "@entity",
                        "header",
                        "rows"
                      ]
                    }
                  ]
                }
              }
            },
            "required": [
              "name",
              "@entity",
              "blocks"
            ]
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "payment_sheet"
                ]
              },
              "@entity": {
                "type": "string",
                "enum": [
                  "sheet"
                ]
              },
              "blocks": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "payment_table"
                          ]
                        },
                        "@entity": {
                          "type": "string",
                          "enum": [
                            "table"
                          ]
                        },
                        "header": {
                          "type": "array",
                          "items": [
                            {
                              "type": "string",
                              "enum": [
                                "payee_sr_no"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "challan_serial"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "bsr_code"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "nature_of_payment"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "payment_amount"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "payment_date_epoch"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "total_tax_deducted"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "deduction_date_epoch"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "reason_for_lower_deduction"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "certificate_number"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "notice"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "notice_reason"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "tds_rate"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "tds_rate_as_per_it_act"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "tds_amount_payable_as_per_it_act"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "additional_tds_to_be_deducted"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "short_deduction_interest"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "late_deduction_interest"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "total_interest_payable"
                              ]
                            }
                          ],
                          "additionalItems": false,
                          "minItems": 19,
                          "maxItems": 19
                        },
                        "rows": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": [
                              {
                                "type": "integer",
                                "minimum": 1,
                                "format": "Long"
                              },
                              {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              {
                                "type": "string"
                              },
                              {
                                "type": "number",
                                "format": "BigDecimal"
                              },
                              {
                                "type": "integer",
                                "format": "Long",
                                "description": "Earlier of payment or credit, in epoch milliseconds."
                              },
                              {
                                "type": "number",
                                "format": "BigDecimal"
                              },
                              {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "format": "Long"
                              },
                              {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal"
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal"
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal"
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal",
                                "minimum": 0,
                                "description": "Additional tax to deduct, max(0, required tax minus actual tax deducted)."
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal",
                                "minimum": 0,
                                "description": "Interest attributable to short deduction only. Zero means no interest for this category; null means it could not be assessed."
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal",
                                "minimum": 0,
                                "description": "Interest attributable to late deduction only, excluding interest already included in short_deduction_interest. Zero means no interest for this category; null means it could not be assessed."
                              },
                              {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "format": "BigDecimal",
                                "minimum": 0,
                                "description": "Sum of short_deduction_interest and late_deduction_interest. Interest only, excluding additional tax and statement fees. Null if either component could not be assessed."
                              }
                            ],
                            "additionalItems": false,
                            "minItems": 19,
                            "maxItems": 19
                          }
                        }
                      },
                      "required": [
                        "name",
                        "@entity",
                        "header",
                        "rows"
                      ]
                    }
                  ]
                }
              }
            },
            "required": [
              "name",
              "@entity",
              "blocks"
            ]
          }
        ]
      }
    }
  },
  "required": [
    "name",
    "@entity",
    "sheets"
  ]
}
