{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure/json-schema/microsoft-azure-analyze-conversation-job-state-schema.json",
  "title": "AnalyzeConversationJobState",
  "description": "Contains the status of the analyze conversations job submitted along with related statistics.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-analyze-conversations-api-openapi.yml#/components/schemas/AnalyzeConversationJobState",
  "allOf": [
    {
      "$ref": "common.json#/definitions/JobState"
    },
    {
      "$ref": "#/$defs/ConversationTasksState"
    },
    {
      "$ref": "#/$defs/AnalyzeConversationJobStatistics"
    }
  ],
  "$defs": {
    "AnalyzeConversationJobResult": {
      "type": "object",
      "description": "Container for results for all tasks in the conversation job.",
      "properties": {
        "kind": {
          "$ref": "#/$defs/AnalyzeConversationResultsKind"
        }
      },
      "allOf": [
        {
          "$ref": "common.json#/definitions/TaskState"
        },
        {
          "$ref": "common.json#/definitions/TaskIdentifier"
        }
      ],
      "required": [
        "kind"
      ]
    },
    "AnalyzeConversationJobStatistics": {
      "description": "Contains the statistics for the job submitted.",
      "properties": {
        "statistics": {
          "$ref": "#/$defs/ConversationRequestStatistics"
        }
      },
      "type": "object"
    },
    "AnalyzeConversationResultsKind": {
      "type": "string",
      "description": "Enumeration of supported Conversation Analysis task results.",
      "enum": [
        "ConversationalPIIResults",
        "ConversationalSummarizationResults",
        "CustomConversationalSummarizationResults",
        "ConversationalSentimentResults"
      ],
      "x-ms-enum": {
        "name": "AnalyzeConversationResultsKind",
        "modelAsString": true
      }
    },
    "ConversationRequestStatistics": {
      "type": "object",
      "description": "if showStats=true was specified in the request this field will contain information about the request payload.",
      "required": [
        "conversationsCount",
        "validConversationsCount",
        "erroneousConversationsCount"
      ],
      "properties": {
        "conversationsCount": {
          "type": "integer",
          "format": "int32",
          "description": "Number of conversations submitted in the request."
        },
        "validConversationsCount": {
          "type": "integer",
          "format": "int32",
          "description": "Number of conversations documents. This excludes empty, over-size limit or non-supported languages documents."
        },
        "erroneousConversationsCount": {
          "type": "integer",
          "format": "int32",
          "description": "Number of invalid documents. This includes empty, over-size limit or non-supported languages documents."
        }
      },
      "allOf": [
        {
          "$ref": "common.json#/definitions/RequestStatistics"
        }
      ]
    },
    "ConversationTasksState": {
      "description": "Contains the state for the tasks being executed as part of the analyze conversation job submitted.",
      "properties": {
        "tasks": {
          "properties": {
            "completed": {
              "description": "Count of tasks completed successfully.",
              "type": "integer",
              "format": "int32"
            },
            "failed": {
              "description": "Count of tasks that failed.",
              "type": "integer",
              "format": "int32"
            },
            "inProgress": {
              "description": "Count of tasks in progress currently.",
              "type": "integer",
              "format": "int32"
            },
            "total": {
              "description": "Total count of tasks submitted as part of the job.",
              "type": "integer",
              "format": "int32"
            },
            "items": {
              "description": "List of results from tasks (if available).",
              "type": "array",
              "items": {
                "$ref": "#/$defs/AnalyzeConversationJobResult"
              }
            }
          },
          "required": [
            "total",
            "completed",
            "failed",
            "inProgress"
          ],
          "type": "object"
        }
      },
      "required": [
        "tasks"
      ],
      "type": "object"
    }
  }
}