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



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

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_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)


121
122
123
# File 'generated/google/apis/factchecktools_v1alpha1/classes.rb', line 121

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)


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

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)


134
135
136
# File 'generated/google/apis/factchecktools_v1alpha1/classes.rb', line 134

def worst_rating
  @worst_rating
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

def update!(**args)
  @best_rating = args[:best_rating] if args.key?(:best_rating)
  @image_url = args[:image_url] if args.key?(:image_url)
  @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