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