{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-q/json-schema/amazon-q-list-attachments-response-schema.json",
  "title": "ListAttachmentsResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-q-attachments-api-openapi.yml#/components/schemas/ListAttachmentsResponse",
  "type": "object",
  "properties": {
    "attachments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Attachment"
      },
      "description": "An array of information on one or more attachments."
    },
    "nextToken": {
      "type": "string",
      "description": "If the response is truncated, Amazon Q Business returns this token, which you can use in a later request to list the next set of attachments."
    }
  },
  "$defs": {
    "Attachment": {
      "type": "object",
      "properties": {
        "attachmentId": {
          "type": "string",
          "description": "The identifier of the Amazon Q Business attachment."
        },
        "conversationId": {
          "type": "string",
          "description": "The identifier of the Amazon Q Business conversation the attachment is associated with."
        },
        "name": {
          "type": "string",
          "description": "Filename of the Amazon Q Business attachment."
        },
        "copyFrom": {
          "$ref": "#/$defs/CopyFromSource"
        },
        "fileType": {
          "type": "string",
          "description": "Filetype of the Amazon Q Business attachment."
        },
        "fileSize": {
          "type": "integer",
          "description": "Size in bytes of the Amazon Q Business attachment."
        },
        "md5chksum": {
          "type": "string",
          "description": "MD5 checksum of the Amazon Q Business attachment contents."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The Unix timestamp when the Amazon Q Business attachment was created."
        },
        "status": {
          "type": "string",
          "enum": [
            "FAILED",
            "SUCCESS"
          ],
          "description": "AttachmentStatus of the Amazon Q Business attachment."
        },
        "error": {
          "$ref": "#/$defs/ErrorDetail"
        }
      }
    },
    "ConversationSource": {
      "type": "object",
      "properties": {
        "conversationId": {
          "type": "string",
          "description": "The unique identifier of the Amazon Q Business conversation."
        },
        "attachmentId": {
          "type": "string",
          "description": "The unique identifier of the Amazon Q Business attachment."
        }
      },
      "required": [
        "conversationId",
        "attachmentId"
      ]
    },
    "CopyFromSource": {
      "type": "object",
      "properties": {
        "conversation": {
          "$ref": "#/$defs/ConversationSource"
        }
      },
      "description": "Exactly one member is set."
    },
    "ErrorDetail": {
      "type": "object",
      "properties": {
        "errorMessage": {
          "type": "string",
          "description": "The message explaining the Amazon Q Business request error."
        },
        "errorCode": {
          "type": "string",
          "enum": [
            "InternalError",
            "InvalidRequest",
            "ResourceInactive",
            "ResourceNotFound"
          ],
          "description": "The code associated with the Amazon Q Business request error."
        }
      }
    }
  }
}