# Google Cloud Discovery Engine V1 Client - Class SafetyAttributes (1.11.1)

1.11.1 (latest) 1.11.0 1.10.1 1.9.1 1.8.0 1.7.0 1.6.1 1.5.1 1.4.0 1.3.3 1.2.0 1.1.0 1.0.0 0.11.3 0.8.0 0.7.1 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class SafetyAttributes.

Safety Attribute categories and their associated confidence scores.

Generated from protobuf message `google.cloud.discoveryengine.v1.SearchResponse.Summary.SafetyAttributes`

## Namespace

Google \\ Cloud \\ DiscoveryEngine \\ V1 \\ SearchResponse \\ Summary

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ categories` | `string[]` The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. |
| `↳ scores` | `float[]` The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. |

### getCategories

The display names of Safety Attribute categories associated with the
generated content. Order matches the Scores.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setCategories

The display names of Safety Attribute categories associated with the
generated content. Order matches the Scores.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

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

### getScores

The confidence scores of the each category, higher
value means higher confidence. Order matches the Categories.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<float>` |   |

### setScores

The confidence scores of the each category, higher
value means higher confidence. Order matches the Categories.

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

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