Reference documentation and code samples for the Google Cloud Retail V2 Client class SafetySetting.
Safety settings.
Generated from protobuf message google.cloud.retail.v2.SafetySetting
Namespace
Google \ Cloud \ Retail \ V2Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ category |
int
Harm category. |
↳ threshold |
int
The harm block threshold. |
↳ method |
int
Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. |
getCategory
Harm category.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type HarmCategory. |
setCategory
Harm category.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type HarmCategory. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getThreshold
The harm block threshold.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type HarmBlockThreshold. |
setThreshold
The harm block threshold.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type HarmBlockThreshold. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMethod
Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type HarmBlockMethod. |
setMethod
Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type HarmBlockMethod. |
| Returns | |
|---|---|
| Type | Description |
$this |
|