Google Cloud Ai Platform V1 Client - Class SafetySetting (1.7.0)

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

Safety settings.

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

Namespace

Google \ Cloud \ AIPlatform \ V1

Methods

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

↳ 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

Required. Harm category.

Returns
Type Description
int

setCategory

Required. Harm category.

Parameter
Name Description
var int
Returns
Type Description
$this

getThreshold

Required. The harm block threshold.

Returns
Type Description
int

setThreshold

Required. The harm block threshold.

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

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
Returns
Type Description
$this

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月08日 UTC.