{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "AddMediaRequest",
  "allOf": [
    {
      "$ref": "#/definitions/AddMediaPropertiesRequest"
    }
  ],
  "definitions": {
    "AddMediaPropertiesRequest": {
      "type": "object",
      "required": [
        "mediaId",
        "properties"
      ],
      "properties": {
        "mediaId": {
          "$ref": "#/definitions/MediaId"
        },
        "properties": {
          "$ref": "#/definitions/MediaProperties"
        }
      },
      "additionalProperties": false
    },
    "CSSColor": {
      "type": "string"
    },
    "MediaId": {
      "type": "string"
    },
    "MediaProperties": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "tag",
            "value"
          ],
          "properties": {
            "tag": {
              "type": "string",
              "enum": [
                "Text"
              ]
            },
            "value": {
              "$ref": "#/definitions/TextMediaProperties"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "TextAlign": {
      "type": "string",
      "enum": [
        "left",
        "center",
        "right"
      ]
    },
    "TextMediaProperties": {
      "description": "This corresponds to Text class in Typescript codebase, but only includes the properties we care about",
      "type": "object",
      "required": [
        "style",
        "text"
      ],
      "properties": {
        "style": {
          "$ref": "#/definitions/TextStyle"
        },
        "text": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "TextStyle": {
      "type": "object",
      "required": [
        "backgroundColor",
        "borderRadius",
        "fontFamily",
        "fontSize",
        "fontWeight",
        "lineHeight",
        "textAlign",
        "textColor",
        "verticalAlign"
      ],
      "properties": {
        "backgroundColor": {
          "$ref": "#/definitions/CSSColor"
        },
        "borderRadius": {
          "type": "number",
          "format": "double"
        },
        "fontFamily": {
          "type": "string"
        },
        "fontSize": {
          "type": "number",
          "format": "double"
        },
        "fontWeight": {
          "type": "integer",
          "format": "uint16",
          "minimum": 0.0
        },
        "lineHeight": {
          "type": "number",
          "format": "double"
        },
        "textAlign": {
          "$ref": "#/definitions/TextAlign"
        },
        "textColor": {
          "$ref": "#/definitions/CSSColor"
        },
        "verticalAlign": {
          "$ref": "#/definitions/VerticalAlign"
        }
      },
      "additionalProperties": false
    },
    "VerticalAlign": {
      "type": "string",
      "enum": [
        "top",
        "middle",
        "bottom"
      ]
    }
  }
}