Class: Google::Apis::DriveV3::Comment

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

Overview

A comment on a file.

Defined Under Namespace

Classes: QuotedFileContent

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Comment

Returns a new instance of Comment.



368
369
370
# File 'generated/google/apis/drive_v3/classes.rb', line 368

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

Instance Attribute Details

#anchorString

A region of the document represented as a JSON string. See anchor documentation for details on how to define and interpret anchor properties. Corresponds to the JSON property anchor

Returns:

  • (String)


304
305
306
# File 'generated/google/apis/drive_v3/classes.rb', line 304

def anchor
  @anchor
end

#authorGoogle::Apis::DriveV3::User

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



309
310
311
# File 'generated/google/apis/drive_v3/classes.rb', line 309

def author
  @author
end

#contentString

The plain text content of the comment. This field is used for setting the content, while htmlContent should be displayed. Corresponds to the JSON property content

Returns:

  • (String)


315
316
317
# File 'generated/google/apis/drive_v3/classes.rb', line 315

def content
  @content
end

#created_timeDateTime

The time at which the comment was created (RFC 3339 date-time). Corresponds to the JSON property createdTime

Returns:

  • (DateTime)


320
321
322
# File 'generated/google/apis/drive_v3/classes.rb', line 320

def created_time
  @created_time
end

#deletedBoolean Also known as: deleted?

Whether the comment has been deleted. A deleted comment has no content. Corresponds to the JSON property deleted

Returns:

  • (Boolean)


325
326
327
# File 'generated/google/apis/drive_v3/classes.rb', line 325

def deleted
  @deleted
end

#html_contentString

The content of the comment with HTML formatting. Corresponds to the JSON property htmlContent

Returns:

  • (String)


331
332
333
# File 'generated/google/apis/drive_v3/classes.rb', line 331

def html_content
  @html_content
end

#idString

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

Returns:

  • (String)


336
337
338
# File 'generated/google/apis/drive_v3/classes.rb', line 336

def id
  @id
end

#kindString

Identifies what kind of resource this is. Value: the fixed string "drive# comment". Corresponds to the JSON property kind

Returns:

  • (String)


342
343
344
# File 'generated/google/apis/drive_v3/classes.rb', line 342

def kind
  @kind
end

#modified_timeDateTime

The last time the comment or any of its replies was modified (RFC 3339 date- time). Corresponds to the JSON property modifiedTime

Returns:

  • (DateTime)


348
349
350
# File 'generated/google/apis/drive_v3/classes.rb', line 348

def modified_time
  @modified_time
end

#quoted_file_contentGoogle::Apis::DriveV3::Comment::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. Corresponds to the JSON property quotedFileContent



355
356
357
# File 'generated/google/apis/drive_v3/classes.rb', line 355

def quoted_file_content
  @quoted_file_content
end

#repliesArray<Google::Apis::DriveV3::Reply>

The full list of replies to the comment in chronological order. Corresponds to the JSON property replies

Returns:



360
361
362
# File 'generated/google/apis/drive_v3/classes.rb', line 360

def replies
  @replies
end

#resolvedBoolean Also known as: resolved?

Whether the comment has been resolved by one of its replies. Corresponds to the JSON property resolved

Returns:

  • (Boolean)


365
366
367
# File 'generated/google/apis/drive_v3/classes.rb', line 365

def resolved
  @resolved
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



373
374
375
376
377
378
379
380
381
382
383
384
385
386
# File 'generated/google/apis/drive_v3/classes.rb', line 373

def update!(**args)
  @anchor = args[:anchor] if args.key?(:anchor)
  @author = args[:author] if args.key?(:author)
  @content = args[:content] if args.key?(:content)
  @created_time = args[:created_time] if args.key?(:created_time)
  @deleted = args[:deleted] if args.key?(:deleted)
  @html_content = args[:html_content] if args.key?(:html_content)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @modified_time = args[:modified_time] if args.key?(:modified_time)
  @quoted_file_content = args[:quoted_file_content] if args.key?(:quoted_file_content)
  @replies = args[:replies] if args.key?(:replies)
  @resolved = args[:resolved] if args.key?(:resolved)
end