# Google Cloud Contact Center Insights V1 Client - Class SentimentData (2.4.2)

2.4.2 (latest) 2.4.1 2.3.3 2.2.1 2.1.1 2.0.1 1.9.5 1.8.0 1.7.1 1.6.2 1.5.0 1.4.1 1.3.0 1.2.1 1.1.0 1.0.3 Reference documentation and code samples for the Google Cloud Contact Center Insights V1 Client class SentimentData.

The data for a sentiment annotation.

Generated from protobuf message `google.cloud.contactcenterinsights.v1.SentimentData`

## Namespace

Google \\ Cloud \\ ContactCenterInsights \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ magnitude` | `float` A non-negative number from 0 to infinity which represents the abolute magnitude of sentiment regardless of score. |
| `↳ score` | `float` The sentiment score between -1.0 (negative) and 1.0 (positive). |

### getMagnitude

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setMagnitude

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `float` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getScore

The sentiment score between -1.0 (negative) and 1.0 (positive).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setScore

The sentiment score between -1.0 (negative) and 1.0 (positive).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `float` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |