# Google Cloud Contact Center Insights V1 Client - Class QaAnswer (2.4.2)

2.4.2 (latest) 2.4.1 2.3.3 2.2.1 2.1.1 2.0.1 1.9.5 1.8.0 1.7.1 1.6.2 1.5.0 1.4.1 1.3.0 1.2.1 1.1.0 1.0.3 Reference documentation and code samples for the Google Cloud Contact Center Insights V1 Client class QaAnswer.

An answer to a QaQuestion.

Generated from protobuf message `google.cloud.contactcenterinsights.v1.QaAnswer`

## Namespace

Google \\ Cloud \\ ContactCenterInsights \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ qa_question` | `string` The QaQuestion answered by this answer. |
| `↳ conversation` | `string` The conversation the answer applies to. |
| `↳ question_body` | `string` Question text. E.g., "Did the agent greet the customer?" |
| `↳ answer_value` | `https://docs.cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest/V1.QaAnswer.AnswerValue` The main answer value, incorporating any manual edits if they exist. |
| `↳ tags` | `string[]` User-defined list of arbitrary tags. Matches the value from QaScorecard.ScorecardQuestion.tags. Used for grouping/organization and for weighting the score of each answer. |
| `↳ answer_sources` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest/V1.QaAnswer.AnswerSource>` List of all individual answers given to the question. |

### getQaQuestion

The QaQuestion answered by this answer.

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

### setQaQuestion

The QaQuestion answered by this answer.

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

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

### getConversation

The conversation the answer applies to.

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

### setConversation

The conversation the answer applies to.

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

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

### getQuestionBody

Question text. E.g., "Did the agent greet the customer?"

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

### setQuestionBody

Question text. E.g., "Did the agent greet the customer?"

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

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

### getAnswerValue

The main answer value, incorporating any manual edits if they exist.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest/V1.QaAnswer.AnswerValue|null` |   |

### hasAnswerValue

### clearAnswerValue

### setAnswerValue

The main answer value, incorporating any manual edits if they exist.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest/V1.QaAnswer.AnswerValue` |

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

### getTags

User-defined list of arbitrary tags. Matches the value from
QaScorecard.ScorecardQuestion.tags. Used for grouping/organization and
for weighting the score of each answer.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setTags

User-defined list of arbitrary tags. Matches the value from
QaScorecard.ScorecardQuestion.tags. Used for grouping/organization and
for weighting the score of each answer.

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

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

### getAnswerSources

List of all individual answers given to the question.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest/V1.QaAnswer.AnswerSource>` |   |

### setAnswerSources

List of all individual answers given to the question.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest/V1.QaAnswer.AnswerSource>` |

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