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

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

Overview

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.

Defined Under Namespace

Classes: QuotedFileContent

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Comment

Returns a new instance of Comment.



760
761
762
# File 'lib/google/apis/drive_v3/classes.rb', line 760

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)


695
696
697
# File 'lib/google/apis/drive_v3/classes.rb', line 695

def anchor
  @anchor
end

#authorGoogle::Apis::DriveV3::User

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



700
701
702
# File 'lib/google/apis/drive_v3/classes.rb', line 700

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)


706
707
708
# File 'lib/google/apis/drive_v3/classes.rb', line 706

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)


711
712
713
# File 'lib/google/apis/drive_v3/classes.rb', line 711

def created_time
  @created_time
end

#deletedBoolean Also known as: deleted?

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

Returns:

  • (Boolean)


717
718
719
# File 'lib/google/apis/drive_v3/classes.rb', line 717

def deleted
  @deleted
end

#html_contentString

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

Returns:

  • (String)


723
724
725
# File 'lib/google/apis/drive_v3/classes.rb', line 723

def html_content
  @html_content
end

#idString

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

Returns:

  • (String)


728
729
730
# File 'lib/google/apis/drive_v3/classes.rb', line 728

def id
  @id
end

#kindString

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

Returns:

  • (String)


734
735
736
# File 'lib/google/apis/drive_v3/classes.rb', line 734

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)


740
741
742
# File 'lib/google/apis/drive_v3/classes.rb', line 740

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



747
748
749
# File 'lib/google/apis/drive_v3/classes.rb', line 747

def quoted_file_content
  @quoted_file_content
end

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

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

Returns:



752
753
754
# File 'lib/google/apis/drive_v3/classes.rb', line 752

def replies
  @replies
end

#resolvedBoolean Also known as: resolved?

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

Returns:

  • (Boolean)


757
758
759
# File 'lib/google/apis/drive_v3/classes.rb', line 757

def resolved
  @resolved
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



765
766
767
768
769
770
771
772
773
774
775
776
777
778
# File 'lib/google/apis/drive_v3/classes.rb', line 765

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