Class: Google::Apis::CommentanalyzerV1alpha1::AnalyzeCommentResponse
- Inherits:
-
Object
- Object
- Google::Apis::CommentanalyzerV1alpha1::AnalyzeCommentResponse
- Defined in:
- generated/google/apis/commentanalyzer_v1alpha1/classes.rb,
generated/google/apis/commentanalyzer_v1alpha1/representations.rb,
generated/google/apis/commentanalyzer_v1alpha1/representations.rb
Overview
The comment analysis response message.
Instance Attribute Summary collapse
-
#attribute_scores ⇒ Hash<String,Google::Apis::CommentanalyzerV1alpha1::AttributeScores>
Scores for the requested attributes.
-
#client_token ⇒ String
Same token from the original AnalyzeCommentRequest.
-
#detected_languages ⇒ Array<String>
Contains the language as detected from the text content.
-
#languages ⇒ Array<String>
The language(s) requested by the client, as specified in the request.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AnalyzeCommentResponse
constructor
A new instance of AnalyzeCommentResponse.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ AnalyzeCommentResponse
Returns a new instance of AnalyzeCommentResponse
156 157 158 |
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 156 def initialize(**args) update!(**args) end |
Instance Attribute Details
#attribute_scores ⇒ Hash<String,Google::Apis::CommentanalyzerV1alpha1::AttributeScores>
Scores for the requested attributes. The map keys are attribute names (same
as the requested_attribute field in AnalyzeCommentRequest, for example
"ATTACK_ON_AUTHOR", "INFLAMMATORY", etc).
Corresponds to the JSON property attributeScores
135 136 137 |
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 135 def attribute_scores @attribute_scores end |
#client_token ⇒ String
Same token from the original AnalyzeCommentRequest.
Corresponds to the JSON property clientToken
140 141 142 |
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 140 def client_token @client_token end |
#detected_languages ⇒ Array<String>
Contains the language as detected from the text content. If no language
was specified in the request, the first (the most likely) language is used
to select an appropriate model. Sorted in order of likelihood.
Corresponds to the JSON property detectedLanguages
147 148 149 |
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 147 def detected_languages @detected_languages end |
#languages ⇒ Array<String>
The language(s) requested by the client, as specified in the request. If
the request did not specify any language, this will be empty and the
detected_languages field will be populated.
Corresponds to the JSON property languages
154 155 156 |
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 154 def languages @languages end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
161 162 163 164 165 166 |
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 161 def update!(**args) @attribute_scores = args[:attribute_scores] if args.key?(:attribute_scores) @client_token = args[:client_token] if args.key?(:client_token) @detected_languages = args[:detected_languages] if args.key?(:detected_languages) @languages = args[:languages] if args.key?(:languages) end |