Google Cloud Dialogflow V2 Client - Class Conversation (1.0.1)

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> .

Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type
Description
string

setName

Output only. The unique identifier of this conversation.

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

Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getLifecycleState

Output only. The current state of the Conversation.

Generated from protobuf field .google.cloud.dialogflow.v2.Conversation.LifecycleState lifecycle_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type
Description
int

setLifecycleState

Output only. The current state of the Conversation.

Generated from protobuf field .google.cloud.dialogflow.v2.Conversation.LifecycleState lifecycle_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

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> .

Generated from protobuf field string conversation_profile = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {

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> .

Generated from protobuf field string conversation_profile = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {

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.

Generated from protobuf field .google.cloud.dialogflow.v2.ConversationPhoneNumber phone_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

hasPhoneNumber

clearPhoneNumber

setPhoneNumber

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

Generated from protobuf field .google.cloud.dialogflow.v2.ConversationPhoneNumber phone_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type
Description
$this

getStartTime

Output only. The time the conversation was started.

Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type
Description
Google\Protobuf\Timestamp|null

hasStartTime

clearStartTime

setStartTime

Output only. The time the conversation was started.

Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name
Description
var
Google\Protobuf\Timestamp
Returns
Type
Description
$this

getEndTime

Output only. The time the conversation was finished.

Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type
Description
Google\Protobuf\Timestamp|null

hasEndTime

clearEndTime

setEndTime

Output only. The time the conversation was finished.

Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name
Description
var
Google\Protobuf\Timestamp
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 .

Generated from protobuf field .google.cloud.dialogflow.v2.Conversation.ConversationStage conversation_stage = 7;

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 .

Generated from protobuf field .google.cloud.dialogflow.v2.Conversation.ConversationStage conversation_stage = 7;

Parameter
Name
Description
var
int
Returns
Type
Description
$this
Design a Mobile Site
View Site in Mobile | Classic
Share by: