Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class SafetySetting.
Safety settings.
Generated from protobuf message google.cloud.discoveryengine.v1.AnswerQueryRequest.SafetySpec.SafetySetting
Namespace
Google \ Cloud \ DiscoveryEngine \ V1 \ AnswerQueryRequest \ SafetySpecMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ category |
int
Required. Harm category. |
↳ threshold |
int
Required. The harm block threshold. |
getCategory
Required. Harm category.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type HarmCategory. |
setCategory
Required. Harm category.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type HarmCategory. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getThreshold
Required. The harm block threshold.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type HarmBlockThreshold. |
setThreshold
Required. The harm block threshold.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type HarmBlockThreshold. |
| Returns | |
|---|---|
| Type | Description |
$this |
|