{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe/json-schema/adobe-collection-job-status-schema.json",
  "title": "CollectionJobStatus",
  "description": "The status of a collection async job.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adobe-aem-assets-delivery-openapi.yml#/components/schemas/CollectionJobStatus",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/CommandResult"
    },
    {
      "type": "object",
      "properties": {
        "operation": {
          "type": "string",
          "enum": [
            "aem.assets.collections.createCollection",
            "aem.assets.collections.deleteCollection",
            "aem.assets.collections.addToCollection",
            "aem.assets.collections.removeFromCollection"
          ]
        },
        "data": {
          "allOf": [
            {
              "type": "object",
              "description": "Assets Collection Command Result",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "collectionId": {
                  "$ref": "#/$defs/CollectionId"
                },
                "status": {
                  "type": "string",
                  "description": "Status of the collection operation",
                  "minLength": 1,
                  "enum": [
                    "PROCESSING",
                    "COMPLETED",
                    "FAILED"
                  ],
                  "readOnly": true
                }
              },
              "required": [
                "status"
              ]
            }
          ]
        }
      }
    }
  ],
  "$defs": {
    "CollectionId": {
      "type": "string",
      "description": "ID of the collection",
      "minLength": 1
    },
    "CommandResult": {
      "description": "The result of a command. A command is an operation that changes a system in a different way than via a CRUD\nrequest to a resource.\n",
      "type": "object",
      "properties": {
        "operation": {
          "type": "string",
          "description": "The operation that was performed.",
          "minLength": 1
        },
        "status": {
          "type": "integer",
          "format": "int32",
          "description": "The HTTP status code ([RFC9110, Section 15](https://www.rfc-editor.org/rfc/rfc9110.html#section-15))\ngenerated by the origin server corresponding to this operation.\n"
        },
        "description": {
          "type": "string",
          "description": "A human-readable explanation specific to this command, explaining the status.",
          "minLength": 1
        },
        "data": {
          "type": "object",
          "description": "The data returned by the operation, which will vary by the implementing command. Each command\nMUST provide its own schema definition for this object, by defining all the properties a client is\nexpected to encounter.\n"
        },
        "errors": {
          "type": "array",
          "description": "An optional array of errors that occurred during the operation.",
          "items": {
            "$ref": "#/$defs/CommandResultMessage"
          }
        },
        "warnings": {
          "type": "array",
          "description": "An optional array of warnings that occurred during the operation.",
          "items": {
            "$ref": "#/$defs/CommandResultMessage"
          }
        }
      },
      "required": [
        "operation",
        "status",
        "description"
      ]
    },
    "CommandResultMessage": {
      "description": "CommandResultMessage Object to encapsulate the result of a command.",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "A URI reference [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) that identifies the message type.",
          "minLength": 1
        },
        "title": {
          "type": "string",
          "description": "A short, human-readable summary of the problem type.",
          "minLength": 1
        },
        "detail": {
          "type": "string",
          "description": "A human-readable explanation specific to this occurrence of the problem."
        },
        "context": {
          "type": "object",
          "description": "An optional object containing additional context information about the problem.\n\nEach command MUST provide its own schema definition for this object, by defining all the properties a client is\nexpected to encounter.\n"
        }
      },
      "required": [
        "type",
        "title"
      ]
    }
  }
}