# Google Cloud Contact Center Insights V1 Client - Class Conversation (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 Conversation.

The conversation resource.

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

## Namespace

Google \\ Cloud \\ ContactCenterInsights \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ call_metadata` | `https://docs.cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest/V1.Conversation.CallMetadata` Call-specific metadata. |
| `↳ expire_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The time at which this conversation should expire. After this time, the conversation data and any associated analyses will be deleted. |
| `↳ ttl` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Input only. The TTL for this resource. If specified, then this TTL will be used to calculate the expire time. |
| `↳ name` | `string` Immutable. The resource name of the conversation. Format: projects/{project}/locations/{location}/conversations/{conversation} |
| `↳ data_source` | `https://docs.cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest/V1.ConversationDataSource` The source of the audio and transcription for the conversation. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time at which the conversation was created. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The most recent time at which the conversation was updated. |
| `↳ start_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The time at which the conversation started. |
| `↳ language_code` | `string` A user-specified language code for the conversation. |
| `↳ agent_id` | `string` An opaque, user-specified string representing the human agent who handled the conversation. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` A map for the user to specify any custom fields. A maximum of 100 labels per conversation is allowed, with a maximum of 256 characters per entry. |
| `↳ quality_metadata` | `https://docs.cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest/V1.Conversation.QualityMetadata` Conversation metadata related to quality management. |
| `↳ metadata_json` | `string` Input only. JSON metadata encoded as a string. This field is primarily used by Insights integrations with various telphony systems and must be in one of Insight's supported formats. |
| `↳ transcript` | `https://docs.cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest/V1.Conversation.Transcript` Output only. The conversation transcript. |
| `↳ medium` | `int` Immutable. The conversation medium, if unspecified will default to PHONE_CALL. |
| `↳ duration` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Output only. The duration of the conversation. |
| `↳ turn_count` | `int` Output only. The number of turns in the conversation. |
| `↳ latest_analysis` | `https://docs.cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest/V1.Analysis` Output only. The conversation's latest analysis, if one exists. |
| `↳ latest_summary` | `https://docs.cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest/V1.ConversationSummarizationSuggestionData` Output only. Latest summary of the conversation. |
| `↳ runtime_annotations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest/V1.RuntimeAnnotation>` Output only. The annotations that were generated during the customer and agent interaction. |
| `↳ dialogflow_intents` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Output only. All the matched Dialogflow intents in the call. The key corresponds to a Dialogflow intent, format: projects/{project}/agent/{agent}/intents/{intent} |
| `↳ obfuscated_user_id` | `string` Obfuscated user ID which the customer sent to us. |

### getCallMetadata

Call-specific metadata.

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

### hasCallMetadata

### setCallMetadata

Call-specific metadata.

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

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

### getExpireTime

The time at which this conversation should expire. After this time, the
conversation data and any associated analyses will be deleted.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasExpireTime

### setExpireTime

The time at which this conversation should expire. After this time, the
conversation data and any associated analyses will be deleted.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getTtl

Input only. The TTL for this resource. If specified, then this TTL will
be used to calculate the expire time.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasTtl

### setTtl

Input only. The TTL for this resource. If specified, then this TTL will
be used to calculate the expire time.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

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

### getName

Immutable. The resource name of the conversation.

Format:
projects/{project}/locations/{location}/conversations/{conversation}

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

### setName

Immutable. The resource name of the conversation.

Format:
projects/{project}/locations/{location}/conversations/{conversation}

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

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

### getDataSource

The source of the audio and transcription for the conversation.

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

### hasDataSource

### clearDataSource

### setDataSource

The source of the audio and transcription for the conversation.

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

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

### getCreateTime

Output only. The time at which the conversation was created.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The time at which the conversation was created.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getUpdateTime

Output only. The most recent time at which the conversation was updated.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The most recent time at which the conversation was updated.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getStartTime

The time at which the conversation started.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasStartTime

### clearStartTime

### setStartTime

The time at which the conversation started.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getLanguageCode

A user-specified language code for the conversation.

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

### setLanguageCode

A user-specified language code for the conversation.

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

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

### getAgentId

An opaque, user-specified string representing the human agent who handled
the conversation.

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

### setAgentId

An opaque, user-specified string representing the human agent who handled
the conversation.

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

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

### getLabels

A map for the user to specify any custom fields. A maximum of 100 labels
per conversation is allowed, with a maximum of 256 characters per entry.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setLabels

A map for the user to specify any custom fields. A maximum of 100 labels
per conversation is allowed, with a maximum of 256 characters per entry.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

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

### getQualityMetadata

Conversation metadata related to quality management.

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

### hasQualityMetadata

### clearQualityMetadata

### setQualityMetadata

Conversation metadata related to quality management.

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

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

### getMetadataJson

Input only. JSON metadata encoded as a string.

This field is primarily used by Insights integrations with various telphony
systems and must be in one of Insight's supported formats.

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

### setMetadataJson

Input only. JSON metadata encoded as a string.

This field is primarily used by Insights integrations with various telphony
systems and must be in one of Insight's supported formats.

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

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

### getTranscript

Output only. The conversation transcript.

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

### hasTranscript

### clearTranscript

### setTranscript

Output only. The conversation transcript.

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

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

### getMedium

Immutable. The conversation medium, if unspecified will default to
PHONE_CALL.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Medium](https://docs.cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest/V1.Conversation.Medium). |

### setMedium

Immutable. The conversation medium, if unspecified will default to
PHONE_CALL.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Medium](https://docs.cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest/V1.Conversation.Medium). |

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

### getDuration

Output only. The duration of the conversation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasDuration

### clearDuration

### setDuration

Output only. The duration of the conversation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

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

### getTurnCount

Output only. The number of turns in the conversation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setTurnCount

Output only. The number of turns in the conversation.

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

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

### getLatestAnalysis

Output only. The conversation's latest analysis, if one exists.

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

### hasLatestAnalysis

### clearLatestAnalysis

### setLatestAnalysis

Output only. The conversation's latest analysis, if one exists.

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

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

### getLatestSummary

Output only. Latest summary of the conversation.

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

### hasLatestSummary

### clearLatestSummary

### setLatestSummary

Output only. Latest summary of the conversation.

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

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

### getRuntimeAnnotations

Output only. The annotations that were generated during the customer and
agent interaction.

| **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.RuntimeAnnotation>` |   |

### setRuntimeAnnotations

Output only. The annotations that were generated during the customer and
agent interaction.

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

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

### getDialogflowIntents

Output only. All the matched Dialogflow intents in the call. The key
corresponds to a Dialogflow intent, format:
projects/{project}/agent/{agent}/intents/{intent}

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setDialogflowIntents

Output only. All the matched Dialogflow intents in the call. The key
corresponds to a Dialogflow intent, format:
projects/{project}/agent/{agent}/intents/{intent}

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

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

### getObfuscatedUserId

Obfuscated user ID which the customer sent to us.

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

### setObfuscatedUserId

Obfuscated user ID which the customer sent to us.

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

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

### getMetadata

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

### getExpiration

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