Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class SafetyRating.
Safety rating corresponding to the generated content.
Generated from protobuf message google.cloud.discoveryengine.v1.SafetyRating
Namespace
Google \ Cloud \ DiscoveryEngine \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ category |
int
Output only. Harm category. |
↳ probability |
int
Output only. Harm probability levels in the content. |
↳ probability_score |
float
Output only. Harm probability score. |
↳ severity |
int
Output only. Harm severity levels in the content. |
↳ severity_score |
float
Output only. Harm severity score. |
↳ blocked |
bool
Output only. Indicates whether the content was filtered out because of this rating. |
getCategory
Output only. Harm category.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type HarmCategory. |
setCategory
Output only. Harm category.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type HarmCategory. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getProbability
Output only. Harm probability levels in the content.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type HarmProbability. |
setProbability
Output only. Harm probability levels in the content.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type HarmProbability. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getProbabilityScore
Output only. Harm probability score.
| Returns | |
|---|---|
| Type | Description |
float |
|
setProbabilityScore
Output only. Harm probability score.
| Parameter | |
|---|---|
| Name | Description |
var |
float
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSeverity
Output only. Harm severity levels in the content.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type HarmSeverity. |
setSeverity
Output only. Harm severity levels in the content.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type HarmSeverity. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSeverityScore
Output only. Harm severity score.
| Returns | |
|---|---|
| Type | Description |
float |
|
setSeverityScore
Output only. Harm severity score.
| Parameter | |
|---|---|
| Name | Description |
var |
float
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getBlocked
Output only. Indicates whether the content was filtered out because of this rating.
| Returns | |
|---|---|
| Type | Description |
bool |
|
setBlocked
Output only. Indicates whether the content was filtered out because of this rating.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|