{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/ImportOperation",
  "title": "ImportOperation",
  "type": "object",
  "description": "A record tracking the processing status of a single resource within an import request.",
  "required": [
    "version",
    "importContainerKey",
    "resourceKey",
    "state"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "System-generated unique identifier for the operation."
    },
    "version": {
      "type": "integer",
      "description": "Current version of the import operation record."
    },
    "importContainerKey": {
      "type": "string",
      "description": "Key of the container this operation belongs to."
    },
    "resourceKey": {
      "type": "string",
      "description": "User-defined key of the resource being imported."
    },
    "state": {
      "type": "string",
      "enum": [
        "Accepted",
        "ValidationFailed",
        "Unresolved",
        "WaitForMasterVariant",
        "Imported",
        "Rejected",
        "Cancelled"
      ],
      "description": "Current processing state of the import operation."
    },
    "resourceType": {
      "type": "string",
      "description": "The type of resource being imported."
    },
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ErrorObject"
      },
      "description": "Validation or processing errors if the operation failed."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp when the operation was created."
    },
    "lastModifiedAt": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp when the operation was last modified."
    }
  }
}