Class: Google::Apis::CommentanalyzerV1alpha1::Score

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

Analysis scores are described by a value and a ScoreType.

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

Returns a new instance of Score.



296
297
298
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 296

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

Instance Attribute Details

#typeString

The type of the above value. Corresponds to the JSON property type

Returns:

  • (String)


289
290
291
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 289

def type
  @type
end

#valueFloat

Score value. Semantics described by type below. Corresponds to the JSON property value

Returns:

  • (Float)


294
295
296
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 294

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



301
302
303
304
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 301

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