{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "urn:altium-monkey:schema:sch-paint-ir:a0",
    "type": "object",
    "properties": {
        "schema": {
            "type": "string",
            "const": "urn:altium-monkey:schema:sch-paint-ir:a0"
        },
        "source_kind": {
            "$ref": "#/$defs/SourceKind"
        },
        "profile": {
            "$ref": "#/$defs/PaintProfile"
        },
        "realization": {
            "type": "string",
            "const": "canonical_storage_snapshot"
        },
        "coordinate_space": {
            "$ref": "#/$defs/CoordinateSpace"
        },
        "viewport_mil": {
            "$ref": "#/$defs/NullableRectMil"
        },
        "geometry_bounds_mil": {
            "$ref": "#/$defs/NullableRectMil"
        },
        "commands": {
            "type": "array",
            "items": {
                "$ref": "#/$defs/Command"
            }
        },
        "resources": {
            "type": "array",
            "items": {
                "$ref": "#/$defs/Resource"
            }
        },
        "extensions": {
            "$ref": "#/$defs/Extensions"
        }
    },
    "required": [
        "schema",
        "source_kind",
        "profile",
        "realization",
        "coordinate_space",
        "viewport_mil",
        "geometry_bounds_mil",
        "commands",
        "resources",
        "extensions"
    ],
    "unevaluatedProperties": {
        "not": {}
    },
    "description": "Standalone source-faithful schematic Paint IR a0 transport.",
    "title": "Altium Monkey schematic Paint IR a0",
    "$defs": {
        "SourceKind": {
            "anyOf": [
                {
                    "type": "string",
                    "const": "schdoc"
                },
                {
                    "type": "string",
                    "const": "schlib_symbol"
                },
                {
                    "type": "string",
                    "const": "schlib_part"
                },
                {
                    "type": "string",
                    "const": "physical_page"
                },
                {
                    "type": "string",
                    "const": "object"
                },
                {
                    "type": "string",
                    "const": "synthetic"
                }
            ]
        },
        "PaintProfile": {
            "anyOf": [
                {
                    "type": "string",
                    "const": "onscreen"
                },
                {
                    "type": "string",
                    "const": "physical_onscreen"
                },
                {
                    "type": "string",
                    "const": "synthetic_onscreen"
                }
            ]
        },
        "CoordinateSpace": {
            "type": "object",
            "properties": {
                "unit": {
                    "type": "string",
                    "const": "mil"
                },
                "x_axis": {
                    "type": "string",
                    "const": "right"
                },
                "y_axis": {
                    "type": "string",
                    "const": "up"
                },
                "origin": {
                    "type": "string",
                    "const": "altium_source"
                },
                "rectangle_order": {
                    "type": "string",
                    "const": "left_bottom_right_top"
                },
                "pixel_rectangle_order": {
                    "type": "string",
                    "const": "left_top_right_bottom"
                },
                "affine_convention": {
                    "type": "string",
                    "const": "row_vector_3x2"
                },
                "angle_unit": {
                    "type": "string",
                    "const": "degree"
                },
                "positive_rotation": {
                    "type": "string",
                    "const": "counterclockwise"
                }
            },
            "required": [
                "unit",
                "x_axis",
                "y_axis",
                "origin",
                "rectangle_order",
                "pixel_rectangle_order",
                "affine_convention",
                "angle_unit",
                "positive_rotation"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "NullableRectMil": {
            "anyOf": [
                {
                    "$ref": "#/$defs/RectMil"
                },
                {
                    "type": "null"
                }
            ]
        },
        "Command": {
            "anyOf": [
                {
                    "$ref": "#/$defs/BeginGroup"
                },
                {
                    "$ref": "#/$defs/EndGroup"
                },
                {
                    "$ref": "#/$defs/PushTransform"
                },
                {
                    "$ref": "#/$defs/PopTransform"
                },
                {
                    "$ref": "#/$defs/PushClip"
                },
                {
                    "$ref": "#/$defs/PopClip"
                },
                {
                    "$ref": "#/$defs/DrawLines"
                },
                {
                    "$ref": "#/$defs/DrawArc"
                },
                {
                    "$ref": "#/$defs/DrawEllipse"
                },
                {
                    "$ref": "#/$defs/DrawPolygons"
                },
                {
                    "$ref": "#/$defs/DrawRoundedRectangle"
                },
                {
                    "$ref": "#/$defs/DrawText"
                },
                {
                    "$ref": "#/$defs/DrawImage"
                }
            ]
        },
        "Resource": {
            "type": "object",
            "properties": {
                "id": {
                    "$ref": "#/$defs/ResourceId"
                },
                "kind": {
                    "type": "string",
                    "const": "png"
                },
                "uses": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/ResourceUse"
                    },
                    "minItems": 1
                },
                "media_type": {
                    "type": "string",
                    "const": "image/png"
                },
                "width_px": {
                    "$ref": "#/$defs/ImageDimension"
                },
                "height_px": {
                    "$ref": "#/$defs/ImageDimension"
                },
                "encoded_sha256": {
                    "$ref": "#/$defs/Sha256"
                },
                "encoded_bytes": {
                    "$ref": "#/$defs/Nat"
                },
                "decoded_rgba_bytes": {
                    "$ref": "#/$defs/Nat"
                },
                "data_base64": {
                    "type": "string"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "id",
                "kind",
                "uses",
                "media_type",
                "width_px",
                "height_px",
                "encoded_sha256",
                "encoded_bytes",
                "decoded_rgba_bytes",
                "data_base64",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "Extensions": {
            "type": "object",
            "properties": {},
            "unevaluatedProperties": {},
            "description": "Bounded arbitrary JSON extension values; handwritten validation owns recursion."
        },
        "RectMil": {
            "type": "array",
            "items": {
                "$ref": "#/$defs/Finite"
            },
            "minItems": 4,
            "maxItems": 4,
            "description": "Left, bottom, right, top rectangle in source mils."
        },
        "BeginGroup": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "begin_group"
                },
                "occurrence_id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "role": {
                    "$ref": "#/$defs/GroupRole"
                },
                "paint_pass": {
                    "$ref": "#/$defs/PaintPass"
                },
                "bounds_mil": {
                    "$ref": "#/$defs/NullableRectMil"
                },
                "source": {
                    "$ref": "#/$defs/NullableSourceLink"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "kind",
                "occurrence_id",
                "name",
                "role",
                "paint_pass",
                "bounds_mil",
                "source",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "EndGroup": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "end_group"
                },
                "occurrence_id": {
                    "type": "string"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "kind",
                "occurrence_id",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "PushTransform": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "push_transform"
                },
                "transform": {
                    "$ref": "#/$defs/AffineMil"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "kind",
                "transform",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "PopTransform": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "pop_transform"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "kind",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "PushClip": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "push_clip"
                },
                "rect_mil": {
                    "$ref": "#/$defs/RectMil"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "kind",
                "rect_mil",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "PopClip": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "pop_clip"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "kind",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "DrawLines": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "draw_lines"
                },
                "points_mil": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/PointMil"
                    },
                    "minItems": 2
                },
                "stroke": {
                    "$ref": "#/$defs/Stroke"
                },
                "source": {
                    "$ref": "#/$defs/NullableSourceLink"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "kind",
                "points_mil",
                "stroke",
                "source",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "DrawArc": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "draw_arc"
                },
                "center_mil": {
                    "$ref": "#/$defs/PointMil"
                },
                "width_mil": {
                    "$ref": "#/$defs/Finite"
                },
                "height_mil": {
                    "$ref": "#/$defs/Finite"
                },
                "start_degree": {
                    "$ref": "#/$defs/Finite"
                },
                "sweep_degree": {
                    "$ref": "#/$defs/Finite"
                },
                "stroke": {
                    "$ref": "#/$defs/Stroke"
                },
                "source": {
                    "$ref": "#/$defs/NullableSourceLink"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "kind",
                "center_mil",
                "width_mil",
                "height_mil",
                "start_degree",
                "sweep_degree",
                "stroke",
                "source",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "DrawEllipse": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "draw_ellipse"
                },
                "center_mil": {
                    "$ref": "#/$defs/PointMil"
                },
                "width_mil": {
                    "$ref": "#/$defs/Finite"
                },
                "height_mil": {
                    "$ref": "#/$defs/Finite"
                },
                "paint": {
                    "$ref": "#/$defs/ShapePaint"
                },
                "source": {
                    "$ref": "#/$defs/NullableSourceLink"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "kind",
                "center_mil",
                "width_mil",
                "height_mil",
                "paint",
                "source",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "DrawPolygons": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "draw_polygons"
                },
                "figures_mil": {
                    "type": "array",
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/$defs/PointMil"
                        }
                    }
                },
                "paint": {
                    "$ref": "#/$defs/PolygonPaint"
                },
                "source": {
                    "$ref": "#/$defs/NullableSourceLink"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "kind",
                "figures_mil",
                "paint",
                "source",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "DrawRoundedRectangle": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "draw_rounded_rectangle"
                },
                "rect_mil": {
                    "$ref": "#/$defs/RectMil"
                },
                "radius_x_mil": {
                    "$ref": "#/$defs/Finite"
                },
                "radius_y_mil": {
                    "$ref": "#/$defs/Finite"
                },
                "paint": {
                    "$ref": "#/$defs/ShapePaint"
                },
                "source": {
                    "$ref": "#/$defs/NullableSourceLink"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "kind",
                "rect_mil",
                "radius_x_mil",
                "radius_y_mil",
                "paint",
                "source",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "DrawText": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "draw_text"
                },
                "anchor_mil": {
                    "$ref": "#/$defs/PointMil"
                },
                "text": {
                    "type": "string"
                },
                "font": {
                    "$ref": "#/$defs/Font"
                },
                "brush": {
                    "$ref": "#/$defs/Brush"
                },
                "source": {
                    "$ref": "#/$defs/NullableSourceLink"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "kind",
                "anchor_mil",
                "text",
                "font",
                "brush",
                "source",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "DrawImage": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "draw_image"
                },
                "destination_mil": {
                    "$ref": "#/$defs/RectMil"
                },
                "source_pixel": {
                    "$ref": "#/$defs/PixelRect"
                },
                "opacity": {
                    "$ref": "#/$defs/Finite"
                },
                "resource_id": {
                    "$ref": "#/$defs/ResourceId"
                },
                "source": {
                    "$ref": "#/$defs/NullableSourceLink"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "kind",
                "destination_mil",
                "source_pixel",
                "opacity",
                "resource_id",
                "source",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "ResourceId": {
            "type": "string",
            "pattern": "^sha256:[0-9a-f]{64}$",
            "description": "Semantic decoded-pixel resource identity."
        },
        "ResourceUse": {
            "anyOf": [
                {
                    "type": "string",
                    "const": "image"
                },
                {
                    "type": "string",
                    "const": "pattern_source"
                },
                {
                    "type": "string",
                    "const": "pattern_export"
                }
            ]
        },
        "ImageDimension": {
            "type": "integer",
            "minimum": 1,
            "maximum": 16384,
            "description": "Positive Paint IR raster dimension capped by the A0 resource profile."
        },
        "Sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "description": "Lowercase SHA-256 digest without a prefix."
        },
        "Nat": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "JSON-safe nonnegative integer."
        },
        "Finite": {
            "type": "number",
            "description": "Finite JSON binary64 value; handwritten framing rejects nonfinite syntax."
        },
        "GroupRole": {
            "anyOf": [
                {
                    "type": "string",
                    "const": "root"
                },
                {
                    "type": "string",
                    "const": "document"
                },
                {
                    "type": "string",
                    "const": "background"
                },
                {
                    "type": "string",
                    "const": "document_items"
                },
                {
                    "type": "string",
                    "const": "source"
                },
                {
                    "type": "string",
                    "const": "derived_source"
                },
                {
                    "type": "string",
                    "const": "transparent_back"
                },
                {
                    "type": "string",
                    "const": "synthetic"
                },
                {
                    "type": "string",
                    "const": "editor_artwork",
                    "description": "Editor decoration drawn from host-owned bitmaps, such as sheet\nwatermarks and the device-sheet symbol icon. Renderers substitute their\nown artwork; comparisons check placement, crop, and opacity, not pixels."
                }
            ]
        },
        "PaintPass": {
            "anyOf": [
                {
                    "type": "string",
                    "const": "ordinary"
                },
                {
                    "type": "string",
                    "const": "background"
                },
                {
                    "type": "string",
                    "const": "transparent_back"
                }
            ]
        },
        "NullableSourceLink": {
            "anyOf": [
                {
                    "$ref": "#/$defs/SourceLink"
                },
                {
                    "type": "null"
                }
            ]
        },
        "AffineMil": {
            "type": "array",
            "items": {
                "$ref": "#/$defs/Finite"
            },
            "minItems": 6,
            "maxItems": 6,
            "description": "Row-vector 3x2 affine values m11, m12, m21, m22, dx, dy."
        },
        "PointMil": {
            "type": "array",
            "items": {
                "$ref": "#/$defs/Finite"
            },
            "minItems": 2,
            "maxItems": 2,
            "description": "Two-value point in source mils."
        },
        "Stroke": {
            "type": "object",
            "properties": {
                "color": {
                    "$ref": "#/$defs/Color"
                },
                "transformed_width_mil": {
                    "$ref": "#/$defs/Finite"
                },
                "realized_width_mil": {
                    "$ref": "#/$defs/Finite"
                },
                "device_pixels_per_mil": {
                    "$ref": "#/$defs/Finite"
                },
                "minimum_device_width_px": {
                    "$ref": "#/$defs/NullableFinite"
                },
                "thickened": {
                    "type": "boolean"
                },
                "antialias": {
                    "type": "boolean"
                },
                "line_join": {
                    "$ref": "#/$defs/LineJoin"
                },
                "miter_limit": {
                    "$ref": "#/$defs/Finite"
                },
                "start_cap": {
                    "$ref": "#/$defs/LineCap"
                },
                "end_cap": {
                    "$ref": "#/$defs/LineCap"
                },
                "dash_cap": {
                    "$ref": "#/$defs/LineCap"
                },
                "dash_style": {
                    "$ref": "#/$defs/DashStyle"
                },
                "dash_values": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/Finite"
                    }
                },
                "dash_offset": {
                    "$ref": "#/$defs/Finite"
                },
                "dash_units": {
                    "type": "string",
                    "const": "stroke_width_multiple"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "color",
                "transformed_width_mil",
                "realized_width_mil",
                "device_pixels_per_mil",
                "minimum_device_width_px",
                "thickened",
                "antialias",
                "line_join",
                "miter_limit",
                "start_cap",
                "end_cap",
                "dash_cap",
                "dash_style",
                "dash_values",
                "dash_offset",
                "dash_units",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "ShapePaint": {
            "anyOf": [
                {
                    "$ref": "#/$defs/StrokePaint"
                },
                {
                    "$ref": "#/$defs/FillPaint"
                }
            ]
        },
        "PolygonPaint": {
            "anyOf": [
                {
                    "$ref": "#/$defs/StrokePaint"
                },
                {
                    "$ref": "#/$defs/PolygonFillPaint"
                }
            ]
        },
        "Font": {
            "type": "object",
            "properties": {
                "family": {
                    "type": "string"
                },
                "localized_family": {
                    "$ref": "#/$defs/NullableString"
                },
                "size_mil": {
                    "$ref": "#/$defs/Finite"
                },
                "rotation_degree": {
                    "$ref": "#/$defs/Finite"
                },
                "line_space_ratio": {
                    "$ref": "#/$defs/Finite"
                },
                "bold": {
                    "type": "boolean"
                },
                "italic": {
                    "type": "boolean"
                },
                "underline": {
                    "type": "boolean"
                },
                "strikeout": {
                    "type": "boolean"
                },
                "fixed_device_size_px": {
                    "$ref": "#/$defs/NullableFinite"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "family",
                "localized_family",
                "size_mil",
                "rotation_degree",
                "line_space_ratio",
                "bold",
                "italic",
                "underline",
                "strikeout",
                "fixed_device_size_px",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "Brush": {
            "anyOf": [
                {
                    "$ref": "#/$defs/SolidBrush"
                },
                {
                    "$ref": "#/$defs/LinearGradientBrush"
                },
                {
                    "$ref": "#/$defs/PatternBrush"
                }
            ]
        },
        "PixelRect": {
            "type": "array",
            "items": {
                "$ref": "#/$defs/Finite"
            },
            "minItems": 4,
            "maxItems": 4,
            "description": "Left, top, right, bottom source-pixel rectangle; host crops of tiled\nartwork may use fractional pixels."
        },
        "SourceLink": {
            "type": "object",
            "properties": {
                "source_key": {
                    "$ref": "#/$defs/SourceKey"
                },
                "locator": {
                    "$ref": "#/$defs/SourceLocator"
                },
                "record_kind": {
                    "$ref": "#/$defs/RecordKind"
                },
                "unique_id": {
                    "$ref": "#/$defs/NullableString"
                },
                "part_id": {
                    "$ref": "#/$defs/NullableNat"
                },
                "display_mode": {
                    "$ref": "#/$defs/NullableNat"
                },
                "role": {
                    "$ref": "#/$defs/SourceRole"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "source_key",
                "locator",
                "record_kind",
                "unique_id",
                "part_id",
                "display_mode",
                "role",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "Color": {
            "type": "string",
            "pattern": "^#[0-9a-f]{8}$",
            "description": "Lowercase sRGB RGBA color."
        },
        "NullableFinite": {
            "anyOf": [
                {
                    "$ref": "#/$defs/Finite"
                },
                {
                    "type": "null"
                }
            ]
        },
        "LineJoin": {
            "anyOf": [
                {
                    "type": "string",
                    "const": "miter"
                },
                {
                    "type": "string",
                    "const": "bevel"
                },
                {
                    "type": "string",
                    "const": "round"
                },
                {
                    "type": "string",
                    "const": "miter_or_bevel"
                }
            ]
        },
        "LineCap": {
            "anyOf": [
                {
                    "type": "string",
                    "const": "flat"
                },
                {
                    "type": "string",
                    "const": "square"
                },
                {
                    "type": "string",
                    "const": "round"
                },
                {
                    "type": "string",
                    "const": "triangle"
                }
            ]
        },
        "DashStyle": {
            "anyOf": [
                {
                    "type": "string",
                    "const": "solid"
                },
                {
                    "type": "string",
                    "const": "dash"
                },
                {
                    "type": "string",
                    "const": "dot"
                },
                {
                    "type": "string",
                    "const": "dash_dot"
                },
                {
                    "type": "string",
                    "const": "dash_dot_dot"
                },
                {
                    "type": "string",
                    "const": "custom"
                }
            ]
        },
        "StrokePaint": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "stroke"
                },
                "stroke": {
                    "$ref": "#/$defs/Stroke"
                }
            },
            "required": [
                "kind",
                "stroke"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "FillPaint": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "fill"
                },
                "brush": {
                    "$ref": "#/$defs/Brush"
                }
            },
            "required": [
                "kind",
                "brush"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "PolygonFillPaint": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "fill"
                },
                "brush": {
                    "$ref": "#/$defs/Brush"
                },
                "fill_rule": {
                    "$ref": "#/$defs/FillRule"
                }
            },
            "required": [
                "kind",
                "brush",
                "fill_rule"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "NullableString": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ]
        },
        "SolidBrush": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "solid"
                },
                "color": {
                    "$ref": "#/$defs/Color"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "kind",
                "color",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "LinearGradientBrush": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "linear_gradient"
                },
                "start_mil": {
                    "$ref": "#/$defs/PointMil"
                },
                "end_mil": {
                    "$ref": "#/$defs/PointMil"
                },
                "start_color": {
                    "$ref": "#/$defs/Color"
                },
                "end_color": {
                    "$ref": "#/$defs/Color"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "kind",
                "start_mil",
                "end_mil",
                "start_color",
                "end_color",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "PatternBrush": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "pattern"
                },
                "export_resource_id": {
                    "$ref": "#/$defs/ResourceId"
                },
                "source_resource_id": {
                    "$ref": "#/$defs/ResourceId"
                },
                "export_from_mil": {
                    "$ref": "#/$defs/PointMil"
                },
                "export_direction_mil": {
                    "$ref": "#/$defs/PointMil"
                },
                "export_size_mil": {
                    "$ref": "#/$defs/PointMil"
                },
                "source_from_mil": {
                    "$ref": "#/$defs/PointMil"
                },
                "source_to_mil": {
                    "$ref": "#/$defs/PointMil"
                },
                "source_size_mil": {
                    "$ref": "#/$defs/PointMil"
                },
                "source_slope_degree": {
                    "$ref": "#/$defs/Finite"
                },
                "opacity": {
                    "$ref": "#/$defs/Finite"
                },
                "extensions": {
                    "$ref": "#/$defs/Extensions"
                }
            },
            "required": [
                "kind",
                "export_resource_id",
                "source_resource_id",
                "export_from_mil",
                "export_direction_mil",
                "export_size_mil",
                "source_from_mil",
                "source_to_mil",
                "source_size_mil",
                "source_slope_degree",
                "opacity",
                "extensions"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "SourceKey": {
            "type": "string",
            "pattern": "^source:sha256:[0-9a-f]{64}$",
            "description": "Document-scoped source identity digest."
        },
        "SourceLocator": {
            "anyOf": [
                {
                    "$ref": "#/$defs/PersistedUidLocator"
                },
                {
                    "$ref": "#/$defs/SourceOrdinalLocator"
                },
                {
                    "$ref": "#/$defs/TemplateOrdinalLocator"
                },
                {
                    "$ref": "#/$defs/SyntheticLocator"
                },
                {
                    "$ref": "#/$defs/PlacementLocator"
                },
                {
                    "$ref": "#/$defs/ExtractionLocator"
                }
            ]
        },
        "RecordKind": {
            "anyOf": [
                {
                    "type": "string",
                    "const": "line"
                },
                {
                    "type": "string",
                    "const": "rectangle"
                },
                {
                    "type": "string",
                    "const": "round_rectangle"
                },
                {
                    "type": "string",
                    "const": "ellipse"
                },
                {
                    "type": "string",
                    "const": "arc"
                },
                {
                    "type": "string",
                    "const": "elliptical_arc"
                },
                {
                    "type": "string",
                    "const": "polygon"
                },
                {
                    "type": "string",
                    "const": "polyline"
                },
                {
                    "type": "string",
                    "const": "bezier"
                },
                {
                    "type": "string",
                    "const": "pie_chart"
                },
                {
                    "type": "string",
                    "const": "component"
                },
                {
                    "type": "string",
                    "const": "pin"
                },
                {
                    "type": "string",
                    "const": "ieee_symbol"
                },
                {
                    "type": "string",
                    "const": "label"
                },
                {
                    "type": "string",
                    "const": "parameter"
                },
                {
                    "type": "string",
                    "const": "designator"
                },
                {
                    "type": "string",
                    "const": "image"
                },
                {
                    "type": "string",
                    "const": "note"
                },
                {
                    "type": "string",
                    "const": "text_frame"
                },
                {
                    "type": "string",
                    "const": "wire"
                },
                {
                    "type": "string",
                    "const": "bus"
                },
                {
                    "type": "string",
                    "const": "bus_entry"
                },
                {
                    "type": "string",
                    "const": "junction"
                },
                {
                    "type": "string",
                    "const": "net_label"
                },
                {
                    "type": "string",
                    "const": "power_port"
                },
                {
                    "type": "string",
                    "const": "port"
                },
                {
                    "type": "string",
                    "const": "no_erc"
                },
                {
                    "type": "string",
                    "const": "sheet_symbol"
                },
                {
                    "type": "string",
                    "const": "sheet_entry"
                },
                {
                    "type": "string",
                    "const": "sheet"
                },
                {
                    "type": "string",
                    "const": "sheet_name"
                },
                {
                    "type": "string",
                    "const": "file_name"
                },
                {
                    "type": "string",
                    "const": "implementation_list"
                },
                {
                    "type": "string",
                    "const": "implementation"
                },
                {
                    "type": "string",
                    "const": "map_definer"
                },
                {
                    "type": "string",
                    "const": "harness_connector"
                },
                {
                    "type": "string",
                    "const": "harness_entry"
                },
                {
                    "type": "string",
                    "const": "harness_type"
                },
                {
                    "type": "string",
                    "const": "signal_harness"
                },
                {
                    "type": "string",
                    "const": "harness_splice"
                },
                {
                    "type": "string",
                    "const": "harness_layout_label"
                },
                {
                    "type": "string",
                    "const": "harness_layout_connection_point"
                },
                {
                    "type": "string",
                    "const": "harness_bundle"
                },
                {
                    "type": "string",
                    "const": "harness_covering"
                },
                {
                    "type": "string",
                    "const": "template"
                },
                {
                    "type": "string",
                    "const": "parameter_set"
                },
                {
                    "type": "string",
                    "const": "compile_mask"
                },
                {
                    "type": "string",
                    "const": "blanket"
                },
                {
                    "type": "string",
                    "const": "hyperlink"
                },
                {
                    "type": "string",
                    "const": "file_header"
                },
                {
                    "type": "string",
                    "const": "map_definer_list"
                },
                {
                    "type": "string",
                    "const": "impl_params"
                }
            ]
        },
        "NullableNat": {
            "anyOf": [
                {
                    "$ref": "#/$defs/Nat"
                },
                {
                    "type": "null"
                }
            ]
        },
        "SourceRole": {
            "anyOf": [
                {
                    "type": "string",
                    "const": "object"
                },
                {
                    "type": "string",
                    "const": "field"
                },
                {
                    "type": "string",
                    "const": "pin"
                },
                {
                    "type": "string",
                    "const": "parameter"
                },
                {
                    "type": "string",
                    "const": "primitive"
                },
                {
                    "type": "string",
                    "const": "wrapper"
                },
                {
                    "type": "string",
                    "const": "generated"
                },
                {
                    "type": "string",
                    "const": "synthetic"
                }
            ]
        },
        "FillRule": {
            "anyOf": [
                {
                    "type": "string",
                    "const": "alternate"
                },
                {
                    "type": "string",
                    "const": "winding"
                }
            ]
        },
        "PersistedUidLocator": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "persisted_uid"
                },
                "owner_source_key": {
                    "$ref": "#/$defs/NullableSourceKey"
                },
                "record_kind": {
                    "$ref": "#/$defs/RecordKind"
                },
                "unique_id": {
                    "type": "string"
                }
            },
            "required": [
                "kind",
                "owner_source_key",
                "record_kind",
                "unique_id"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "SourceOrdinalLocator": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "source_ordinal"
                },
                "owner_source_key": {
                    "$ref": "#/$defs/NullableSourceKey"
                },
                "record_kind": {
                    "$ref": "#/$defs/RecordKind"
                },
                "source_ordinal": {
                    "$ref": "#/$defs/Nat"
                }
            },
            "required": [
                "kind",
                "owner_source_key",
                "record_kind",
                "source_ordinal"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "TemplateOrdinalLocator": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "template_ordinal"
                },
                "record_kind": {
                    "$ref": "#/$defs/RecordKind"
                },
                "template_kind": {
                    "type": "string"
                },
                "ordinal": {
                    "$ref": "#/$defs/Nat"
                }
            },
            "required": [
                "kind",
                "record_kind",
                "template_kind",
                "ordinal"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "SyntheticLocator": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "synthetic"
                },
                "record_kind": {
                    "$ref": "#/$defs/RecordKind"
                },
                "namespace": {
                    "type": "string"
                },
                "ordinal": {
                    "$ref": "#/$defs/Nat"
                }
            },
            "required": [
                "kind",
                "record_kind",
                "namespace",
                "ordinal"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "PlacementLocator": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "placement"
                },
                "base_source_key": {
                    "$ref": "#/$defs/SourceKey"
                },
                "instance_id": {
                    "type": "string"
                },
                "record_kind": {
                    "$ref": "#/$defs/RecordKind"
                },
                "unique_id": {
                    "$ref": "#/$defs/NullableString"
                }
            },
            "required": [
                "kind",
                "base_source_key",
                "instance_id",
                "record_kind",
                "unique_id"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "ExtractionLocator": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "extraction"
                },
                "base_source_key": {
                    "$ref": "#/$defs/SourceKey"
                },
                "record_kind": {
                    "$ref": "#/$defs/RecordKind"
                },
                "unique_id": {
                    "$ref": "#/$defs/NullableString"
                }
            },
            "required": [
                "kind",
                "base_source_key",
                "record_kind",
                "unique_id"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "NullableSourceKey": {
            "anyOf": [
                {
                    "$ref": "#/$defs/SourceKey"
                },
                {
                    "type": "null"
                }
            ]
        }
    }
}