# Class Conversation (2.48.0)

2.48.0 (latest) 2.47.0 2.46.0 2.45.0 2.44.0 2.43.0 2.42.0 2.41.2 2.40.0 2.39.1 2.38.0 2.37.0 2.36.0 2.35.0 2.34.0 2.33.0 2.32.0 2.30.2 2.29.0 2.28.3 2.27.0 2.26.0 2.25.0 2.24.1 2.23.3 2.22.0 2.21.0 2.20.0 2.19.1 2.18.0 2.17.0 2.16.1 2.15.2 2.14.1 2.13.0 2.12.0 2.11.0 2.10.0 2.9.1 2.8.1 2.7.1 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.2 2.0.0 1.1.3 1.0.0 0.8.0 0.7.2

    Conversation(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Represents a conversation.
A conversation is an interaction between an agent, including
live agents and Dialogflow agents, and a support customer.
Conversations can include phone calls and text-based chat
sessions.

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `name` | `str` Output only. Identifier. The unique identifier of this conversation. Format: `projects/`. |
| `lifecycle_state` | `https://docs.cloud.google.com/python/docs/reference/dialogflow/latest/google.cloud.dialogflow_v2beta1.types.Conversation.LifecycleState` Output only. The current state of the Conversation. |
| `conversation_profile` | `str` Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated. Format: `projects/`. |
| `phone_number` | `https://docs.cloud.google.com/python/docs/reference/dialogflow/latest/google.cloud.dialogflow_v2beta1.types.ConversationPhoneNumber` Output only. Required if the conversation is to be connected over telephony. |
| `conversation_stage` | `https://docs.cloud.google.com/python/docs/reference/dialogflow/latest/google.cloud.dialogflow_v2beta1.types.Conversation.ConversationStage` Optional. The stage of a conversation. It indicates whether the virtual agent or a human agent is handling the conversation. If the conversation is created with the conversation profile that has Dialogflow config set, defaults to ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to ConversationStage.HUMAN_ASSIST_STAGE. If the conversation is created with the conversation profile that has Dialogflow config set but explicitly sets conversation_stage to ConversationStage.HUMAN_ASSIST_STAGE, it skips ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to ConversationStage.HUMAN_ASSIST_STAGE. |
| `start_time` | `google.protobuf.timestamp_pb2.Timestamp` Output only. The time the conversation was started. |
| `end_time` | `google.protobuf.timestamp_pb2.Timestamp` Output only. The time the conversation was finished. |
| `telephony_connection_info` | `https://docs.cloud.google.com/python/docs/reference/dialogflow/latest/google.cloud.dialogflow_v2beta1.types.Conversation.TelephonyConnectionInfo` Output only. The telephony connection information. |
| `initial_conversation_profile` | `https://docs.cloud.google.com/python/docs/reference/dialogflow/latest/google.cloud.dialogflow_v2beta1.types.ConversationProfile` Optional. Output only. The initial conversation profile to be used to configure this conversation, which is a copy of the conversation profile config read at conversation creation time. |
| `ingested_context_references` | `MutableMapping[str, https://docs.cloud.google.com/python/docs/reference/dialogflow/latest/google.cloud.dialogflow_v2beta1.types.Conversation.ContextReference]` Output only. The context reference updates provided by external systems. |
| `initial_generator_contexts` | `MutableMapping[str, https://docs.cloud.google.com/python/docs/reference/dialogflow/latest/google.cloud.dialogflow_v2beta1.types.Conversation.GeneratorContext]` Output only. A map with generator name as key and generator context as value. |

## Classes

### ContextReference

    ContextReference(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Represents a piece of ingested context information.

### ConversationStage

    ConversationStage(value)

Enumeration of the different conversation stages a conversation can
be in. Reference:
<https://cloud.google.com/agent-assist/docs/basics#conversation_stages>

### GeneratorContext

    GeneratorContext(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Represents the context of a generator.

### IngestedContextReferencesEntry

    IngestedContextReferencesEntry(
        mapping=None, *, ignore_unknown_fields=False, **kwargs
    )

The abstract base class for a message.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `kwargs` | `dict` Keys and values corresponding to the fields of the message. |
| `mapping` | ``Union[dict, `.Message`]`` A dictionary or message to be used to determine the values for this message. |
| `ignore_unknown_fields` | `Optional(bool)` If True, do not raise errors for unknown fields. Only applied if `mapping` is a mapping type or there are keyword parameters. |

### InitialGeneratorContextsEntry

    InitialGeneratorContextsEntry(
        mapping=None, *, ignore_unknown_fields=False, **kwargs
    )

The abstract base class for a message.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `kwargs` | `dict` Keys and values corresponding to the fields of the message. |
| `mapping` | ``Union[dict, `.Message`]`` A dictionary or message to be used to determine the values for this message. |
| `ignore_unknown_fields` | `Optional(bool)` If True, do not raise errors for unknown fields. Only applied if `mapping` is a mapping type or there are keyword parameters. |

### LifecycleState

    LifecycleState(value)

Enumeration of the completion status of the conversation.

### TelephonyConnectionInfo

    TelephonyConnectionInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The information about phone calls connected via phone gateway
to the conversation.