Google Cloud Dialogflow V2 Client - Class GenerateSuggestionsRequest (2.1.0)

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

The request message for Conversations.GenerateSuggestions.

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

Namespace

Google \ Cloud \ Dialogflow \ V2

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ conversation string

Required. The conversation for which the suggestions are generated. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>. The conversation must be created with a conversation profile which has generators configured in it to be able to get suggestions.

↳ latest_message string

Optional. The name of the latest conversation message for which the request is triggered. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>.

↳ trigger_events array

Optional. A list of trigger events. Only generators configured in the conversation_profile whose trigger_event is listed here will be triggered.

getConversation

Required. The conversation for which the suggestions are generated. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>.

The conversation must be created with a conversation profile which has generators configured in it to be able to get suggestions.

Returns
Type Description
string

setConversation

Required. The conversation for which the suggestions are generated. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>.

The conversation must be created with a conversation profile which has generators configured in it to be able to get suggestions.

Parameter
Name Description
var string
Returns
Type Description
$this

getLatestMessage

Optional. The name of the latest conversation message for which the request is triggered. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>.

Returns
Type Description
string

setLatestMessage

Optional. The name of the latest conversation message for which the request is triggered. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>.

Parameter
Name Description
var string
Returns
Type Description
$this

getTriggerEvents

Optional. A list of trigger events. Only generators configured in the conversation_profile whose trigger_event is listed here will be triggered.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setTriggerEvents

Optional. A list of trigger events. Only generators configured in the conversation_profile whose trigger_event is listed here will be triggered.

Parameter
Name Description
var int[]
Returns
Type Description
$this

static::build

Parameter
Name Description
conversation string

Required. The conversation for which the suggestions are generated. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>.

The conversation must be created with a conversation profile which has generators configured in it to be able to get suggestions. Please see ConversationsClient::conversationName() for help formatting this field.

Returns
Type Description
GenerateSuggestionsRequest