{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "ParagraphAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "block"
        },
        "nodeType": {
          "const": "paragraph"
        },
        "nodeId": {
          "type": "string"
        },
        "story": {
          "$ref": "#/$defs/StoryLocator"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "nodeType",
        "nodeId"
      ]
    },
    "StoryLocator": {
      "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "story"
            },
            "storyType": {
              "const": "body"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "storyType"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "story"
            },
            "storyType": {
              "const": "headerFooterSlot"
            },
            "section": {
              "$ref": "#/$defs/SectionAddress"
            },
            "headerFooterKind": {
              "enum": [
                "header",
                "footer"
              ]
            },
            "variant": {
              "enum": [
                "default",
                "first",
                "even"
              ]
            },
            "resolution": {
              "enum": [
                "effective",
                "explicit"
              ]
            },
            "onWrite": {
              "enum": [
                "materializeIfInherited",
                "editResolvedPart",
                "error"
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "storyType",
            "section",
            "headerFooterKind",
            "variant"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "story"
            },
            "storyType": {
              "const": "headerFooterPart"
            },
            "refId": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "storyType",
            "refId"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "story"
            },
            "storyType": {
              "const": "footnote"
            },
            "noteId": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "storyType",
            "noteId"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "story"
            },
            "storyType": {
              "const": "endnote"
            },
            "noteId": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "storyType",
            "noteId"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "story"
            },
            "storyType": {
              "const": "textbox"
            },
            "textboxId": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "storyType",
            "textboxId"
          ]
        }
      ]
    },
    "SectionAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "section"
        },
        "sectionId": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "sectionId"
      ]
    },
    "HeadingAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "block"
        },
        "nodeType": {
          "const": "heading"
        },
        "nodeId": {
          "type": "string"
        },
        "story": {
          "$ref": "#/$defs/StoryLocator"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "nodeType",
        "nodeId"
      ]
    },
    "ListItemAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "block"
        },
        "nodeType": {
          "const": "listItem"
        },
        "nodeId": {
          "type": "string"
        },
        "story": {
          "$ref": "#/$defs/StoryLocator"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "nodeType",
        "nodeId"
      ]
    },
    "TrackedChangeAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "entity"
        },
        "entityType": {
          "const": "trackedChange"
        },
        "entityId": {
          "type": "string"
        },
        "story": {
          "$ref": "#/$defs/StoryLocator"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "entityType",
        "entityId"
      ]
    }
  },
  "operationId": "format.paragraph.setMarkRunProps",
  "schemas": {
    "input": {
      "type": "object",
      "properties": {
        "target": {
          "oneOf": [
            {
              "$ref": "#/$defs/ParagraphAddress"
            },
            {
              "$ref": "#/$defs/HeadingAddress"
            },
            {
              "$ref": "#/$defs/ListItemAddress"
            }
          ]
        },
        "markRunProps": {
          "type": "object",
          "properties": {
            "fontSizeCs": {
              "type": "number"
            },
            "specVanish": {
              "type": "boolean"
            },
            "fontSize": {
              "type": "number"
            },
            "fonts": {
              "type": "object",
              "properties": {
                "ascii": {
                  "type": "string",
                  "minLength": 1
                },
                "hAnsi": {
                  "type": "string",
                  "minLength": 1
                },
                "eastAsia": {
                  "type": "string",
                  "minLength": 1
                },
                "cs": {
                  "type": "string",
                  "minLength": 1
                },
                "asciiTheme": {
                  "type": "string",
                  "minLength": 1
                },
                "hAnsiTheme": {
                  "type": "string",
                  "minLength": 1
                },
                "eastAsiaTheme": {
                  "type": "string",
                  "minLength": 1
                },
                "csTheme": {
                  "type": "string",
                  "minLength": 1
                },
                "hint": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "additionalProperties": false,
              "minProperties": 1
            },
            "fontFamily": {
              "type": "string",
              "minLength": 1
            },
            "lang": {
              "type": "object",
              "properties": {
                "val": {
                  "type": "string",
                  "minLength": 1
                },
                "eastAsia": {
                  "type": "string",
                  "minLength": 1
                },
                "bidi": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "additionalProperties": false,
              "minProperties": 1
            },
            "color": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "model": {
                      "const": "rgb"
                    },
                    "value": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "model",
                    "value"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "model": {
                      "const": "theme"
                    },
                    "theme": {
                      "type": "string",
                      "minLength": 1
                    },
                    "tint": {
                      "type": "integer"
                    },
                    "shade": {
                      "type": "integer"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "model",
                    "theme"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "model": {
                      "const": "auto"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "model"
                  ]
                }
              ]
            },
            "highlight": {
              "type": "string",
              "minLength": 1
            },
            "shading": {
              "type": "object",
              "properties": {
                "fill": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "model": {
                          "const": "rgb"
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "model",
                        "value"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "model": {
                          "const": "theme"
                        },
                        "theme": {
                          "type": "string",
                          "minLength": 1
                        },
                        "tint": {
                          "type": "integer"
                        },
                        "shade": {
                          "type": "integer"
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "model",
                        "theme"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "model": {
                          "const": "auto"
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "model"
                      ]
                    }
                  ]
                },
                "color": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "model": {
                          "const": "rgb"
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "model",
                        "value"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "model": {
                          "const": "theme"
                        },
                        "theme": {
                          "type": "string",
                          "minLength": 1
                        },
                        "tint": {
                          "type": "integer"
                        },
                        "shade": {
                          "type": "integer"
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "model",
                        "theme"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "model": {
                          "const": "auto"
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "model"
                      ]
                    }
                  ]
                },
                "pattern": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "additionalProperties": false,
              "minProperties": 1
            },
            "cs": {
              "type": "boolean"
            },
            "rtl": {
              "type": "boolean"
            },
            "bold": {
              "type": "boolean"
            },
            "boldCs": {
              "type": "boolean"
            },
            "italic": {
              "type": "boolean"
            },
            "italicCs": {
              "type": "boolean"
            },
            "underline": {
              "type": "object",
              "properties": {
                "style": {
                  "type": "string",
                  "minLength": 1
                },
                "color": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "model": {
                          "const": "rgb"
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "model",
                        "value"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "model": {
                          "const": "theme"
                        },
                        "theme": {
                          "type": "string",
                          "minLength": 1
                        },
                        "tint": {
                          "type": "integer"
                        },
                        "shade": {
                          "type": "integer"
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "model",
                        "theme"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "model": {
                          "const": "auto"
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "model"
                      ]
                    }
                  ]
                }
              },
              "additionalProperties": false,
              "minProperties": 1
            },
            "strikethrough": {
              "type": "boolean"
            },
            "doubleStrikethrough": {
              "type": "boolean"
            },
            "caps": {
              "type": "boolean"
            },
            "smallCaps": {
              "type": "boolean"
            },
            "outline": {
              "type": "boolean"
            },
            "shadow": {
              "type": "boolean"
            },
            "emboss": {
              "type": "boolean"
            },
            "imprint": {
              "type": "boolean"
            },
            "verticalAlign": {
              "enum": [
                "baseline",
                "superscript",
                "subscript"
              ]
            },
            "characterSpacing": {
              "type": "number"
            },
            "characterScale": {
              "type": "number"
            },
            "kern": {
              "type": "number"
            },
            "baselineShift": {
              "type": "number"
            },
            "fitTextWidth": {
              "type": "number"
            },
            "vanish": {
              "type": "boolean"
            },
            "webHidden": {
              "type": "boolean"
            },
            "border": {
              "type": "object",
              "properties": {
                "style": {
                  "type": "string",
                  "minLength": 1
                },
                "width": {
                  "type": "number"
                },
                "space": {
                  "type": "number"
                },
                "color": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "model": {
                          "const": "rgb"
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "model",
                        "value"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "model": {
                          "const": "theme"
                        },
                        "theme": {
                          "type": "string",
                          "minLength": 1
                        },
                        "tint": {
                          "type": "integer"
                        },
                        "shade": {
                          "type": "integer"
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "model",
                        "theme"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "model": {
                          "const": "auto"
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "model"
                      ]
                    }
                  ]
                },
                "frame": {
                  "type": "boolean"
                },
                "shadow": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false,
              "minProperties": 1
            },
            "textEffect": {
              "type": "string",
              "minLength": 1
            }
          },
          "additionalProperties": false,
          "minProperties": 1,
          "description": "Paragraph-mark run properties (SDRunProps shape, e.g. fontSizeCs, specVanish)."
        }
      },
      "additionalProperties": false,
      "required": [
        "target",
        "markRunProps"
      ]
    },
    "output": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "success": {
              "const": true
            },
            "target": {
              "oneOf": [
                {
                  "$ref": "#/$defs/ParagraphAddress"
                },
                {
                  "$ref": "#/$defs/HeadingAddress"
                },
                {
                  "$ref": "#/$defs/ListItemAddress"
                }
              ]
            },
            "resolution": {
              "type": "object",
              "properties": {
                "target": {
                  "oneOf": [
                    {
                      "$ref": "#/$defs/ParagraphAddress"
                    },
                    {
                      "$ref": "#/$defs/HeadingAddress"
                    },
                    {
                      "$ref": "#/$defs/ListItemAddress"
                    }
                  ]
                }
              },
              "additionalProperties": false,
              "required": [
                "target"
              ]
            },
            "trackedChangeRefs": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/TrackedChangeAddress"
              }
            }
          },
          "additionalProperties": false,
          "required": [
            "success",
            "target",
            "resolution"
          ]
        },
        {
          "type": "object",
          "properties": {
            "success": {
              "const": false
            },
            "failure": {
              "type": "object",
              "properties": {
                "code": {
                  "enum": [
                    "NO_OP",
                    "CAPABILITY_UNAVAILABLE"
                  ]
                },
                "message": {
                  "type": "string"
                },
                "details": {}
              },
              "additionalProperties": false,
              "required": [
                "code",
                "message"
              ]
            },
            "resolution": {
              "type": "object",
              "properties": {
                "target": {
                  "oneOf": [
                    {
                      "$ref": "#/$defs/ParagraphAddress"
                    },
                    {
                      "$ref": "#/$defs/HeadingAddress"
                    },
                    {
                      "$ref": "#/$defs/ListItemAddress"
                    }
                  ]
                }
              },
              "additionalProperties": false,
              "required": [
                "target"
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "success",
            "failure"
          ]
        }
      ]
    },
    "success": {
      "type": "object",
      "properties": {
        "success": {
          "const": true
        },
        "target": {
          "oneOf": [
            {
              "$ref": "#/$defs/ParagraphAddress"
            },
            {
              "$ref": "#/$defs/HeadingAddress"
            },
            {
              "$ref": "#/$defs/ListItemAddress"
            }
          ]
        },
        "resolution": {
          "type": "object",
          "properties": {
            "target": {
              "oneOf": [
                {
                  "$ref": "#/$defs/ParagraphAddress"
                },
                {
                  "$ref": "#/$defs/HeadingAddress"
                },
                {
                  "$ref": "#/$defs/ListItemAddress"
                }
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "target"
          ]
        },
        "trackedChangeRefs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TrackedChangeAddress"
          }
        }
      },
      "additionalProperties": false,
      "required": [
        "success",
        "target",
        "resolution"
      ]
    },
    "failure": {
      "type": "object",
      "properties": {
        "success": {
          "const": false
        },
        "failure": {
          "type": "object",
          "properties": {
            "code": {
              "enum": [
                "NO_OP",
                "CAPABILITY_UNAVAILABLE"
              ]
            },
            "message": {
              "type": "string"
            },
            "details": {}
          },
          "additionalProperties": false,
          "required": [
            "code",
            "message"
          ]
        },
        "resolution": {
          "type": "object",
          "properties": {
            "target": {
              "oneOf": [
                {
                  "$ref": "#/$defs/ParagraphAddress"
                },
                {
                  "$ref": "#/$defs/HeadingAddress"
                },
                {
                  "$ref": "#/$defs/ListItemAddress"
                }
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "target"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "success",
        "failure"
      ]
    }
  }
}
