Google Cloud Discovery Engine V1 Client - Class CustomerPolicyEnforcementResult (1.17.0)

Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class CustomerPolicyEnforcementResult.

Customer policy enforcement results. Contains the results of the various policy checks, like the banned phrases or the Model Armor checks.

Generated from protobuf message google.cloud.discoveryengine.v1.AssistAnswer.CustomerPolicyEnforcementResult

Namespace

Google \ Cloud \ DiscoveryEngine \ V1 \ AssistAnswer

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ verdict int

Final verdict of the customer policy enforcement. If only one policy blocked the processing, the verdict is BLOCK.

↳ policy_results array<CustomerPolicyEnforcementResult\PolicyEnforcementResult>

Customer policy enforcement results. Populated only if the assist call was skipped due to a policy violation. It contains results from those filters that blocked the processing of the query.

↳ violation_source int

Output only. The source of the violation.

getVerdict

Final verdict of the customer policy enforcement. If only one policy blocked the processing, the verdict is BLOCK.

Returns
Type Description
int Enum of type Verdict.

setVerdict

Final verdict of the customer policy enforcement. If only one policy blocked the processing, the verdict is BLOCK.

Parameter
Name Description
var int

Enum of type Verdict.

Returns
Type Description
$this

getPolicyResults

Customer policy enforcement results.

Populated only if the assist call was skipped due to a policy violation. It contains results from those filters that blocked the processing of the query.

Returns
Type Description
Google\Protobuf\RepeatedField<CustomerPolicyEnforcementResult\PolicyEnforcementResult>

setPolicyResults

Customer policy enforcement results.

Populated only if the assist call was skipped due to a policy violation. It contains results from those filters that blocked the processing of the query.

Parameter
Name Description
var array<CustomerPolicyEnforcementResult\PolicyEnforcementResult>
Returns
Type Description
$this

getViolationSource

Output only. The source of the violation.

Returns
Type Description
int Enum of type ViolationSource.

setViolationSource

Output only. The source of the violation.

Parameter
Name Description
var int

Enum of type ViolationSource.

Returns
Type Description
$this