{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "SectionAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "section"
        },
        "sectionId": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "sectionId"
      ]
    }
  },
  "operationId": "headerFooters.pageNumbers.remove",
  "schemas": {
    "input": {
      "type": "object",
      "properties": {
        "section": {
          "$ref": "#/$defs/SectionAddress"
        },
        "kind": {
          "enum": [
            "header",
            "footer"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "section"
      ]
    },
    "output": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "success": {
              "const": true
            },
            "section": {
              "$ref": "#/$defs/SectionAddress"
            },
            "parts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "const": "headerFooterPart"
                  },
                  "refId": {
                    "type": "string"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "kind",
                  "refId"
                ]
              }
            }
          },
          "additionalProperties": false,
          "required": [
            "success",
            "section",
            "parts"
          ]
        },
        {
          "type": "object",
          "properties": {
            "success": {
              "const": false
            },
            "failure": {
              "type": "object",
              "properties": {
                "code": {
                  "enum": [
                    "TARGET_NOT_FOUND",
                    "NO_OP",
                    "CAPABILITY_UNAVAILABLE",
                    "INTERNAL_ERROR"
                  ]
                },
                "message": {
                  "type": "string"
                },
                "details": {}
              },
              "additionalProperties": false,
              "required": [
                "code",
                "message"
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "success",
            "failure"
          ]
        }
      ]
    },
    "success": {
      "type": "object",
      "properties": {
        "success": {
          "const": true
        },
        "section": {
          "$ref": "#/$defs/SectionAddress"
        },
        "parts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "headerFooterPart"
              },
              "refId": {
                "type": "string"
              }
            },
            "additionalProperties": false,
            "required": [
              "kind",
              "refId"
            ]
          }
        }
      },
      "additionalProperties": false,
      "required": [
        "success",
        "section",
        "parts"
      ]
    },
    "failure": {
      "type": "object",
      "properties": {
        "success": {
          "const": false
        },
        "failure": {
          "type": "object",
          "properties": {
            "code": {
              "enum": [
                "TARGET_NOT_FOUND",
                "NO_OP",
                "CAPABILITY_UNAVAILABLE",
                "INTERNAL_ERROR"
              ]
            },
            "message": {
              "type": "string"
            },
            "details": {}
          },
          "additionalProperties": false,
          "required": [
            "code",
            "message"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "success",
        "failure"
      ]
    }
  }
}
