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

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

AssistAnswer resource, main part of AssistResponse.

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

Namespace

Google \ Cloud \ DiscoveryEngine \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

Immutable. Identifier. Resource name of the AssistAnswer. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer} This field must be a UTF-8 encoded string with a length limit of 1024 characters.

↳ state int

State of the answer generation.

↳ connector_display_names array|Google\Protobuf\Internal\MapField

Output only. Maps an internal connector agent name (the machine identifier embedded in tool names, e.g. custom_mcp_<fingerprint>_agent) to the connector's human-readable display name. Populated at serving time for custom MCP / agent gateway connectors so user-facing surfaces (e.g. the tool-call chip) can show the connector name instead of its internal identifier. Empty when there are no such connectors.

↳ replies array<AssistAnswer\Reply>

Replies of the assistant.

↳ assist_skipped_reasons int[]

Reasons for not answering the assist call.

↳ customer_policy_enforcement_result AssistAnswer\CustomerPolicyEnforcementResult

Optional. The field contains information about the various policy checks' results like the banned phrases or the Model Armor checks. This field is populated only if the assist call was skipped due to a policy violation.

getName

Immutable. Identifier. Resource name of the AssistAnswer.

Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer} This field must be a UTF-8 encoded string with a length limit of 1024 characters.

Returns
Type Description
string

setName

Immutable. Identifier. Resource name of the AssistAnswer.

Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer} This field must be a UTF-8 encoded string with a length limit of 1024 characters.

Parameter
Name Description
var string
Returns
Type Description
$this

getState

State of the answer generation.

Returns
Type Description
int Enum of type State.

setState

State of the answer generation.

Parameter
Name Description
var int

Enum of type State.

Returns
Type Description
$this

getConnectorDisplayNames

Output only. Maps an internal connector agent name (the machine identifier embedded in tool names, e.g. custom_mcp_<fingerprint>_agent) to the connector's human-readable display name. Populated at serving time for custom MCP / agent gateway connectors so user-facing surfaces (e.g. the tool-call chip) can show the connector name instead of its internal identifier. Empty when there are no such connectors.

Returns
Type Description
Google\Protobuf\Internal\MapField

setConnectorDisplayNames

Output only. Maps an internal connector agent name (the machine identifier embedded in tool names, e.g. custom_mcp_<fingerprint>_agent) to the connector's human-readable display name. Populated at serving time for custom MCP / agent gateway connectors so user-facing surfaces (e.g. the tool-call chip) can show the connector name instead of its internal identifier. Empty when there are no such connectors.

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this

getReplies

Replies of the assistant.

Returns
Type Description
Google\Protobuf\RepeatedField<AssistAnswer\Reply>

setReplies

Replies of the assistant.

Parameter
Name Description
var array<AssistAnswer\Reply>
Returns
Type Description
$this

getAssistSkippedReasons

Reasons for not answering the assist call.

Returns
Type Description
Google\Protobuf\RepeatedField<int>

setAssistSkippedReasons

Reasons for not answering the assist call.

Parameter
Name Description
var int[]
Returns
Type Description
$this

getCustomerPolicyEnforcementResult

Optional. The field contains information about the various policy checks' results like the banned phrases or the Model Armor checks. This field is populated only if the assist call was skipped due to a policy violation.

Returns
Type Description
AssistAnswer\CustomerPolicyEnforcementResult|null

hasCustomerPolicyEnforcementResult

clearCustomerPolicyEnforcementResult

setCustomerPolicyEnforcementResult

Optional. The field contains information about the various policy checks' results like the banned phrases or the Model Armor checks. This field is populated only if the assist call was skipped due to a policy violation.

Parameter
Name Description
var AssistAnswer\CustomerPolicyEnforcementResult
Returns
Type Description
$this