# Google Cloud Dialogflow V2 Client - Class KnowledgeAssistAnswer (2.4.0)

2.4.0 (latest) 2.3.1 2.2.1 2.1.2 2.0.1 1.17.2 1.16.0 1.15.1 1.14.0 1.13.0 1.12.3 1.11.0 1.10.2 1.9.0 1.8.0 1.7.2 1.6.0 1.5.0 1.4.0 1.3.2 1.2.0 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class KnowledgeAssistAnswer.

Represents a Knowledge Assist answer.

Generated from protobuf message `google.cloud.dialogflow.v2.KnowledgeAssistAnswer`

## Namespace

Google \\ Cloud \\ Dialogflow \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ suggested_query` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.KnowledgeAssistAnswer.SuggestedQuery` The query suggested based on the context. Suggestion is made only if it is different from the previous suggestion. |
| `↳ suggested_query_answer` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.KnowledgeAssistAnswer.KnowledgeAnswer` The answer generated for the suggested query. Whether or not an answer is generated depends on how confident we are about the generated query. |
| `↳ answer_record` | `string` The name of the answer record. Format: `projects/<Project ID>/locations/<location ID>/answer Records/<Answer Record ID>`. |
| `↳ knowledge_assist_debug_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.KnowledgeAssistDebugInfo` Debug information related to Knowledge Assist feature. |

### getSuggestedQuery

The query suggested based on the context. Suggestion is made only if it
is different from the previous suggestion.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.KnowledgeAssistAnswer.SuggestedQuery|null` |   |

### hasSuggestedQuery

### clearSuggestedQuery

### setSuggestedQuery

The query suggested based on the context. Suggestion is made only if it
is different from the previous suggestion.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.KnowledgeAssistAnswer.SuggestedQuery` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSuggestedQueryAnswer

The answer generated for the suggested query. Whether or not an answer is
generated depends on how confident we are about the generated query.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.KnowledgeAssistAnswer.KnowledgeAnswer|null` |   |

### hasSuggestedQueryAnswer

### clearSuggestedQueryAnswer

### setSuggestedQueryAnswer

The answer generated for the suggested query. Whether or not an answer is
generated depends on how confident we are about the generated query.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.KnowledgeAssistAnswer.KnowledgeAnswer` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAnswerRecord

The name of the answer record.

Format: `projects/<Project ID>/locations/<location ID>/answer
Records/<Answer Record ID>`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setAnswerRecord

The name of the answer record.

Format: `projects/<Project ID>/locations/<location ID>/answer
Records/<Answer Record ID>`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getKnowledgeAssistDebugInfo

Debug information related to Knowledge Assist feature.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.KnowledgeAssistDebugInfo|null` |   |

### hasKnowledgeAssistDebugInfo

### clearKnowledgeAssistDebugInfo

### setKnowledgeAssistDebugInfo

Debug information related to Knowledge Assist feature.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.KnowledgeAssistDebugInfo` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |