target.apidocs.com.google.api.services.drive.model.Comment.html Maven / Gradle / Ivy
Comment (Google Drive API v2-rev20240521-2.0.0)
com.google.api.services.drive.model
Class Comment
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.drive.model.Comment
-
public final class Comment
extends com.google.api.client.json.GenericJson
A comment on a file in Google Drive. 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.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Google Drive API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
Nested Classes
Modifier and Type
Class and Description
static class
Comment.Context
The context of the file which is being commented on.
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
Comment()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Comment
clone()
String
getAnchor()
A region of the document represented as a JSON string.
User
getAuthor()
Output only.
String
getCommentId()
Output only.
String
getContent()
The plain text content used to create this comment.
Comment.Context
getContext()
The context of the file which is being commented on.
com.google.api.client.util.DateTime
getCreatedDate()
The date when this comment was first created.
Boolean
getDeleted()
Output only.
String
getFileId()
Output only.
String
getFileTitle()
Output only.
String
getHtmlContent()
Output only.
String
getKind()
Output only.
com.google.api.client.util.DateTime
getModifiedDate()
The date when this comment or any of its replies were last modified.
List<CommentReply>
getReplies()
Output only.
String
getSelfLink()
Output only.
String
getStatus()
Output only.
Comment
set(String fieldName,
Object value)
Comment
setAnchor(String anchor)
A region of the document represented as a JSON string.
Comment
setAuthor(User author)
Output only.
Comment
setCommentId(String commentId)
Output only.
Comment
setContent(String content)
The plain text content used to create this comment.
Comment
setContext(Comment.Context context)
The context of the file which is being commented on.
Comment
setCreatedDate(com.google.api.client.util.DateTime createdDate)
The date when this comment was first created.
Comment
setDeleted(Boolean deleted)
Output only.
Comment
setFileId(String fileId)
Output only.
Comment
setFileTitle(String fileTitle)
Output only.
Comment
setHtmlContent(String htmlContent)
Output only.
Comment
setKind(String kind)
Output only.
Comment
setModifiedDate(com.google.api.client.util.DateTime modifiedDate)
The date when this comment or any of its replies were last modified.
Comment
setReplies(List<CommentReply> replies)
Output only.
Comment
setSelfLink(String selfLink)
Output only.
Comment
setStatus(String status)
Output only.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getAnchor
public String getAnchor()
A region of the document represented as a JSON string. For details on defining anchor
properties, refer to [Add comments and
replies](https://developers.google.com/drive/api/v2/manage-comments).
- Returns:
- value or
null
for none
-
setAnchor
public Comment setAnchor(String anchor)
A region of the document represented as a JSON string. For details on defining anchor
properties, refer to [Add comments and
replies](https://developers.google.com/drive/api/v2/manage-comments).
- Parameters:
anchor
- anchor or null
for none
-
getAuthor
public User getAuthor()
Output only. The author of the comment. The author's email address and permission ID will not
be populated.
- Returns:
- value or
null
for none
-
setAuthor
public Comment setAuthor(User author)
Output only. The author of the comment. The author's email address and permission ID will not
be populated.
- Parameters:
author
- author or null
for none
-
getCommentId
public String getCommentId()
Output only. The ID of the comment.
- Returns:
- value or
null
for none
-
setCommentId
public Comment setCommentId(String commentId)
Output only. The ID of the comment.
- Parameters:
commentId
- commentId or null
for none
-
getContent
public String getContent()
The plain text content used to create this comment. This is not HTML safe and should only be
used as a starting point to make edits to a comment's content.
- Returns:
- value or
null
for none
-
setContent
public Comment setContent(String content)
The plain text content used to create this comment. This is not HTML safe and should only be
used as a starting point to make edits to a comment's content.
- Parameters:
content
- content or null
for none
-
getContext
public Comment.Context getContext()
The context of the file which is being commented on.
- Returns:
- value or
null
for none
-
setContext
public Comment setContext(Comment.Context context)
The context of the file which is being commented on.
- Parameters:
context
- context or null
for none
-
getCreatedDate
public com.google.api.client.util.DateTime getCreatedDate()
The date when this comment was first created.
- Returns:
- value or
null
for none
-
setCreatedDate
public Comment setCreatedDate(com.google.api.client.util.DateTime createdDate)
The date when this comment was first created.
- Parameters:
createdDate
- createdDate or null
for none
-
getDeleted
public Boolean getDeleted()
Output only. Whether this comment has been deleted. If a comment has been deleted the content
will be cleared and this will only represent a comment that once existed.
- Returns:
- value or
null
for none
-
setDeleted
public Comment setDeleted(Boolean deleted)
Output only. Whether this comment has been deleted. If a comment has been deleted the content
will be cleared and this will only represent a comment that once existed.
- Parameters:
deleted
- deleted or null
for none
-
getFileId
public String getFileId()
Output only. The file which this comment is addressing.
- Returns:
- value or
null
for none
-
setFileId
public Comment setFileId(String fileId)
Output only. The file which this comment is addressing.
- Parameters:
fileId
- fileId or null
for none
-
getFileTitle
public String getFileTitle()
Output only. The title of the file which this comment is addressing.
- Returns:
- value or
null
for none
-
setFileTitle
public Comment setFileTitle(String fileTitle)
Output only. The title of the file which this comment is addressing.
- Parameters:
fileTitle
- fileTitle or null
for none
-
getHtmlContent
public String getHtmlContent()
Output only. HTML formatted content for this comment.
- Returns:
- value or
null
for none
-
setHtmlContent
public Comment setHtmlContent(String htmlContent)
Output only. HTML formatted content for this comment.
- Parameters:
htmlContent
- htmlContent or null
for none
-
getKind
public String getKind()
Output only. This is always `drive#comment`.
- Returns:
- value or
null
for none
-
setKind
public Comment setKind(String kind)
Output only. This is always `drive#comment`.
- Parameters:
kind
- kind or null
for none
-
getModifiedDate
public com.google.api.client.util.DateTime getModifiedDate()
The date when this comment or any of its replies were last modified.
- Returns:
- value or
null
for none
-
setModifiedDate
public Comment setModifiedDate(com.google.api.client.util.DateTime modifiedDate)
The date when this comment or any of its replies were last modified.
- Parameters:
modifiedDate
- modifiedDate or null
for none
-
getReplies
public List<CommentReply> getReplies()
Output only. Replies to this post.
- Returns:
- value or
null
for none
-
setReplies
public Comment setReplies(List<CommentReply> replies)
Output only. Replies to this post.
- Parameters:
replies
- replies or null
for none
-
getSelfLink
public String getSelfLink()
Output only. A link back to this comment.
- Returns:
- value or
null
for none
-
setSelfLink
public Comment setSelfLink(String selfLink)
Output only. A link back to this comment.
- Parameters:
selfLink
- selfLink or null
for none
-
getStatus
public String getStatus()
Output only. The status of this comment. Status can be changed by posting a reply to a comment
with the desired status. * `open` - The comment is still open. * `resolved` - The comment has
been resolved by one of its replies.
- Returns:
- value or
null
for none
-
setStatus
public Comment setStatus(String status)
Output only. The status of this comment. Status can be changed by posting a reply to a comment
with the desired status. * `open` - The comment is still open. * `resolved` - The comment has
been resolved by one of its replies.
- Parameters:
status
- status or null
for none
-
set
public Comment set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public Comment clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.