Google Cloud Dialogflow V2 Client - Class Conversation (1.9.0)

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

Namespace

Google \ Cloud \ Dialogflow \ V2

Methods

__construct

Constructor.

Parameters
NameDescription
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
TypeDescription
string

setName

Output only. The unique identifier of this conversation.

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getLifecycleState

Output only. The current state of the Conversation.

Returns
TypeDescription
int

setLifecycleState

Output only. The current state of the Conversation.

Parameter
NameDescription
var int
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$this

getPhoneNumber

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

Returns
TypeDescription
Google\Cloud\Dialogflow\V2\ConversationPhoneNumber|null

hasPhoneNumber

clearPhoneNumber

setPhoneNumber

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

Parameter
NameDescription
var Google\Cloud\Dialogflow\V2\ConversationPhoneNumber
Returns
TypeDescription
$this

getStartTime

Output only. The time the conversation was started.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasStartTime

clearStartTime

setStartTime

Output only. The time the conversation was started.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getEndTime

Output only. The time the conversation was finished.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasEndTime

clearEndTime

setEndTime

Output only. The time the conversation was finished.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var int
Returns
TypeDescription
$this