target.apidocs.com.google.api.services.drive.model.Comment.html Maven / Gradle / Ivy
Comment (Drive API v3-rev20210612-1.31.5)
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 GenericJson
A comment on 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 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
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()
The author of the comment.
String
getContent()
The plain text content of the comment.
DateTime
getCreatedTime()
The time at which the comment was created (RFC 3339 date-time).
Boolean
getDeleted()
Whether the comment has been deleted.
String
getHtmlContent()
The content of the comment with HTML formatting.
String
getId()
The ID of the comment.
String
getKind()
Identifies what kind of resource this is.
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()
The full list of replies to the comment in chronological order.
Boolean
getResolved()
Whether the comment has been resolved by one of its replies.
Comment
set(String fieldName,
Object value)
Comment
setAnchor(String anchor)
A region of the document represented as a JSON string.
Comment
setAuthor(User author)
The author of the comment.
Comment
setContent(String content)
The plain text content of the comment.
Comment
setCreatedTime(DateTime createdTime)
The time at which the comment was created (RFC 3339 date-time).
Comment
setDeleted(Boolean deleted)
Whether the comment has been deleted.
Comment
setHtmlContent(String htmlContent)
The content of the comment with HTML formatting.
Comment
setId(String id)
The ID of the comment.
Comment
setKind(String kind)
Identifies what kind of resource this is.
Comment
setModifiedTime(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)
The full list of replies to the comment in chronological order.
Comment
setResolved(Boolean resolved)
Whether the comment has been resolved by one of its replies.
-
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.
- 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.
- Parameters:
anchor
- anchor or null
for none
-
getAuthor
public User getAuthor()
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)
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 DateTime getCreatedTime()
The time at which the comment was created (RFC 3339 date-time).
- Returns:
- value or
null
for none
-
setCreatedTime
public Comment setCreatedTime(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()
Whether the comment has been deleted. A deleted comment has no content.
- Returns:
- value or
null
for none
-
setDeleted
public Comment setDeleted(Boolean deleted)
Whether the comment has been deleted. A deleted comment has no content.
- Parameters:
deleted
- deleted or null
for none
-
getHtmlContent
public String getHtmlContent()
The content of the comment with HTML formatting.
- Returns:
- value or
null
for none
-
setHtmlContent
public Comment setHtmlContent(String htmlContent)
The content of the comment with HTML formatting.
- Parameters:
htmlContent
- htmlContent or null
for none
-
getId
public String getId()
The ID of the comment.
- Returns:
- value or
null
for none
-
getKind
public String getKind()
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)
Identifies what kind of resource this is. Value: the fixed string "drive#comment".
- Parameters:
kind
- kind or null
for none
-
getModifiedTime
public 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(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()
The full list of replies to the comment in chronological order.
- Returns:
- value or
null
for none
-
setReplies
public Comment setReplies(List<Reply> replies)
The full list of replies to the comment in chronological order.
- Parameters:
replies
- replies or null
for none
-
getResolved
public Boolean getResolved()
Whether the comment has been resolved by one of its replies.
- Returns:
- value or
null
for none
-
setResolved
public Comment setResolved(Boolean resolved)
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 GenericJson
-
clone
public Comment clone()
- Overrides:
clone
in class GenericJson
Copyright © 2011–2021 Google. All rights reserved.