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

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

Overview

Information about the claim rating.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleFactcheckingFactchecktoolsV1alpha1ClaimRating

Returns a new instance of GoogleFactcheckingFactchecktoolsV1alpha1ClaimRating.



138
139
140
# File 'lib/google/apis/factchecktools_v1alpha1/classes.rb', line 138

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)


108
109
110
# File 'lib/google/apis/factchecktools_v1alpha1/classes.rb', line 108

def best_rating
  @best_rating
end

#image_urlString

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

Returns:

  • (String)


113
114
115
# File 'lib/google/apis/factchecktools_v1alpha1/classes.rb', line 113

def image_url
  @image_url
end

#rating_explanationString

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

Returns:

  • (String)


118
119
120
# File 'lib/google/apis/factchecktools_v1alpha1/classes.rb', line 118

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)


124
125
126
# File 'lib/google/apis/factchecktools_v1alpha1/classes.rb', line 124

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)


130
131
132
# File 'lib/google/apis/factchecktools_v1alpha1/classes.rb', line 130

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)


136
137
138
# File 'lib/google/apis/factchecktools_v1alpha1/classes.rb', line 136

def worst_rating
  @worst_rating
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



143
144
145
146
147
148
149
150
# File 'lib/google/apis/factchecktools_v1alpha1/classes.rb', line 143

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