{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-codecommit/json-schema/amazon-codecommit-get-comments-for-pull-request-output-schema.json",
  "title": "GetCommentsForPullRequestOutput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-codecommit-comment-api-openapi.yml#/components/schemas/GetCommentsForPullRequestOutput",
  "type": "object",
  "properties": {
    "commentsForPullRequestData": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CommentsForPullRequest"
      },
      "description": "An array of comment objects on the pull request."
    },
    "nextToken": {
      "type": "string",
      "description": "An enumeration token that can be used in a request to return the next batch of the results."
    }
  },
  "$defs": {
    "Comment": {
      "type": "object",
      "properties": {
        "commentId": {
          "type": "string",
          "description": "The system-generated comment ID."
        },
        "content": {
          "type": "string",
          "description": "The content of the comment."
        },
        "inReplyTo": {
          "type": "string",
          "description": "The ID of the comment for which this comment is a reply, if any."
        },
        "creationDate": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time the comment was created, in timestamp format."
        },
        "lastModifiedDate": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time the comment was most recently modified, in timestamp format."
        },
        "authorArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the person who posted the comment."
        },
        "deleted": {
          "type": "boolean",
          "description": "A Boolean value indicating whether the comment has been deleted."
        },
        "clientRequestToken": {
          "type": "string",
          "description": "A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request returns information about the initial request that used that token."
        },
        "callerReactions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The emoji reactions to a comment, if any, submitted by the user whose credentials are associated with the call to the API."
        },
        "reactionCounts": {
          "type": "object",
          "additionalProperties": {
            "type": "integer"
          },
          "description": "A string to integer map that represents the number of individual users who have responded to a comment with the specified reactions."
        }
      }
    },
    "CommentsForPullRequest": {
      "type": "object",
      "properties": {
        "pullRequestId": {
          "type": "string",
          "description": "The system-generated ID of the pull request."
        },
        "repositoryName": {
          "type": "string",
          "description": "The name of the repository that contains the pull request."
        },
        "beforeCommitId": {
          "type": "string",
          "description": "The full commit ID of the commit that was the tip of the destination branch when the pull request was created. This commit is superceded by the after commit in the source branch when and if you merge the source branch into the destination branch."
        },
        "afterCommitId": {
          "type": "string",
          "description": "The full commit ID of the commit that was the tip of the source branch at the time the comment was made."
        },
        "beforeBlobId": {
          "type": "string",
          "description": "The full blob ID of the file on which you want to comment on the destination commit."
        },
        "afterBlobId": {
          "type": "string",
          "description": "The full blob ID of the file on which you want to comment on the source commit."
        },
        "location": {
          "$ref": "#/$defs/Location"
        },
        "comments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Comment"
          },
          "description": "An array of comment objects. Each comment object contains information about a comment on the pull request."
        }
      }
    },
    "Location": {
      "type": "object",
      "properties": {
        "filePath": {
          "type": "string",
          "description": "The name of the file being compared, including its extension and subdirectory, if any."
        },
        "filePosition": {
          "type": "integer",
          "description": "The position of a change in a compared file, in line number format."
        },
        "relativeFileVersion": {
          "type": "string",
          "enum": [
            "BEFORE",
            "AFTER"
          ],
          "description": "In a comparison of commits or a pull request, whether the change is in the before or after of that comparison."
        }
      }
    }
  }
}