Class: Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimRating

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

Overview

Information about the claim rating.

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) ⇒ GoogleFactcheckingFactchecktoolsV1alpha1ClaimRating

Returns a new instance of GoogleFactcheckingFactchecktoolsV1alpha1ClaimRating.



141
142
143
# File 'generated/google/apis/factchecktools_v1alpha1/classes.rb', line 141

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

Instance Attribute Details

#best_ratingFixnum

For numeric ratings, the best value possible in the scale from worst to best.
Corresponds to ClaimReview.reviewRating.bestRating. Corresponds to the JSON property bestRating

Returns:

  • (Fixnum)


109
110
111
# File 'generated/google/apis/factchecktools_v1alpha1/classes.rb', line 109

def best_rating
  @best_rating
end

#image_urlString

Corresponds to ClaimReview.reviewRating.image. Corresponds to the JSON property imageUrl

Returns:

  • (String)


114
115
116
# File 'generated/google/apis/factchecktools_v1alpha1/classes.rb', line 114

def image_url
  @image_url
end

#rating_explanationString

Corresponds to ClaimReview.reviewRating.ratingExplanation. Corresponds to the JSON property ratingExplanation

Returns:

  • (String)


119
120
121
# File 'generated/google/apis/factchecktools_v1alpha1/classes.rb', line 119

def rating_explanation
  @rating_explanation
end

#rating_valueFixnum

A numeric rating of this claim, in the range worstRating — bestRating inclusive.
Corresponds to ClaimReview.reviewRating.ratingValue. Corresponds to the JSON property ratingValue

Returns:

  • (Fixnum)


126
127
128
# File 'generated/google/apis/factchecktools_v1alpha1/classes.rb', line 126

def rating_value
  @rating_value
end

#textual_ratingString

The truthfulness rating as a human-readible short word or phrase.
Corresponds to ClaimReview.reviewRating.alternateName. Corresponds to the JSON property textualRating

Returns:

  • (String)


132
133
134
# File 'generated/google/apis/factchecktools_v1alpha1/classes.rb', line 132

def textual_rating
  @textual_rating
end

#worst_ratingFixnum

For numeric ratings, the worst value possible in the scale from worst to best.
Corresponds to ClaimReview.reviewRating.worstRating. Corresponds to the JSON property worstRating

Returns:

  • (Fixnum)


139
140
141
# File 'generated/google/apis/factchecktools_v1alpha1/classes.rb', line 139

def worst_rating
  @worst_rating
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



146
147
148
149
150
151
152
153
# File 'generated/google/apis/factchecktools_v1alpha1/classes.rb', line 146

def update!(**args)
  @best_rating = args[:best_rating] if args.key?(:best_rating)
  @image_url = args[:image_url] if args.key?(:image_url)
  @rating_explanation = args[:rating_explanation] if args.key?(:rating_explanation)
  @rating_value = args[:rating_value] if args.key?(:rating_value)
  @textual_rating = args[:textual_rating] if args.key?(:textual_rating)
  @worst_rating = args[:worst_rating] if args.key?(:worst_rating)
end