Class AssistAnswer.CustomerPolicyEnforcementResult (0.90.0)

public static final class AssistAnswer.CustomerPolicyEnforcementResult extends GeneratedMessage 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

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessage > AssistAnswer.CustomerPolicyEnforcementResult

Static Fields

POLICY_RESULTS_FIELD_NUMBER

public static final int POLICY_RESULTS_FIELD_NUMBER
Field Value
Type Description
int

VERDICT_FIELD_NUMBER

public static final int VERDICT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AssistAnswer.CustomerPolicyEnforcementResult getDefaultInstance()
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult

getDescriptor()

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

newBuilder()

public static AssistAnswer.CustomerPolicyEnforcementResult.Builder newBuilder()
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder

newBuilder(AssistAnswer.CustomerPolicyEnforcementResult prototype)

public static AssistAnswer.CustomerPolicyEnforcementResult.Builder newBuilder(AssistAnswer.CustomerPolicyEnforcementResult prototype)
Parameter
Name Description
prototype AssistAnswer.CustomerPolicyEnforcementResult
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder

parseDelimitedFrom(InputStream input)

public static AssistAnswer.CustomerPolicyEnforcementResult parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AssistAnswer.CustomerPolicyEnforcementResult parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static AssistAnswer.CustomerPolicyEnforcementResult parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AssistAnswer.CustomerPolicyEnforcementResult parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AssistAnswer.CustomerPolicyEnforcementResult parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AssistAnswer.CustomerPolicyEnforcementResult parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AssistAnswer.CustomerPolicyEnforcementResult parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AssistAnswer.CustomerPolicyEnforcementResult parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static AssistAnswer.CustomerPolicyEnforcementResult parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AssistAnswer.CustomerPolicyEnforcementResult parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static AssistAnswer.CustomerPolicyEnforcementResult parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AssistAnswer.CustomerPolicyEnforcementResult parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<AssistAnswer.CustomerPolicyEnforcementResult> parser()
Returns
Type Description
Parser<CustomerPolicyEnforcementResult>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

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

getParserForType()

public Parser<AssistAnswer.CustomerPolicyEnforcementResult> getParserForType()
Returns
Type Description
Parser<CustomerPolicyEnforcementResult>
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

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>

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public AssistAnswer.CustomerPolicyEnforcementResult.Builder newBuilderForType()
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected AssistAnswer.CustomerPolicyEnforcementResult.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder
Overrides

toBuilder()

public AssistAnswer.CustomerPolicyEnforcementResult.Builder toBuilder()
Returns
Type Description
AssistAnswer.CustomerPolicyEnforcementResult.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException