Google Cloud Ai Platform V1 Client - Class SafetyRating (1.13.1)

Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class SafetyRating.

Safety rating corresponding to the generated content.

Generated from protobuf message google.cloud.aiplatform.v1.SafetyRating

Namespace

Google \ Cloud \ AIPlatform \ V1

Methods

__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

setCategory

Output only. Harm category.

Parameter
Name Description
var int
Returns
Type Description
$this

getProbability

Output only. Harm probability levels in the content.

Returns
Type Description
int

setProbability

Output only. Harm probability levels in the content.

Parameter
Name Description
var int
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

setSeverity

Output only. Harm severity levels in the content.

Parameter
Name Description
var int
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