Class: Google::Apis::ContactcenterinsightsV1::GoogleCloudContactcenterinsightsV1alpha1SentimentData

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

Overview

The data for a sentiment annotation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudContactcenterinsightsV1alpha1SentimentData

Returns a new instance of GoogleCloudContactcenterinsightsV1alpha1SentimentData.



6753
6754
6755
# File 'lib/google/apis/contactcenterinsights_v1/classes.rb', line 6753

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

Instance Attribute Details

#magnitudeFloat

A non-negative number from 0 to infinity which represents the abolute magnitude of sentiment regardless of score. Corresponds to the JSON property magnitude

Returns:

  • (Float)


6746
6747
6748
# File 'lib/google/apis/contactcenterinsights_v1/classes.rb', line 6746

def magnitude
  @magnitude
end

#scoreFloat

The sentiment score between -1.0 (negative) and 1.0 (positive). Corresponds to the JSON property score

Returns:

  • (Float)


6751
6752
6753
# File 'lib/google/apis/contactcenterinsights_v1/classes.rb', line 6751

def score
  @score
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6758
6759
6760
6761
# File 'lib/google/apis/contactcenterinsights_v1/classes.rb', line 6758

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