# Google Cloud Dialogflow V2 Client - Class AnswerRecord (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 AnswerRecord.

Answer records are records to manage answer history and feedbacks for
Dialogflow.

Currently, answer record includes:

- human agent assistant article suggestion
- human agent assistant faq article It doesn't include:
- `DetectIntent` intent matching
- `DetectIntent` knowledge Answer records are not related to the conversation history in the Dialogflow Console. A Record is generated even when the end-user disables conversation history in the console. Records are created when there's a human agent assistant suggestion generated. A typical workflow for customers provide feedback to an answer is:
- For human agent assistant, customers get suggestion via ListSuggestions API. Together with the answers, [AnswerRecord.name](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.AnswerRecord#_Google_Cloud_Dialogflow_V2_AnswerRecord__getName__) are returned to the customers.
- The customer uses the [AnswerRecord.name](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.AnswerRecord#_Google_Cloud_Dialogflow_V2_AnswerRecord__getName__) to call the [AnswerRecords.UpdateAnswerRecord](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Client.AnswerRecordsClient#_Google_Cloud_Dialogflow_V2_Client_AnswerRecordsClient__updateAnswerRecord__) method to send feedback about a specific answer that they believe is wrong.

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

## Namespace

Google \\ Cloud \\ Dialogflow \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The unique identifier of this answer record. Format: `projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>`. |
| `↳ answer_feedback` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.AnswerFeedback` Required. The AnswerFeedback for this record. You can set this with [AnswerRecords.UpdateAnswerRecord](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Client.AnswerRecordsClient#_Google_Cloud_Dialogflow_V2_Client_AnswerRecordsClient__updateAnswerRecord__) in order to give us feedback about this answer. |
| `↳ agent_assistant_record` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.AgentAssistantRecord` Output only. The record for human agent assistant. |

### getName

The unique identifier of this answer record.

Format: `projects/<Project ID>/locations/<Location
ID>/answerRecords/<Answer Record ID>`.

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

### setName

The unique identifier of this answer record.

Format: `projects/<Project ID>/locations/<Location
ID>/answerRecords/<Answer Record ID>`.

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

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

### getAnswerFeedback

Required. The AnswerFeedback for this record. You can set this with
[AnswerRecords.UpdateAnswerRecord](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Client.AnswerRecordsClient#_Google_Cloud_Dialogflow_V2_Client_AnswerRecordsClient__updateAnswerRecord__)
in order to give us feedback about this answer.

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

### hasAnswerFeedback

### clearAnswerFeedback

### setAnswerFeedback

Required. The AnswerFeedback for this record. You can set this with
[AnswerRecords.UpdateAnswerRecord](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Client.AnswerRecordsClient#_Google_Cloud_Dialogflow_V2_Client_AnswerRecordsClient__updateAnswerRecord__)
in order to give us feedback about this answer.

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

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

### getAgentAssistantRecord

Output only. The record for human agent assistant.

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

### hasAgentAssistantRecord

### setAgentAssistantRecord

Output only. The record for human agent assistant.

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

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

### getRecord

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