Class: Google::Apis::DriveV2::Comment

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/drive_v2/classes.rb,
lib/google/apis/drive_v2/representations.rb,
lib/google/apis/drive_v2/representations.rb

Overview

A comment on a file in Google Drive.

Defined Under Namespace

Classes: Context

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Comment

Returns a new instance of Comment.



1157
1158
1159
# File 'lib/google/apis/drive_v2/classes.rb', line 1157

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#anchorString

A region of the document represented as a JSON string. For details on defining anchor properties, refer to Manage comments and replies. Corresponds to the JSON property anchor

Returns:

  • (String)


1078
1079
1080
# File 'lib/google/apis/drive_v2/classes.rb', line 1078

def anchor
  @anchor
end

#authorGoogle::Apis::DriveV2::User

Information about a Drive user. Corresponds to the JSON property author



1083
1084
1085
# File 'lib/google/apis/drive_v2/classes.rb', line 1083

def author
  @author
end

#comment_idString

The ID of the comment. Corresponds to the JSON property commentId

Returns:

  • (String)


1088
1089
1090
# File 'lib/google/apis/drive_v2/classes.rb', line 1088

def comment_id
  @comment_id
end

#contentString

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. Corresponds to the JSON property content

Returns:

  • (String)


1094
1095
1096
# File 'lib/google/apis/drive_v2/classes.rb', line 1094

def content
  @content
end

#contextGoogle::Apis::DriveV2::Comment::Context

Context of a file which is being commented on. Corresponds to the JSON property context



1099
1100
1101
# File 'lib/google/apis/drive_v2/classes.rb', line 1099

def context
  @context
end

#created_dateDateTime

The date when this comment was first created. Corresponds to the JSON property createdDate

Returns:

  • (DateTime)


1104
1105
1106
# File 'lib/google/apis/drive_v2/classes.rb', line 1104

def created_date
  @created_date
end

#deletedBoolean Also known as: deleted?

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. Corresponds to the JSON property deleted

Returns:

  • (Boolean)


1111
1112
1113
# File 'lib/google/apis/drive_v2/classes.rb', line 1111

def deleted
  @deleted
end

#file_idString

The file which this comment is addressing. Corresponds to the JSON property fileId

Returns:

  • (String)


1117
1118
1119
# File 'lib/google/apis/drive_v2/classes.rb', line 1117

def file_id
  @file_id
end

#file_titleString

The title of the file which this comment is addressing. Corresponds to the JSON property fileTitle

Returns:

  • (String)


1122
1123
1124
# File 'lib/google/apis/drive_v2/classes.rb', line 1122

def file_title
  @file_title
end

#html_contentString

HTML formatted content for this comment. Corresponds to the JSON property htmlContent

Returns:

  • (String)


1127
1128
1129
# File 'lib/google/apis/drive_v2/classes.rb', line 1127

def html_content
  @html_content
end

#kindString

This is always drive#comment. Corresponds to the JSON property kind

Returns:

  • (String)


1132
1133
1134
# File 'lib/google/apis/drive_v2/classes.rb', line 1132

def kind
  @kind
end

#modified_dateDateTime

The date when this comment or any of its replies were last modified. Corresponds to the JSON property modifiedDate

Returns:

  • (DateTime)


1137
1138
1139
# File 'lib/google/apis/drive_v2/classes.rb', line 1137

def modified_date
  @modified_date
end

#repliesArray<Google::Apis::DriveV2::CommentReply>

Replies to this post. Corresponds to the JSON property replies



1142
1143
1144
# File 'lib/google/apis/drive_v2/classes.rb', line 1142

def replies
  @replies
end

A link back to this comment. Corresponds to the JSON property selfLink

Returns:

  • (String)


1147
1148
1149
# File 'lib/google/apis/drive_v2/classes.rb', line 1147

def self_link
  @self_link
end

#statusString

The status of this comment. Status can be changed by posting a reply to a comment with the desired status. Possible values are: * open - The comment is still open. * resolved - The comment has been resolved by one of its replies. Corresponds to the JSON property status

Returns:

  • (String)


1155
1156
1157
# File 'lib/google/apis/drive_v2/classes.rb', line 1155

def status
  @status
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
# File 'lib/google/apis/drive_v2/classes.rb', line 1162

def update!(**args)
  @anchor = args[:anchor] if args.key?(:anchor)
  @author = args[:author] if args.key?(:author)
  @comment_id = args[:comment_id] if args.key?(:comment_id)
  @content = args[:content] if args.key?(:content)
  @context = args[:context] if args.key?(:context)
  @created_date = args[:created_date] if args.key?(:created_date)
  @deleted = args[:deleted] if args.key?(:deleted)
  @file_id = args[:file_id] if args.key?(:file_id)
  @file_title = args[:file_title] if args.key?(:file_title)
  @html_content = args[:html_content] if args.key?(:html_content)
  @kind = args[:kind] if args.key?(:kind)
  @modified_date = args[:modified_date] if args.key?(:modified_date)
  @replies = args[:replies] if args.key?(:replies)
  @self_link = args[:self_link] if args.key?(:self_link)
  @status = args[:status] if args.key?(:status)
end