Class AssistAnswer.CustomerPolicyEnforcementResult.Builder (0.90.0)

public static final class AssistAnswer.CustomerPolicyEnforcementResult.Builder extends GeneratedMessage.Builder<AssistAnswer.CustomerPolicyEnforcementResult.Builder> implements AssistAnswer.CustomerPolicyEnforcementResultOrBuilder

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

Protobuf type google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllPolicyResults(Iterable<? extends AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult> values)

public AssistAnswer.CustomerPolicyEnforcementResult.Builder addAllPolicyResults(Iterable<? extends AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult> values)

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.

repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3;

Parameter
Name Description
values Iterable<? extends com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult>
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder

addPolicyResults(AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult value)

public AssistAnswer.CustomerPolicyEnforcementResult.Builder addPolicyResults(AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult value)

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.

repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3;

Parameter
Name Description
value AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder

addPolicyResults(AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult.Builder builderForValue)

public AssistAnswer.CustomerPolicyEnforcementResult.Builder addPolicyResults(AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult.Builder builderForValue)

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.

repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3;

Parameter
Name Description
builderForValue AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult.Builder
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder

addPolicyResults(int index, AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult value)

public AssistAnswer.CustomerPolicyEnforcementResult.Builder addPolicyResults(int index, AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult value)

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.

repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3;

Parameters
Name Description
index int
value AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder

addPolicyResults(int index, AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult.Builder builderForValue)

public AssistAnswer.CustomerPolicyEnforcementResult.Builder addPolicyResults(int index, AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult.Builder builderForValue)

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.

repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3;

Parameters
Name Description
index int
builderForValue AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult.Builder
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder

addPolicyResultsBuilder()

public AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult.Builder addPolicyResultsBuilder()

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.

repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3;

Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult.Builder

addPolicyResultsBuilder(int index)

public AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult.Builder addPolicyResultsBuilder(int index)

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.

repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3;

Parameter
Name Description
index int
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult.Builder

build()

public AssistAnswer.CustomerPolicyEnforcementResult build()
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult

buildPartial()

public AssistAnswer.CustomerPolicyEnforcementResult buildPartial()
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult

clear()

public AssistAnswer.CustomerPolicyEnforcementResult.Builder clear()
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder
Overrides

clearPolicyResults()

public AssistAnswer.CustomerPolicyEnforcementResult.Builder clearPolicyResults()

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.

repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3;

Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder

clearVerdict()

public AssistAnswer.CustomerPolicyEnforcementResult.Builder clearVerdict()

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

.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Verdict verdict = 1;

Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder

This builder for chaining.

getDefaultInstanceForType()

public AssistAnswer.CustomerPolicyEnforcementResult getDefaultInstanceForType()
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getPolicyResults(int index)

public AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult getPolicyResults(int index)

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.

repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3;

Parameter
Name Description
index int
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult

getPolicyResultsBuilder(int index)

public AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult.Builder getPolicyResultsBuilder(int index)

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.

repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3;

Parameter
Name Description
index int
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult.Builder

getPolicyResultsBuilderList()

public List<AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult.Builder> getPolicyResultsBuilderList()

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.

repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3;

Returns
Type Description
List<Builder>

getPolicyResultsCount()

public int getPolicyResultsCount()

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.

repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3;

Returns
Type Description
int

getPolicyResultsList()

public List<AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult> getPolicyResultsList()

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.

repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3;

Returns
Type Description
List<PolicyEnforcementResult>

getPolicyResultsOrBuilder(int index)

public AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResultOrBuilder getPolicyResultsOrBuilder(int index)

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.

repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3;

Parameter
Name Description
index int
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResultOrBuilder

getPolicyResultsOrBuilderList()

public List<? extends AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResultOrBuilder> getPolicyResultsOrBuilderList()

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.

repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3;

Returns
Type Description
List<? extends com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResultOrBuilder>

getVerdict()

public AssistAnswer.CustomerPolicyEnforcementResult.Verdict getVerdict()

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

.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Verdict verdict = 1;

Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Verdict

The verdict.

getVerdictValue()

public int getVerdictValue()

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

.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Verdict verdict = 1;

Returns
Type Description
int

The enum numeric value on the wire for verdict.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AssistAnswer.CustomerPolicyEnforcementResult other)

public AssistAnswer.CustomerPolicyEnforcementResult.Builder mergeFrom(AssistAnswer.CustomerPolicyEnforcementResult other)
Parameter
Name Description
other AssistAnswer.CustomerPolicyEnforcementResult
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AssistAnswer.CustomerPolicyEnforcementResult.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public AssistAnswer.CustomerPolicyEnforcementResult.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder
Overrides

removePolicyResults(int index)

public AssistAnswer.CustomerPolicyEnforcementResult.Builder removePolicyResults(int index)

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.

repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3;

Parameter
Name Description
index int
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder

setPolicyResults(int index, AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult value)

public AssistAnswer.CustomerPolicyEnforcementResult.Builder setPolicyResults(int index, AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult value)

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.

repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3;

Parameters
Name Description
index int
value AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder

setPolicyResults(int index, AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult.Builder builderForValue)

public AssistAnswer.CustomerPolicyEnforcementResult.Builder setPolicyResults(int index, AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult.Builder builderForValue)

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.

repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3;

Parameters
Name Description
index int
builderForValue AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult.Builder
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder

setVerdict(AssistAnswer.CustomerPolicyEnforcementResult.Verdict value)

public AssistAnswer.CustomerPolicyEnforcementResult.Builder setVerdict(AssistAnswer.CustomerPolicyEnforcementResult.Verdict value)

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

.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Verdict verdict = 1;

Parameter
Name Description
value AssistAnswer.CustomerPolicyEnforcementResult.Verdict

The verdict to set.

Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder

This builder for chaining.

setVerdictValue(int value)

public AssistAnswer.CustomerPolicyEnforcementResult.Builder setVerdictValue(int value)

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

.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Verdict verdict = 1;

Parameter
Name Description
value int

The enum numeric value on the wire for verdict to set.

Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder

This builder for chaining.