{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-drive/json-schema/google-drive-comment-schema.json",
  "title": "Comment",
  "description": "A comment on a file. Some resource methods (such as `comments.update`) require a `commentId`. Use the `comments.list` method to retrieve the ID for a comment in a file.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-drive-comments-api-openapi.yml#/components/schemas/Comment",
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "description": "Output only. Identifies what kind of resource this is. Value: the fixed string `\"drive#comment\"`.",
      "default": "drive#comment"
    },
    "quotedFileContent": {
      "type": "object",
      "description": "The file content to which the comment refers, typically within the anchor region. For a text file, for example, this would be the text at the location of the comment.",
      "properties": {
        "mimeType": {
          "type": "string",
          "description": "The MIME type of the quoted content."
        },
        "value": {
          "type": "string",
          "description": "The quoted content itself. This is interpreted as plain text if set through the API."
        }
      }
    },
    "mentionedEmailAddresses": {
      "type": "array",
      "description": "Output only. A list of email addresses for users mentioned in this comment. If no users are mentioned, the list is empty.",
      "readOnly": true,
      "items": {
        "type": "string"
      }
    },
    "content": {
      "type": "string",
      "description": "The plain text content of the comment. This field is used for setting the content, while `htmlContent` should be displayed."
    },
    "htmlContent": {
      "type": "string",
      "description": "Output only. The content of the comment with HTML formatting."
    },
    "replies": {
      "type": "array",
      "description": "Output only. The full list of replies to the comment in chronological order.",
      "items": {
        "$ref": "#/$defs/Reply"
      }
    },
    "author": {
      "$ref": "#/$defs/User"
    },
    "deleted": {
      "type": "boolean",
      "description": "Output only. Whether the comment has been deleted. A deleted comment has no content."
    },
    "id": {
      "type": "string",
      "description": "Output only. The ID of the comment."
    },
    "modifiedTime": {
      "type": "string",
      "description": "The last time the comment or any of its replies was modified (RFC 3339 date-time).",
      "format": "date-time"
    },
    "assigneeEmailAddress": {
      "type": "string",
      "description": "Output only. The email address of the user assigned to this comment. If no user is assigned, the field is unset.",
      "readOnly": true
    },
    "createdTime": {
      "type": "string",
      "description": "The time at which the comment was created (RFC 3339 date-time).",
      "format": "date-time"
    },
    "resolved": {
      "type": "boolean",
      "description": "Output only. Whether the comment has been resolved by one of its replies."
    },
    "anchor": {
      "type": "string",
      "description": "A region of the document represented as a JSON string. For details on defining anchor properties, refer to [Manage comments and replies](https://developers.google.com/workspace/drive/api/v3/manage-comments)."
    }
  },
  "$defs": {
    "Reply": {
      "type": "object",
      "description": "A reply to a comment on a file. Some resource methods (such as `replies.update`) require a `replyId`. Use the `replies.list` method to retrieve the ID for a reply.",
      "properties": {
        "mentionedEmailAddresses": {
          "type": "array",
          "description": "Output only. A list of email addresses for users mentioned in this comment. If no users are mentioned, the list is empty.",
          "readOnly": true,
          "items": {
            "type": "string"
          }
        },
        "kind": {
          "type": "string",
          "description": "Output only. Identifies what kind of resource this is. Value: the fixed string `\"drive#reply\"`.",
          "default": "drive#reply"
        },
        "id": {
          "type": "string",
          "description": "Output only. The ID of the reply."
        },
        "author": {
          "$ref": "#/$defs/User"
        },
        "deleted": {
          "type": "boolean",
          "description": "Output only. Whether the reply has been deleted. A deleted reply has no content."
        },
        "createdTime": {
          "type": "string",
          "description": "The time at which the reply was created (RFC 3339 date-time).",
          "format": "date-time"
        },
        "modifiedTime": {
          "type": "string",
          "description": "The last time the reply was modified (RFC 3339 date-time).",
          "format": "date-time"
        },
        "content": {
          "type": "string",
          "description": "The plain text content of the reply. This field is used for setting the content, while `htmlContent` should be displayed. This field is required by the `create` method if no `action` value is specified."
        },
        "action": {
          "type": "string",
          "description": "The action the reply performed to the parent comment. The supported values are: * `resolve` * `reopen`"
        },
        "assigneeEmailAddress": {
          "type": "string",
          "description": "Output only. The email address of the user assigned to this comment. If no user is assigned, the field is unset.",
          "readOnly": true
        },
        "htmlContent": {
          "type": "string",
          "description": "Output only. The content of the reply with HTML formatting."
        }
      }
    },
    "User": {
      "type": "object",
      "description": "Information about a Drive user.",
      "properties": {
        "photoLink": {
          "type": "string",
          "description": "Output only. A link to the user's profile photo, if available.",
          "readOnly": true
        },
        "emailAddress": {
          "type": "string",
          "description": "Output only. The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.",
          "readOnly": true
        },
        "me": {
          "type": "boolean",
          "description": "Output only. Whether this user is the requesting user.",
          "readOnly": true
        },
        "displayName": {
          "type": "string",
          "description": "Output only. A plain text displayable name for this user.",
          "readOnly": true
        },
        "kind": {
          "type": "string",
          "description": "Output only. Identifies what kind of resource this is. Value: the fixed string `drive#user`.",
          "default": "drive#user",
          "readOnly": true
        },
        "permissionId": {
          "type": "string",
          "description": "Output only. The user's ID as visible in Permission resources.",
          "readOnly": true
        }
      }
    }
  }
}