{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure/json-schema/microsoft-azure-analyze-text-job-state-schema.json",
  "title": "AnalyzeTextJobState",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-analyze-text-api-openapi.yml#/components/schemas/AnalyzeTextJobState",
  "allOf": [
    {
      "$ref": "common.json#/definitions/JobState"
    },
    {
      "$ref": "#/$defs/TasksState"
    },
    {
      "$ref": "#/$defs/AnalyzeTextJobStatistics"
    }
  ],
  "$defs": {
    "AnalyzeTextJobStatistics": {
      "properties": {
        "statistics": {
          "$ref": "common.json#/definitions/RequestStatistics"
        }
      },
      "type": "object"
    },
    "AnalyzeTextLROResult": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/AnalyzeTextLROResultsKind"
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/TaskState"
        },
        {
          "$ref": "common.json#/definitions/TaskIdentifier"
        }
      ],
      "required": [
        "kind"
      ]
    },
    "AnalyzeTextLROResultsKind": {
      "type": "string",
      "description": "Enumeration of supported Text Analysis long-running operation task results.",
      "enum": [
        "SentimentAnalysisLROResults",
        "EntityRecognitionLROResults",
        "PiiEntityRecognitionLROResults",
        "KeyPhraseExtractionLROResults",
        "EntityLinkingLROResults",
        "HealthcareLROResults",
        "CustomHealthcareLROResults",
        "ExtractiveSummarizationLROResults",
        "CustomEntityRecognitionLROResults",
        "CustomSingleLabelClassificationLROResults",
        "CustomMultiLabelClassificationLROResults",
        "AbstractiveSummarizationLROResults",
        "CustomSentimentAnalysisLROResults",
        "CustomAbstractiveSummarizationLROResults"
      ],
      "x-ms-enum": {
        "name": "AnalyzeTextLROResultsKind",
        "modelAsString": true
      }
    },
    "TaskState": {
      "properties": {
        "lastUpdateDateTime": {
          "format": "date-time",
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "notStarted",
            "running",
            "succeeded",
            "failed",
            "cancelled",
            "cancelling"
          ],
          "x-ms-enum": {
            "modelAsString": true,
            "name": "State"
          }
        }
      },
      "required": [
        "status",
        "lastUpdateDateTime"
      ],
      "type": "object"
    },
    "TasksState": {
      "properties": {
        "tasks": {
          "properties": {
            "completed": {
              "type": "integer",
              "format": "int64"
            },
            "failed": {
              "type": "integer",
              "format": "int64"
            },
            "inProgress": {
              "type": "integer",
              "format": "int64"
            },
            "total": {
              "type": "integer",
              "format": "int64"
            },
            "items": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/AnalyzeTextLROResult"
              }
            }
          },
          "required": [
            "total",
            "completed",
            "failed",
            "inProgress"
          ],
          "type": "object"
        }
      },
      "required": [
        "tasks"
      ],
      "type": "object"
    }
  }
}