target.apidocs.com.google.api.services.drive.model.Comment.html Maven / Gradle / Ivy
Comment (Google Drive API v3-rev20241027-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. 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.QuotedFileContent
The file content to which the comment refers, typically within the anchor region.
-
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
getContent()
The plain text content of the comment.
com.google.api.client.util.DateTime
getCreatedTime()
The time at which the comment was created (RFC 3339 date-time).
Boolean
getDeleted()
Output only.
String
getHtmlContent()
Output only.
String
getId()
Output only.
String
getKind()
Output only.
com.google.api.client.util.DateTime
getModifiedTime()
The last time the comment or any of its replies was modified (RFC 3339 date-time).
Comment.QuotedFileContent
getQuotedFileContent()
The file content to which the comment refers, typically within the anchor region.
List<Reply>
getReplies()
Output only.
Boolean
getResolved()
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
setContent(String content)
The plain text content of the comment.
Comment
setCreatedTime(com.google.api.client.util.DateTime createdTime)
The time at which the comment was created (RFC 3339 date-time).
Comment
setDeleted(Boolean deleted)
Output only.
Comment
setHtmlContent(String htmlContent)
Output only.
Comment
setId(String id)
Output only.
Comment
setKind(String kind)
Output only.
Comment
setModifiedTime(com.google.api.client.util.DateTime modifiedTime)
The last time the comment or any of its replies was modified (RFC 3339 date-time).
Comment
setQuotedFileContent(Comment.QuotedFileContent quotedFileContent)
The file content to which the comment refers, typically within the anchor region.
Comment
setReplies(List<Reply> replies)
Output only.
Comment
setResolved(Boolean resolved)
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 [Manage comments and
replies](https://developers.google.com/drive/api/v3/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 [Manage comments and
replies](https://developers.google.com/drive/api/v3/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
-
getContent
public String getContent()
The plain text content of the comment. This field is used for setting the content, while
`htmlContent` should be displayed.
- Returns:
- value or
null
for none
-
setContent
public Comment setContent(String content)
The plain text content of the comment. This field is used for setting the content, while
`htmlContent` should be displayed.
- Parameters:
content
- content or null
for none
-
getCreatedTime
public com.google.api.client.util.DateTime getCreatedTime()
The time at which the comment was created (RFC 3339 date-time).
- Returns:
- value or
null
for none
-
setCreatedTime
public Comment setCreatedTime(com.google.api.client.util.DateTime createdTime)
The time at which the comment was created (RFC 3339 date-time).
- Parameters:
createdTime
- createdTime or null
for none
-
getDeleted
public Boolean getDeleted()
Output only. Whether the comment has been deleted. A deleted comment has no content.
- Returns:
- value or
null
for none
-
setDeleted
public Comment setDeleted(Boolean deleted)
Output only. Whether the comment has been deleted. A deleted comment has no content.
- Parameters:
deleted
- deleted or null
for none
-
getHtmlContent
public String getHtmlContent()
Output only. The content of the comment with HTML formatting.
- Returns:
- value or
null
for none
-
setHtmlContent
public Comment setHtmlContent(String htmlContent)
Output only. The content of the comment with HTML formatting.
- Parameters:
htmlContent
- htmlContent or null
for none
-
getId
public String getId()
Output only. The ID of the comment.
- Returns:
- value or
null
for none
-
setId
public Comment setId(String id)
Output only. The ID of the comment.
- Parameters:
id
- id or null
for none
-
getKind
public String getKind()
Output only. Identifies what kind of resource this is. Value: the fixed string
`"drive#comment"`.
- Returns:
- value or
null
for none
-
setKind
public Comment setKind(String kind)
Output only. Identifies what kind of resource this is. Value: the fixed string
`"drive#comment"`.
- Parameters:
kind
- kind or null
for none
-
getModifiedTime
public com.google.api.client.util.DateTime getModifiedTime()
The last time the comment or any of its replies was modified (RFC 3339 date-time).
- Returns:
- value or
null
for none
-
setModifiedTime
public Comment setModifiedTime(com.google.api.client.util.DateTime modifiedTime)
The last time the comment or any of its replies was modified (RFC 3339 date-time).
- Parameters:
modifiedTime
- modifiedTime or null
for none
-
getQuotedFileContent
public Comment.QuotedFileContent getQuotedFileContent()
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.
- Returns:
- value or
null
for none
-
setQuotedFileContent
public Comment setQuotedFileContent(Comment.QuotedFileContent quotedFileContent)
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.
- Parameters:
quotedFileContent
- quotedFileContent or null
for none
-
getReplies
public List<Reply> getReplies()
Output only. The full list of replies to the comment in chronological order.
- Returns:
- value or
null
for none
-
setReplies
public Comment setReplies(List<Reply> replies)
Output only. The full list of replies to the comment in chronological order.
- Parameters:
replies
- replies or null
for none
-
getResolved
public Boolean getResolved()
Output only. Whether the comment has been resolved by one of its replies.
- Returns:
- value or
null
for none
-
setResolved
public Comment setResolved(Boolean resolved)
Output only. Whether the comment has been resolved by one of its replies.
- Parameters:
resolved
- resolved 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.
© 2015 - 2024 Weber Informatics LLC | Privacy Policy