{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "DocPayload Document Definition",
  "description": "JSON schema for DocPayload document and component definitions. Point your IDE at this schema for autocomplete and validation.",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string",
      "description": "Optional JSON Schema URL for IDE validation."
    },
    "document": {
      "$ref": "#/definitions/DocumentDefinition"
    },
    "component": {
      "$ref": "#/definitions/DocumentDefinition"
    },
    "documentDefinition": {
      "$ref": "#/definitions/DocumentDefinition"
    }
  },
  "additionalProperties": false,
  "oneOf": [
    {
      "title": "document",
      "required": [
        "document"
      ]
    },
    {
      "title": "component",
      "required": [
        "component"
      ]
    },
    {
      "title": "documentDefinition",
      "required": [
        "documentDefinition"
      ]
    }
  ],
  "definitions": {
    "PageSetup": {
      "type": "object",
      "properties": {
        "size": {
          "type": "string",
          "enum": [
            "LETTER",
            "LEGAL",
            "EXECUTIVE",
            "TABLOID",
            "LEDGER",
            "A0",
            "A1",
            "A2",
            "A3",
            "A4",
            "A5",
            "A6",
            "A7",
            "A8",
            "A9",
            "A10",
            "B1",
            "B2",
            "B3",
            "B4",
            "B5",
            "B6",
            "B7",
            "B8",
            "B9",
            "B10"
          ]
        },
        "orientation": {
          "type": "string",
          "enum": [
            "portrait",
            "landscape"
          ]
        },
        "backgroundColor": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "margins": {
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        "borderTop": {
          "type": "string"
        },
        "borderRight": {
          "type": "string"
        },
        "borderBottom": {
          "type": "string"
        },
        "borderLeft": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "Metadata": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "subject": {
          "type": "string"
        },
        "keywords": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "ListContent": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string"
        },
        "map": {
          "type": "string"
        },
        "symbol": {
          "type": "string"
        },
        "li": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Content"
          }
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "TableContent": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string"
        },
        "map": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "rows": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/definitions/Content"
            }
          }
        },
        "widths": {
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "ImageContent": {
      "type": "object",
      "properties": {
        "src": {
          "type": "string"
        },
        "width": {
          "type": "number"
        },
        "height": {
          "type": "number"
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "Coordinate": {
      "type": "object",
      "properties": {
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "LineDefinition": {
      "type": "object",
      "properties": {
        "lineType": {
          "type": "string",
          "enum": [
            "none",
            "solid",
            "dashed",
            "dotted",
            "double",
            "roundDots",
            "groove",
            "inset",
            "outset",
            "ridge",
            "dashedFixed"
          ]
        },
        "length": {
          "type": "number"
        },
        "width": {
          "type": "number"
        },
        "opacity": {
          "type": "number"
        },
        "radius": {
          "type": "number"
        },
        "points": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Coordinate"
          }
        },
        "color": {
          "type": "string"
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "ColumnsDefinition": {
      "type": "object",
      "properties": {
        "rows": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/definitions/Content"
            }
          }
        },
        "gap": {
          "type": "number"
        },
        "widths": {
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        "colNumber": {
          "type": "integer"
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "LineShape": {
      "type": "object",
      "properties": {
        "x1": {
          "type": "number"
        },
        "y1": {
          "type": "number"
        },
        "x2": {
          "type": "number"
        },
        "y2": {
          "type": "number"
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "RectShape": {
      "type": "object",
      "properties": {
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "width": {
          "type": "number"
        },
        "height": {
          "type": "number"
        },
        "rx": {
          "type": "number"
        },
        "ry": {
          "type": "number"
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "CircleShape": {
      "type": "object",
      "properties": {
        "cx": {
          "type": "number"
        },
        "cy": {
          "type": "number"
        },
        "r": {
          "type": "number"
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "EllipseShape": {
      "type": "object",
      "properties": {
        "cx": {
          "type": "number"
        },
        "cy": {
          "type": "number"
        },
        "rx": {
          "type": "number"
        },
        "ry": {
          "type": "number"
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "PathShape": {
      "type": "object",
      "properties": {
        "d": {
          "type": "string"
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "TextShape": {
      "type": "object",
      "properties": {
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "text": {
          "type": "string"
        },
        "width": {
          "type": "number"
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "TextPathShape": {
      "type": "object",
      "properties": {
        "d": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "side": {
          "type": "string",
          "enum": [
            "above",
            "below"
          ]
        },
        "startOffset": {
          "type": "number"
        },
        "alignment": {
          "type": "string",
          "enum": [
            "start",
            "middle",
            "end"
          ]
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "CanvasImageShape": {
      "type": "object",
      "properties": {
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "width": {
          "type": "number"
        },
        "height": {
          "type": "number"
        },
        "href": {
          "type": "string"
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "PolygonShape": {
      "type": "object",
      "properties": {
        "points": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Coordinate"
          }
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "NamedPolygonShape": {
      "type": "object",
      "properties": {
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "width": {
          "type": "number"
        },
        "height": {
          "type": "number"
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "ArcShape": {
      "type": "object",
      "properties": {
        "cx": {
          "type": "number"
        },
        "cy": {
          "type": "number"
        },
        "r": {
          "type": "number"
        },
        "startAngle": {
          "type": "number"
        },
        "endAngle": {
          "type": "number"
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "BarcodeContent": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "code128",
            "code39",
            "code93",
            "code11",
            "codabar",
            "inter25",
            "itf14",
            "ean13",
            "ean8",
            "upca",
            "upce",
            "qrcode",
            "datamatrix",
            "pdf417",
            "aztec",
            "maxicode",
            "microqr",
            "postnet",
            "planet",
            "royalmail4state",
            "australiapost",
            "pharmacode",
            "gs1-128",
            "databar",
            "databar-ltd",
            "databar-exp",
            "hibc",
            "hibc-dm",
            "excode39",
            "telepen",
            "telepen-num",
            "logmars",
            "vin",
            "dpleitcode",
            "dpidentcode",
            "msi",
            "c25",
            "c25iata",
            "c25logic",
            "c25ind",
            "flat",
            "rmqr",
            "dotcode",
            "hanxin",
            "code16k",
            "micropdf417",
            "codablockf",
            "ultracode",
            "gridmatrix",
            "koreapost",
            "japanpost",
            "kix",
            "uspsimail",
            "hibc-39",
            "hibc-qr",
            "hibc-pdf417",
            "hibc-micropdf",
            "hibc-codablockf",
            "hibc-aztec",
            "databar-omnstk",
            "databar-expstk",
            "pharma2",
            "channel",
            "upnqr"
          ]
        },
        "code": {
          "type": "string"
        },
        "width": {
          "type": "number"
        },
        "height": {
          "type": "number"
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "CanvasBarcodeShape": {
      "type": "object",
      "properties": {
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "width": {
          "type": "number"
        },
        "height": {
          "type": "number"
        },
        "spec": {
          "$ref": "#/definitions/BarcodeContent"
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "CanvasCommand": {
      "type": "object",
      "properties": {
        "line": {
          "$ref": "#/definitions/LineShape"
        },
        "rect": {
          "$ref": "#/definitions/RectShape"
        },
        "circle": {
          "$ref": "#/definitions/CircleShape"
        },
        "ellipse": {
          "$ref": "#/definitions/EllipseShape"
        },
        "path": {
          "$ref": "#/definitions/PathShape"
        },
        "text": {
          "$ref": "#/definitions/TextShape"
        },
        "textPath": {
          "$ref": "#/definitions/TextPathShape"
        },
        "image": {
          "$ref": "#/definitions/CanvasImageShape"
        },
        "polygon": {
          "$ref": "#/definitions/PolygonShape"
        },
        "triangle": {
          "$ref": "#/definitions/NamedPolygonShape"
        },
        "diamond": {
          "$ref": "#/definitions/NamedPolygonShape"
        },
        "pentagon": {
          "$ref": "#/definitions/NamedPolygonShape"
        },
        "hexagon": {
          "$ref": "#/definitions/NamedPolygonShape"
        },
        "octagon": {
          "$ref": "#/definitions/NamedPolygonShape"
        },
        "plus": {
          "$ref": "#/definitions/NamedPolygonShape"
        },
        "parallelogram": {
          "$ref": "#/definitions/NamedPolygonShape"
        },
        "trapezoid": {
          "$ref": "#/definitions/NamedPolygonShape"
        },
        "rightArrow": {
          "$ref": "#/definitions/NamedPolygonShape"
        },
        "leftArrow": {
          "$ref": "#/definitions/NamedPolygonShape"
        },
        "upArrow": {
          "$ref": "#/definitions/NamedPolygonShape"
        },
        "downArrow": {
          "$ref": "#/definitions/NamedPolygonShape"
        },
        "chevron": {
          "$ref": "#/definitions/NamedPolygonShape"
        },
        "arc": {
          "$ref": "#/definitions/ArcShape"
        },
        "barcode": {
          "$ref": "#/definitions/CanvasBarcodeShape"
        }
      },
      "additionalProperties": false
    },
    "UInt32": {
      "type": "object",
      "properties": {},
      "additionalProperties": false
    },
    "TocDefinition": {
      "type": "object",
      "properties": {
        "maxLevel": {
          "$ref": "#/definitions/UInt32"
        },
        "title": {
          "type": "string"
        },
        "style": {
          "type": "string"
        },
        "titleStyle": {
          "type": "string"
        },
        "outlines": {
          "type": "boolean"
        },
        "tabLeader": {
          "type": "string",
          "enum": [
            "dot",
            "hyphen",
            "underscore",
            "none"
          ]
        }
      },
      "additionalProperties": false
    },
    "UseReference": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "data": {
          "type": "object"
        }
      },
      "additionalProperties": false
    },
    "Content": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string"
        },
        "break": {
          "type": "string",
          "enum": [
            "page",
            "section",
            "line"
          ]
        },
        "p": {
          "type": "string"
        },
        "th": {
          "type": "string"
        },
        "td": {
          "type": "string"
        },
        "h1": {
          "type": "string"
        },
        "h2": {
          "type": "string"
        },
        "h3": {
          "type": "string"
        },
        "h4": {
          "type": "string"
        },
        "h5": {
          "type": "string"
        },
        "ol": {
          "$ref": "#/definitions/ListContent"
        },
        "ul": {
          "$ref": "#/definitions/ListContent"
        },
        "table": {
          "$ref": "#/definitions/TableContent"
        },
        "image": {
          "$ref": "#/definitions/ImageContent"
        },
        "separator": {
          "$ref": "#/definitions/LineDefinition"
        },
        "columns": {
          "$ref": "#/definitions/ColumnsDefinition"
        },
        "shapes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CanvasCommand"
          }
        },
        "viewBox": {
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        "padding": {
          "type": "number"
        },
        "toc": {
          "$ref": "#/definitions/TocDefinition"
        },
        "style": {
          "type": "string"
        },
        "header": {
          "$ref": "#/definitions/HeaderFooterDefinition"
        },
        "footer": {
          "$ref": "#/definitions/HeaderFooterDefinition"
        },
        "pageSetup": {
          "$ref": "#/definitions/PageSetup"
        },
        "colspan": {
          "type": "integer"
        },
        "rowspan": {
          "type": "integer"
        },
        "outline": {
          "type": "boolean"
        },
        "ref": {
          "$ref": "#/definitions/UseReference"
        }
      },
      "additionalProperties": false
    },
    "HeaderFooterDefinition": {
      "type": "object",
      "properties": {
        "content": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Content"
          }
        },
        "separator": {
          "$ref": "#/definitions/LineDefinition"
        },
        "skipPages": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "offset": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "StyleDefinition": {
      "type": "object",
      "properties": {
        "horizontalScaling": {},
        "maxHeight": {
          "type": "number"
        },
        "outline": {},
        "overflowY": {},
        "float": {},
        "outlineOffset": {},
        "listType": {},
        "widowsControl": {},
        "alignContent": {},
        "symbolIndent": {},
        "paddingTop": {
          "type": "number"
        },
        "letterSpacing": {
          "type": "number"
        },
        "symbolPrefix": {},
        "columnGap": {
          "type": "number"
        },
        "borderBottomRightRadius": {
          "type": "number"
        },
        "border": {
          "type": "string"
        },
        "columnGapBorder": {},
        "skew": {},
        "verticalScaling": {},
        "rotationPointX": {},
        "appearanceStreamLayout": {},
        "color": {
          "type": "string"
        },
        "fill": {
          "type": "string"
        },
        "right": {
          "type": "number"
        },
        "fontProvider": {},
        "fillAvailableArea": {},
        "lineHeight": {
          "type": "number"
        },
        "paddingLeft": {
          "type": "number"
        },
        "rotationPointY": {},
        "columnWidth": {},
        "captionSide": {},
        "borderRadius": {
          "type": "number"
        },
        "splitCharacters": {},
        "autoScale": {},
        "tabLeader": {},
        "textRise": {},
        "horizontalAlign": {},
        "borderBottom": {
          "type": "string"
        },
        "backgroundColor": {
          "type": "string"
        },
        "fillColorRgb": {},
        "verticalBorderSpacing": {
          "type": "number"
        },
        "textRenderingMode": {},
        "hyphenation": {},
        "overflowX": {},
        "borderBottomLeftRadius": {
          "type": "number"
        },
        "listStart": {},
        "autoScaleWidth": {},
        "underline": {},
        "strokeLinejoin": {
          "type": "string",
          "enum": [
            "miter",
            "round",
            "bevel"
          ]
        },
        "background": {},
        "tabStops": {},
        "borderTopRightRadius": {
          "type": "number"
        },
        "left": {},
        "stroke": {
          "type": "string"
        },
        "fontStyle": {
          "type": "string",
          "enum": [
            "normal",
            "italic",
            "oblique"
          ]
        },
        "rotate": {
          "type": "number"
        },
        "tableLayout": {},
        "miterLimit": {
          "type": "number"
        },
        "tabAnchor": {},
        "strokeDasharray": {
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        "transform": {},
        "fontSet": {},
        "alignItems": {},
        "justifyContent": {},
        "noSoftWrapInline": {},
        "strokeLinecap": {},
        "action": {},
        "bottom": {
          "type": "number"
        },
        "paddingRight": {},
        "typographyConfig": {},
        "symbolAlign": {},
        "baseDirection": {
          "type": "string",
          "enum": [
            "ltr",
            "rtl"
          ]
        },
        "margin": {
          "type": "number"
        },
        "fontScript": {},
        "linkAnnotation": {},
        "columnCount": {
          "type": "number"
        },
        "horizontalBorderSpacing": {
          "type": "number"
        },
        "paddingBottom": {},
        "taggingHintKey": {},
        "tabDefault": {},
        "flexWrap": {},
        "backgroundImage": {},
        "taggingHelper": {},
        "borderLeft": {
          "type": "string"
        },
        "destination": {},
        "minWidth": {
          "type": "number"
        },
        "borderTop": {
          "type": "string"
        },
        "keepTogether": {},
        "symbolOrdinal": {},
        "borderTopLeftRadius": {
          "type": "number"
        },
        "pageNumber": {},
        "listSymbolsInitialized": {},
        "width": {
          "type": "number"
        },
        "rotationInitialHeight": {},
        "marginLeft": {
          "type": "number"
        },
        "marginBottom": {},
        "ignoreFooter": {},
        "collapsingMargins": {},
        "symbolPosition": {},
        "opacity": {
          "type": "number"
        },
        "firstLineIndent": {
          "type": "number"
        },
        "fillAvailableAreaOnSplit": {},
        "leading": {
          "type": "number"
        },
        "areaBreakType": {},
        "strokeWidth": {
          "type": "number"
        },
        "flexBasis": {},
        "fontWeight": {
          "type": "string",
          "enum": [
            "normal",
            "bold",
            "bolder",
            "lighter",
            "100",
            "200",
            "300",
            "400",
            "500",
            "600",
            "700",
            "800",
            "900"
          ]
        },
        "fontSize": {
          "type": "number"
        },
        "id": {},
        "forcedPlacement": {},
        "symbolSuffix": {},
        "wordSpacing": {
          "type": "number"
        },
        "fontFamily": {
          "type": "string"
        },
        "alignSelf": {},
        "top": {
          "type": "number"
        },
        "treatAsContinuousContainerResult": {},
        "borderRight": {
          "type": "string"
        },
        "spacingRatio": {},
        "flexDirection": {},
        "borderCollapse": {
          "type": "string",
          "enum": [
            "separate",
            "collapse"
          ]
        },
        "ignoreHeader": {},
        "boxSizing": {},
        "orphansControl": {},
        "strokeDashoffset": {
          "type": "number"
        },
        "autoScaleHeight": {},
        "marginTop": {
          "type": "number"
        },
        "metaInfo": {},
        "maxWidth": {
          "type": "number"
        },
        "minHeight": {
          "type": "number"
        },
        "rotationInitialWidth": {},
        "clear": {},
        "overflowWrap": {},
        "full": {},
        "treatAsContinuousContainer": {},
        "flexGrow": {},
        "addMarkedContentText": {},
        "relativePosition": {},
        "padding": {
          "type": "number"
        },
        "flushOnDraw": {},
        "inlineVerticalAlignment": {},
        "characterSpacing": {
          "type": "number"
        },
        "textAlign": {
          "type": "string",
          "enum": [
            "left",
            "center",
            "right",
            "justify"
          ]
        },
        "fixedPosition": {},
        "renderingMode": {},
        "keepWithNext": {},
        "height": {
          "type": "number"
        },
        "flexShrink": {},
        "fontKerning": {},
        "verticalAlign": {
          "type": "string",
          "enum": [
            "top",
            "middle",
            "bottom",
            "baseline"
          ]
        },
        "marginRight": {},
        "objectFit": {},
        "symbol": {},
        "lineDrawer": {}
      },
      "additionalProperties": false
    },
    "WatermarkDefinition": {
      "type": "object",
      "properties": {
        "content": {
          "$ref": "#/definitions/Content"
        },
        "spacing": {
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        "angle": {
          "type": "number"
        },
        "repeat": {
          "type": "boolean"
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "FontFamilyDefinition": {
      "type": "object",
      "properties": {
        "regular": {
          "type": "string"
        },
        "bold": {
          "type": "string"
        },
        "italic": {
          "type": "string"
        },
        "boldItalic": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "DiagnosticsDefinition": {
      "type": "object",
      "properties": {
        "showInDocument": {
          "type": "string",
          "enum": [
            "off",
            "appendix",
            "inline",
            "both"
          ]
        },
        "minLevel": {
          "type": "string",
          "enum": [
            "info",
            "warning",
            "error"
          ]
        }
      },
      "additionalProperties": false
    },
    "PdfPermissions": {
      "type": "object",
      "properties": {
        "print": {
          "type": "boolean"
        },
        "modify": {
          "type": "boolean"
        },
        "copy": {
          "type": "boolean"
        },
        "annotate": {
          "type": "boolean"
        },
        "fillForm": {
          "type": "boolean"
        },
        "extract": {
          "type": "boolean"
        },
        "assemble": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "Encryption": {
      "type": "object",
      "properties": {
        "encryptionType": {
          "type": "string",
          "enum": [
            "RC4_40",
            "RC4_128",
            "AES_128",
            "AES_256"
          ]
        },
        "userPassword": {
          "type": "string"
        },
        "ownerPassword": {
          "type": "string"
        },
        "permissions": {
          "$ref": "#/definitions/PdfPermissions"
        },
        "doNotEncryptMetadata": {
          "type": "boolean"
        },
        "encryptEmbeddedFilesOnly": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "FixedPosition": {
      "type": "object",
      "properties": {
        "pageNumber": {
          "type": "integer"
        },
        "left": {
          "type": "number"
        },
        "bottom": {
          "type": "number"
        },
        "width": {
          "type": "number"
        },
        "height": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "SignatureAppearance": {
      "type": "object",
      "properties": {
        "signedBy": {
          "type": "string"
        },
        "signDate": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "image": {
          "$ref": "#/definitions/ImageContent"
        }
      },
      "additionalProperties": false
    },
    "PdfSigFieldLock": {
      "type": "object",
      "properties": {
        "lockPermissions": {
          "type": "string",
          "enum": [
            "NO_CHANGES_ALLOWED",
            "FORM_FILLING",
            "FORM_FILLING_AND_ANNOTATION"
          ]
        },
        "fieldLockAction": {
          "type": "string",
          "enum": [
            "ALL",
            "INCLUDE",
            "EXCLUDE"
          ]
        },
        "lockedFields": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "ESignature": {
      "type": "object",
      "properties": {
        "fieldName": {
          "type": "string"
        },
        "position": {
          "$ref": "#/definitions/FixedPosition"
        },
        "appearance": {
          "$ref": "#/definitions/SignatureAppearance"
        },
        "signatureCreator": {
          "type": "string"
        },
        "signingType": {
          "type": "string",
          "enum": [
            "PAdES",
            "Detached"
          ]
        },
        "certificate": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "contact": {
          "type": "string"
        },
        "timestampServer": {
          "type": "string"
        },
        "visible": {
          "type": "boolean"
        },
        "claimedSignDate": {
          "type": "string"
        },
        "certificationLevel": {
          "type": "string",
          "enum": [
            "UNSPECIFIED",
            "NO_CHANGES_PERMITTED",
            "FORM_FIELDS_MODIFICATION",
            "ANNOTATION_MODIFICATION"
          ]
        },
        "fieldLock": {
          "$ref": "#/definitions/PdfSigFieldLock"
        },
        "style": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "Attachment": {
      "type": "object",
      "properties": {
        "fileName": {
          "type": "string"
        },
        "filePath": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "Bookmark": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "pageNumber": {
          "type": "integer"
        },
        "children": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Bookmark"
          }
        }
      },
      "additionalProperties": false
    },
    "DocumentDefinition": {
      "type": "object",
      "properties": {
        "pageSetup": {
          "$ref": "#/definitions/PageSetup"
        },
        "metadata": {
          "$ref": "#/definitions/Metadata"
        },
        "header": {
          "$ref": "#/definitions/HeaderFooterDefinition"
        },
        "footer": {
          "$ref": "#/definitions/HeaderFooterDefinition"
        },
        "content": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Content"
          }
        },
        "styles": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/StyleDefinition"
          }
        },
        "watermarks": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/WatermarkDefinition"
          }
        },
        "fonts": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/FontFamilyDefinition"
          }
        },
        "images": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/ImageContent"
          }
        },
        "ref": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/UseReference"
          }
        },
        "diagnostics": {
          "$ref": "#/definitions/DiagnosticsDefinition"
        },
        "encryption": {
          "$ref": "#/definitions/Encryption"
        },
        "signature": {
          "$ref": "#/definitions/ESignature"
        },
        "attachment": {
          "$ref": "#/definitions/Attachment"
        },
        "bookmark": {
          "$ref": "#/definitions/Bookmark"
        }
      },
      "additionalProperties": false
    }
  }
}