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

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
NameDescription
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.

↳ blocked bool

Output only. Indicates whether the content was filtered out because of this rating.

getCategory

Output only. Harm category.

Returns
TypeDescription
int

setCategory

Output only. Harm category.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getProbability

Output only. Harm probability levels in the content.

Returns
TypeDescription
int

setProbability

Output only. Harm probability levels in the content.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getBlocked

Output only. Indicates whether the content was filtered out because of this rating.

Returns
TypeDescription
bool

setBlocked

Output only. Indicates whether the content was filtered out because of this rating.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this