Class: Google::Apis::CommentanalyzerV1alpha1::Context

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

Overview

Context is typically something that a Comment is referencing or replying to (such as an article, or previous comment). Note: Populate only ONE OF the following fields. The oneof syntax cannot be used because that would require nesting entries inside another message and breaking backwards compatibility. The server will return an error if more than one of the following fields is present.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Context

Returns a new instance of Context.



271
272
273
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 271

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

Instance Attribute Details

#article_and_parent_commentGoogle::Apis::CommentanalyzerV1alpha1::ArticleAndParentComment

A type of context specific to a comment left on a single-threaded comment message board, where comments are either a top level comment or the child of a top level comment. Corresponds to the JSON property articleAndParentComment



264
265
266
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 264

def article_and_parent_comment
  @article_and_parent_comment
end

#entriesArray<Google::Apis::CommentanalyzerV1alpha1::TextEntry>

A list of messages. For example, a linear comments section or forum thread. Corresponds to the JSON property entries



269
270
271
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 269

def entries
  @entries
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



276
277
278
279
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 276

def update!(**args)
  @article_and_parent_comment = args[:article_and_parent_comment] if args.key?(:article_and_parent_comment)
  @entries = args[:entries] if args.key?(:entries)
end