Google Cloud Dialogflow V2 Client - Class Conversation (1.3.2)

Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class Conversation.

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.

Generated from protobuf message google.cloud.dialogflow.v2.Conversation

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ name
string

Output only. The unique identifier of this conversation. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID> .

↳ lifecycle_state
int

Output only. The current state of the Conversation.

↳ conversation_profile
string

Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated. Format: projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID> .

↳ phone_number
Google\Cloud\Dialogflow\V2\ConversationPhoneNumber

Output only. It will not be empty if the conversation is to be connected over telephony.

↳ start_time
Google\Protobuf\Timestamp

Output only. The time the conversation was started.

↳ end_time
Google\Protobuf\Timestamp

Output only. The time the conversation was finished.

↳ conversation_stage
int

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 .

getName

Output only. The unique identifier of this conversation.

Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID> .

Returns
Type
Description
string

setName

Output only. The unique identifier of this conversation.

Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID> .

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getLifecycleState

Output only. The current state of the Conversation.

Returns
Type
Description
int

setLifecycleState

Output only. The current state of the Conversation.

Parameter
Name
Description
var
int
Returns
Type
Description
$this

getConversationProfile

Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated.

Format: projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID> .

Returns
Type
Description
string

setConversationProfile

Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated.

Format: projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID> .

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getPhoneNumber

Output only. It will not be empty if the conversation is to be connected over telephony.

hasPhoneNumber

clearPhoneNumber

setPhoneNumber

Output only. It will not be empty if the conversation is to be connected over telephony.

Returns
Type
Description
$this

getStartTime

Output only. The time the conversation was started.

Returns
Type
Description

hasStartTime

clearStartTime

setStartTime

Output only. The time the conversation was started.

Parameter
Name
Description
Returns
Type
Description
$this

getEndTime

Output only. The time the conversation was finished.

Returns
Type
Description

hasEndTime

clearEndTime

setEndTime

Output only. The time the conversation was finished.

Parameter
Name
Description
Returns
Type
Description
$this

getConversationStage

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 .

Returns
Type
Description
int

setConversationStage

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 .

Parameter
Name
Description
var
int
Returns
Type
Description
$this