{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "PrizmDoc JSON Marks Schema (Copyright 2018 Accusoft Corporation)",
    "description": "This schema defines all of the PrizmDoc JSON Marks and their properties.",    
    "type": "object",
    "properties": {
        "marks": {
            "type": "array",
            "items": {
                "oneOf": [
                    { "$ref": "#/definitions/EllipseAnnotation" },
                    { "$ref": "#/definitions/RectangleAnnotation" },
                    { "$ref": "#/definitions/FreehandAnnotation" },
                    { "$ref": "#/definitions/FreehandSignature" },
                    { "$ref": "#/definitions/HighlightAnnotation" },
                    { "$ref": "#/definitions/ImageStampAnnotation" },
                    { "$ref": "#/definitions/ImageStampRedaction" },
                    { "$ref": "#/definitions/LineAnnotation" },
                    { "$ref": "#/definitions/PolylineAnnotation" },
                    { "$ref": "#/definitions/RectangleRedaction" },
                    { "$ref": "#/definitions/StampAnnotation" },
                    { "$ref": "#/definitions/StampRedaction" },
                    { "$ref": "#/definitions/StrikethroughAnnotation" },
                    { "$ref": "#/definitions/TextAnnotation" },
                    { "$ref": "#/definitions/TextInputSignature" },
                    { "$ref": "#/definitions/TextRedaction" },
                    { "$ref": "#/definitions/TextHyperlinkAnnotation" },
                    { "$ref": "#/definitions/TextAreaSignature" },
                    { "$ref": "#/definitions/TextSelectionRedaction" },
                    { "$ref": "#/definitions/TextSignature" },
                    { "$ref": "#/definitions/TransparentRectangleRedaction" }
                ]
            }
        }
    },
    "required": ["marks"],
    "definitions": {

        "commonProperties": {
            "type": "object",
            "properties": {
                "uid": { "$ref": "#/definitions/property/uid" },
                "interactionMode": { "$ref": "#/definitions/property/interactionMode" },
                "pageNumber": { "$ref": "#/definitions/property/pageNumber" },
                "data": { "$ref": "#/definitions/property/data" },
                "creationDateTime": { "$ref": "#/definitions/property/creationDateTime" },
                "modificationDateTime": { "$ref": "#/definitions/property/modificationDateTime" },
                "conversation": { "$ref": "#/definitions/property/conversation" }
            },
            "required": ["uid", "interactionMode", "pageNumber", "creationDateTime", "modificationDateTime"]
        },

        "point": {
            "type": "object",
            "description": "A point on the page.",
            "properties": {
                "x": {
                    "description": "The distance from the left edge of the page.",
                    "default": 0,
                    "type": "number"
                },
                "y": {
                    "description": "The distance from the top edge of the page.",
                    "default": 0,
                    "type": "number"
                }
            },
            "required": ["x", "y"]
        },

        "property": {

            "uid": {
                "description": "A string to uniquely identify the associated mark. This can be any globally-unique string, like a GUID.",
                "type": "string"
            },

            "interactionMode": {
                "description": "A value which indicates the allowed interactions with this mark.",
                "type": "string",
                "default": "Full",
                "enum": [
                    "Full",
                    "SelectionDisabled"
                ]
            },

            "pageNumber": {
                "description": "The page that the mark is located on. This is a 1-based index so the first page of a document will be 1.",
                "type": "integer",
                "minimum": 1
            },

            "data": {
                "description": "A property bag of user-defined values.",
                "type": "object",
                "additionalProperties": {
                    "type": "string"
                }
            },

            "creationDateTime": {
                "description": "An ISO string of the created time.",
                "type": "string",
                "format": "date-time"
            },

            "modificationDateTime": {
                "description": "An ISO string of the last modified time.",
                "type": "string",
                "format": "date-time"
            },

            "conversation": {
                "description": "A collection of comments related to a mark.",
                "type": "object",
                "properties": {
                    "data": { "$ref": "#/definitions/property/data" },
                    "comments": {
                        "description": "This describes the comments that belong to a mark",
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "data": { "$ref": "#/definitions/property/data" },
                                "creationDateTime": { "$ref": "#/definitions/property/creationDateTime" },
                                "text": {
                                    "description": "The text of the comment.",
                                    "type": "string"
                                }
                            },
                            "required": ["data", "creationDateTime", "text"]
                        }
                    }
                },
                "required": ["data"]
            },

            "fontColor": {
                "description": "A 6-character hexadecimal color string, including the # sign.",
                "type": "string",
                "pattern": "^#[A-Fa-f0-9]{6}$"
            },

            "fontName": {
                "description": "The name of the font to use for the mark.",
                "type": "string"
            },

            "fontSize": {
                "description": "The size of the font, in pixels.",
                "type": "number",
                "default": 12,
                "minimum": 0.1,
                "maximum": 288
            },

            "fontStyle": {
                "description": "An array of values any from PCCViewer.Mark.FontStyles",
                "type": "array",
                "items": {
                    "type": "string",
                    "enum": ["Bold", "Italic", "Strikeout", "Underline"]
                }
            },

            "borderColor": {
                "description": "A 6-character hexadecimal color string, including the # sign",
                "type": "string",
                "pattern": "(^#[A-Fa-f0-9]{6}$)|(^transparent$)"
            },

            "borderThickness": {
                "description": "The thickness of the border in pixels",
                "type": "integer",
                "default": 1
            },

            "rectangle": {
                "description": "The position of the mark on the page",
                "type": "object",
                "properties": {
                    "x": {
                        "description": "The left side of the rectangle, relative to the left page edge",
                        "default": 0,
                        "type": "number"
                    },
                    "y": {
                        "description": "The top of the rectangle, relative to the top page edge",
                        "default": 0,
                        "type": "number"
                    },
                    "width": {
                        "description": "The width of the bounding rectangle",
                        "default": 0,
                        "type": "number"
                    },
                    "height": {
                        "description": "The height of the bounding rectangle",
                        "default": 0,
                        "type": "number"
                    }
                },
                "required": ["x", "y", "width", "height"]
            },

            "pageData": {
                "description": "An object providing metadata about the page at the time that the mark was saved.",
                "type": "object",
                "properties": {
                    "width": {
                        "description": "The width of the page, in pixels, at the time the mark was saved.",
                        "type": "number",
                        "minimum": 0
                    },
                    "height": {
                        "description": "The height of the page, in pixels, at the time the mark was saved.",
                        "type": "number",
                        "minimum": 0
                    }
                },
                "required": ["width", "height"]
            },

            "opacity": {
                "description": "The opacity of the mark, from 0 to 255",
                "type": "integer",
                "minimum": 0,
                "maximum": 255
            },

            "color": {
                "description": "A 6-character hexadecimal color string, including the # sign",
                "type": "string",
                "pattern": "^#[A-Fa-f0-9]{6}$"
            },

            "fillColor": {
                "description": "A 6-character hexadecimal color string, including the # sign",
                "type": "string",
                "pattern": "(^#[A-Fa-f0-9]{6}$)|(^transparent$)"
            },

            "thickness": {
                "description": "The thickness of the line in pixels",
                "type": "number",
                "minimum": 1,
                "maximum": 50
            },

            "path": {
                "description": "An SVG-style path, using M, L, and C commands.",
                "type": "string",
                "default": "M0,0"
            },

            "selectedText": {
                "description": "The selected text.",
                "default": "",
                "type": "string"
            },

            "textLength": {
                "description": "The length of the selected text.",
                "default": 0,
                "type": "integer"
            },

            "startIndex": {
                "description": "The character index of the start of the selection.",
                "default": 0,
                "type": "integer"
            },

            "imageDataUrl": {
                "description": "The base64 encoded image data.",
                "type": "string"
            },

            "imageId": {
                "description": "A string to uniquely identify the image. This can be any globally-unique string, like a GUID.",
                "type": "string"
            },

            "reason": {
                "description": "Reason the content was redacted, displayed in the center of the redaction annotation. Required unless using the reasons property.",
                "type": "string"
            },

            "reasons": {
                "description": "Reasons the content was redacted, displayed semicolon space separated in the center of the redaction annotation. Required unless using the reason property.",
                "type": "array",
                "items" : {
                    "type" : "string"
                }
            },

            "label": {
                "description": "The text to display inside the stamp.",
                "default": "Approved",
                "type": "string"
            },

            "text": {
                "description": "The text of the mark.",
                "type": "string"
            },

            "href": {
                "description": "The URL that the link points to.",
                "type": "string"
            },

            "horizontalAlignment": {
                "description": "A value from PCCViewer.Mark.HorizontalAlignment",
                "type": "string",
                "enum": [
                    "Center",
                    "Left",
                    "Right"
                ]
            },

            "maxFontSize": {
                "description": "The maximum size of the font, in pixels.",
                "type": "integer",
                "minimum": 0
            },

            "mask": {
                "oneOf": [
                    { "type": "null" },
                    {
                        "description": "An object defining the input mask for this mark. An input mask defines the format of the requested data and automatically rejects invalid input from the user. For example, the following input mask for a US telephone number allows only parentheses, dashes and numbers: '(###)###-####'",
                        "type": "object",
                        "properties": {
                            "value": {
                                "description": "The string representation of the mask. The user input will _look_ like this string once they have finished their input. Each character in this string that does not have a translation will be represented to the user literally.",
                                "type": "string"
                            },
                            "translations": {
                                "description": "The translations to use for the given mask value. The key represents a character present in the mask value, and the value is a regular expression which validates the acceptable user input for that character.",
                                "type": "object",
                                "patternProperties": {
                                    ".": {
                                        "type": "string"
                                    }
                                }
                            }
                        },
                        "required": ["value", "translations"]
                    }
                ]
            },

            "maxLengthProp": {
                "description": "The maximum number of characters allowed.",
                "type": "integer",
                "minimum": 0
            },

            "lineGroups": {
                "description": "The individual line rectangles that make up the selection.",
                "type": "array",
                "items": {
                    "properties": {
                        "pageData": { "$ref": "#/definitions/property/pageData" },
                        "pageNumber": {
                            "description": "The page number of the line group.",
                            "default": 0,
                            "type": "integer"
                        },
                        "startIndex": {
                            "description": "The character index of the start of this group.",
                            "default": 0,
                            "type": "integer"
                        },
                        "textLength": {
                            "description": "The length of characters in this group.",
                            "default": 0,
                            "type": "integer"
                        },
                        "lines": {
                            "description": "One or more rectangles that appear on the page, as part of the selection.",
                            "type": "array",
                            "items": { "$ref": "#/definitions/property/rectangle" }
                        }
                    },
                    "required": ["pageData", "pageNumber", "startIndex", "textLength", "lines"]
                }
            },

            "startPoint": {
                "type": "object",
                "description": "The start point of the line.",
                "allOf": [
                    { "$ref": "#/definitions/point" }
                ]
            },

            "endPoint": {
                "type": "object",
                "description": "The end point of the line.",
                "allOf": [
                    { "$ref": "#/definitions/point" }
                ]
            },

            "endHeadType": {
                "description": "A value from PCCViewer.Mark.LineHeadType",
                "default": "None",
                "type": "string",
                "enum": [
                    "None",
                    "FilledTriangle"
                ]
            },

            "points": {
                "description": "The array of points making up the line.",
                "type": "array",
                "items": {
                    "type": "object",
                    "description": "A point in the line.",
                    "allOf": [
                        { "$ref": "#/definitions/point" }
                    ]
                }
            }
        },

        "EllipseAnnotation": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["EllipseAnnotation"]
                        },
                        "rectangle": { "$ref": "#/definitions/property/rectangle" },
                        "pageData": { "$ref": "#/definitions/property/pageData" },
                        "borderColor": { "$ref": "#/definitions/property/borderColor" },
                        "borderThickness": { "$ref": "#/definitions/property/borderThickness" },
                        "fillColor": { "$ref": "#/definitions/property/fillColor" },
                        "opacity": { "$ref": "#/definitions/property/opacity" }
                    },
                    "required": ["type", "rectangle", "pageData", "borderColor", "borderThickness", "fillColor", "opacity"]
                }
            ]
        },

        "RectangleAnnotation": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["RectangleAnnotation"]
                        },
                        "rectangle": { "$ref": "#/definitions/property/rectangle" },
                        "pageData": { "$ref": "#/definitions/property/pageData" },
                        "borderColor": { "$ref": "#/definitions/property/borderColor" },
                        "borderThickness": { "$ref": "#/definitions/property/borderThickness" },
                        "fillColor": { "$ref": "#/definitions/property/fillColor" },
                        "opacity": { "$ref": "#/definitions/property/opacity" }
                    },
                    "required": ["type", "rectangle", "pageData", "borderColor", "borderThickness", "fillColor", "opacity"]
                }
            ]
        },

        "FreehandAnnotation": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["FreehandAnnotation"]
                        },
                        "rectangle": { "$ref": "#/definitions/property/rectangle" },
                        "pageData": { "$ref": "#/definitions/property/pageData" },
                        "color": { "$ref": "#/definitions/property/color" },
                        "opacity": { "$ref": "#/definitions/property/opacity" },
                        "path": { "$ref": "#/definitions/property/path" },
                        "thickness": { "$ref": "#/definitions/property/thickness" }
                    },
                    "required": ["type", "rectangle", "pageData", "color", "opacity", "path", "thickness"]
                }
            ]
        },

        "FreehandSignature": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["FreehandSignature"]
                        },
                        "rectangle": { "$ref": "#/definitions/property/rectangle" },
                        "pageData": { "$ref": "#/definitions/property/pageData" },
                        "color": { "$ref": "#/definitions/property/color" },
                        "horizontalAlignment": { "$ref": "#/definitions/property/horizontalAlignment" },
                        "path": { "$ref": "#/definitions/property/path" },
                        "thickness": { "$ref": "#/definitions/property/thickness" }
                    },
                    "required": ["type", "rectangle", "pageData", "color", "horizontalAlignment", "path", "thickness"]
                }
            ]
        },

        "HighlightAnnotation": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["HighlightAnnotation"]
                        },
                        "fillColor": {
                            "allOf": [
                                { "$ref": "#/definitions/property/fillColor" },
                                { "not":
                                    { "const": "transparent" }
                                }
                            ]
                        },
                        "startIndex": { "$ref": "#/definitions/property/startIndex" },
                        "selectedText": { "$ref": "#/definitions/property/selectedText" },
                        "textLength": { "$ref": "#/definitions/property/textLength" },
                        "lineGroups": { "$ref": "#/definitions/property/lineGroups" }
                    },
                    "required": ["type", "fillColor", "startIndex", "selectedText", "textLength", "lineGroups"]
                }
            ]
        },

        "ImageStampAnnotation": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["ImageStampAnnotation"]
                        },
                        "rectangle": { "$ref": "#/definitions/property/rectangle" },
                        "pageData": { "$ref": "#/definitions/property/pageData" },
                        "imageDataUrl": { "$ref": "#/definitions/property/imageDataUrl" },
                        "imageId": { "$ref": "#/definitions/property/imageId" }
                    },
                    "required": ["type", "rectangle", "pageData", "imageDataUrl", "imageId"]
                }
            ]
        },

        "ImageStampRedaction": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["ImageStampRedaction"]
                        },
                        "rectangle": { "$ref": "#/definitions/property/rectangle" },
                        "pageData": { "$ref": "#/definitions/property/pageData" },
                        "imageDataUrl": { "$ref": "#/definitions/property/imageDataUrl" },
                        "imageId": { "$ref": "#/definitions/property/imageId" }
                    },
                    "required": ["type", "rectangle", "pageData", "imageDataUrl", "imageId"]
                }
            ]
        },

        "LineAnnotation": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["LineAnnotation"]
                        },
                        "pageData": { "$ref": "#/definitions/property/pageData" },
                        "endPoint": { "$ref": "#/definitions/property/endPoint" },
                        "startPoint": { "$ref": "#/definitions/property/startPoint" },
                        "color": { "$ref": "#/definitions/property/color" },
                        "endHeadType": { "$ref": "#/definitions/property/endHeadType" },
                        "opacity": { "$ref": "#/definitions/property/opacity" },
                        "thickness": { "$ref": "#/definitions/property/thickness" }
                    },
                    "required": ["type", "pageData", "endPoint", "startPoint", "color", "endHeadType", "opacity", "thickness"]
                }
            ]
        },

        "PolylineAnnotation": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["PolylineAnnotation"]
                        },
                        "pageData": { "$ref": "#/definitions/property/pageData" },
                        "points": { "$ref": "#/definitions/property/points" },
                        "color": { "$ref": "#/definitions/property/color" },
                        "opacity": { "$ref": "#/definitions/property/opacity" },
                        "thickness": { "$ref": "#/definitions/property/thickness" }
                    },
                    "required": ["type", "pageData", "points", "color", "opacity", "thickness"]
                }
            ]
        },

        "RectangleRedaction": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["RectangleRedaction"]
                        },
                        "rectangle": { "$ref": "#/definitions/property/rectangle" },
                        "pageData": { "$ref": "#/definitions/property/pageData" },
                        "borderColor": {
                            "allOf": [
                                { "$ref": "#/definitions/property/borderColor" },
                                { "not":
                                    { "const": "transparent" }
                                }
                            ]
                        },
                        "borderThickness": { "$ref": "#/definitions/property/borderThickness" },
                        "fillColor": {
                            "allOf": [
                                { "$ref": "#/definitions/property/fillColor" },
                                { "not":
                                    { "const": "transparent" }
                                }
                            ]
                        },
                        "fontColor": { "$ref": "#/definitions/property/fontColor" },
                        "reason": { "$ref": "#/definitions/property/reason" },
                        "reasons": { "$ref": "#/definitions/property/reasons" }
                    },
                    "oneOf": [
                        {"required": ["type", "rectangle", "pageData", "borderColor", "borderThickness", "fillColor", "fontColor", "reason"]},
                        {"required": ["type", "rectangle", "pageData", "borderColor", "borderThickness", "fillColor", "fontColor", "reasons"]}
                    ]
                }
            ]
        },

        "StampAnnotation": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["StampAnnotation"]
                        },
                        "rectangle": { "$ref": "#/definitions/property/rectangle" },
                        "pageData": { "$ref": "#/definitions/property/pageData" },
                        "color": { "$ref": "#/definitions/property/color" },
                        "label": { "$ref": "#/definitions/property/label" }
                    },
                    "required": ["type", "rectangle", "pageData", "color", "label"]
                }
            ]
        },

        "StampRedaction": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["StampRedaction"]
                        },
                        "rectangle": { "$ref": "#/definitions/property/rectangle" },
                        "pageData": { "$ref": "#/definitions/property/pageData" },
                        "label": { "$ref": "#/definitions/property/label" }
                    },
                    "required": ["type", "rectangle", "pageData", "label"]
                }
            ]
        },

        "StrikethroughAnnotation": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["StrikethroughAnnotation"]
                        },
                        "color": { "$ref": "#/definitions/property/color" },
                        "thickness": { "$ref": "#/definitions/property/thickness" },
                        "textLength": { "$ref": "#/definitions/property/textLength" },
                        "startIndex": { "$ref": "#/definitions/property/startIndex" },
                        "selectedText": { "$ref": "#/definitions/property/selectedText" },
                        "lineGroups": { "$ref": "#/definitions/property/lineGroups" }
                    },
                    "required": ["type", "color", "thickness", "textLength", "startIndex", "selectedText", "lineGroups"]
                }
            ]
        },

        "TextAnnotation": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["TextAnnotation"]
                        },
                        "rectangle": { "$ref": "#/definitions/property/rectangle" },
                        "pageData": { "$ref": "#/definitions/property/pageData" },
                        "borderColor": { "$ref": "#/definitions/property/borderColor" },
                        "borderThickness": { "$ref": "#/definitions/property/borderThickness" },
                        "fillColor": { "$ref": "#/definitions/property/fillColor" },
                        "fontColor": { "$ref": "#/definitions/property/fontColor" },
                        "fontName": { "$ref": "#/definitions/property/fontName" },
                        "fontSize": { "$ref": "#/definitions/property/fontSize" },
                        "fontStyle": { "$ref": "#/definitions/property/fontStyle" },
                        "maxLength": { "$ref": "#/definitions/property/maxLengthProp" },
                        "horizontalAlignment": { "$ref": "#/definitions/property/horizontalAlignment" },
                        "text": { "$ref": "#/definitions/property/text" },
                        "opacity": { "$ref": "#/definitions/property/opacity" }
                    },
                    "required": ["type", "rectangle", "pageData", "borderColor", "borderThickness", "fillColor", "fontColor", "fontName", "fontSize", "fontStyle", "maxLength", "horizontalAlignment", "text", "opacity"]
                }
            ]
        },

        "TextAreaSignature": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["TextAreaSignature"]
                        },
                        "rectangle": { "$ref": "#/definitions/property/rectangle" },
                        "pageData": { "$ref": "#/definitions/property/pageData" },
                        "fontColor": { "$ref": "#/definitions/property/fontColor" },
                        "fontName": { "$ref": "#/definitions/property/fontName" },
                        "fontStyle": { "$ref": "#/definitions/property/fontStyle" },
                        "horizontalAlignment": { "$ref": "#/definitions/property/horizontalAlignment" },
                        "maxFontSize": { "$ref": "#/definitions/property/maxFontSize" },
                        "maxLength": { "$ref": "#/definitions/property/maxLengthProp" },
                        "text": { "$ref": "#/definitions/property/text" }
                    },
                    "required": ["type", "rectangle", "pageData", "fontColor", "fontName", "fontStyle", "horizontalAlignment", "maxFontSize", "maxLength", "text"]
                }
            ]
        },

        "TextHyperlinkAnnotation": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["TextHyperlinkAnnotation"]
                        },
                        "fillColor": {
                            "allOf": [
                                { "$ref": "#/definitions/property/fillColor" },
                                { "not":
                                    { "const": "transparent" }
                                }
                            ]
                        },
                        "textLength": { "$ref": "#/definitions/property/textLength" },
                        "startIndex": { "$ref": "#/definitions/property/startIndex" },
                        "selectedText": { "$ref": "#/definitions/property/selectedText" },
                        "lineGroups": { "$ref": "#/definitions/property/lineGroups" },
                        "href": { "$ref": "#/definitions/property/href" }
                    },
                    "required": ["type", "fillColor", "textLength", "startIndex", "selectedText", "lineGroups", "href"]
                }
            ]
        },

        "TextInputSignature": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["TextInputSignature"]
                        },
                        "rectangle": { "$ref": "#/definitions/property/rectangle" },
                        "pageData": { "$ref": "#/definitions/property/pageData" },
                        "mask": { "$ref": "#/definitions/property/mask" },
                        "fontColor": { "$ref": "#/definitions/property/fontColor" },
                        "fontName": { "$ref": "#/definitions/property/fontName" },
                        "maxLength": { "$ref": "#/definitions/property/maxLengthProp" },
                        "text": { "$ref": "#/definitions/property/text" },
                        "horizontalAlignment": { "$ref": "#/definitions/property/horizontalAlignment" }
                    },
                    "required": ["type", "rectangle", "pageData", "mask", "fontColor", "fontName", "maxLength", "text", "horizontalAlignment"]
                }
            ]
        },

        "TextRedaction": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["TextRedaction"]
                        },
                        "rectangle": { "$ref": "#/definitions/property/rectangle" },
                        "pageData": { "$ref": "#/definitions/property/pageData" },
                        "fontColor": { "$ref": "#/definitions/property/fontColor" },
                        "fontName": { "$ref": "#/definitions/property/fontName" },
                        "fontSize": { "$ref": "#/definitions/property/fontSize" },
                        "maxLength": { "$ref": "#/definitions/property/maxLengthProp" },
                        "horizontalAlignment": { "$ref": "#/definitions/property/horizontalAlignment" },
                        "text": { "$ref": "#/definitions/property/text" }
                    },
                    "required": ["type", "rectangle", "pageData", "fontColor", "fontName", "fontSize", "maxLength", "horizontalAlignment", "text"]
                }
            ]
        },

        "TextSelectionRedaction": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["TextSelectionRedaction"]
                        },
                        "lineGroups": { "$ref": "#/definitions/property/lineGroups" },
                        "reason": { "$ref": "#/definitions/property/reason" },
                        "reasons": { "$ref": "#/definitions/property/reasons" },
                        "selectedText": { "$ref": "#/definitions/property/selectedText" },
                        "startIndex": { "$ref": "#/definitions/property/startIndex" },
                        "textLength": { "$ref": "#/definitions/property/textLength" },
                        "fillColor": {
                            "allOf": [
                                { "$ref": "#/definitions/property/fillColor" },
                                { "not":
                                    { "const": "transparent" }
                                }
                            ]
                        },
                        "fontColor": { "$ref": "#/definitions/property/fontColor" }
                    },
                    "oneOf": [
                        {"required": ["type", "lineGroups", "selectedText", "startIndex", "textLength", "reason"]},
                        {"required": ["type", "lineGroups", "selectedText", "startIndex", "textLength", "reasons"]}
                    ]
                }
            ]
        },

        "TextSignature": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["TextSignature"]
                        },
                        "rectangle": { "$ref": "#/definitions/property/rectangle" },
                        "pageData": { "$ref": "#/definitions/property/pageData" },
                        "color": { "$ref": "#/definitions/property/color" },
                        "fontName": { "$ref": "#/definitions/property/fontName" },
                        "horizontalAlignment": { "$ref": "#/definitions/property/horizontalAlignment" },
                        "text": { "$ref": "#/definitions/property/text" }
                    },
                    "required": ["type", "rectangle", "pageData", "color", "fontName", "horizontalAlignment", "text"]
                }
            ]
        },

        "TransparentRectangleRedaction": {
            "allOf": [
                { "$ref": "#/definitions/commonProperties" },
                {
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": ["TransparentRectangleRedaction"]
                        },
                        "rectangle": { "$ref": "#/definitions/property/rectangle" },
                        "pageData": { "$ref": "#/definitions/property/pageData" }
                    },
                    "required": ["type", "rectangle", "pageData"]
                }
            ]
        }
    }
}