{
  "$schema": "https://docs.veritone.com/schemas/vtn-standard/master.json",
  "$id": "https://docs.veritone.com/schemas/vtn-standard/sentiment/sentiment.json",
  "title": "vtn-standard.sentiment",
  "description": "Standard engine output for Sentiment at Veritone",
  "type": "object",
  "allOf": [
    {
      "$ref": "../master.json#/definitions/PREAMBLE"
    },
    {
      "$ref": "../master.json#/definitions/validated"
    },
    {
      "properties": {
        "validationContracts": {
          "type": "array",
          "contains": {
            "const": "sentiment"
          }
        },
        "sentiment": {
          "$ref": "../master.json#/definitions/sentiment"
        },
        "emotions": {
          "$ref": "../master.json#/definitions/emotions"
        },
        "object": {
          "type": "array",
          "items": {
            "allOf": [
              {
                "$ref": "../master.json#/definitions/objectResult"
              },
              {
                "type": "object",
                "properties": {
                  "sentiment": {
                    "$ref": "../master.json#/definitions/sentiment"
                  },
                  "emotions": {
                    "$ref": "../master.json#/definitions/emotions"
                  }
                }
              }
            ]
          }
        }
      }
    },
    {
      "anyOf": [
        {
          "required": ["sentiment"]
        },
        {
          "required": ["emotions"]
        },
        {
          "required": ["object"],
          "properties": {
            "object": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "required": ["sentiment"]
                  },
                  {
                    "required": ["emotions"]
                  }
                ]
              }
            }
          }
        }
      ]
    }
  ]
}
