Google Cloud Dialogflow V2 Client - Class Message (1.8.0)

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

Represents a message posted into a conversation.

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

Namespace

Google \ Cloud \ Dialogflow \ V2

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Optional. The unique identifier of the message. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>.

↳ content string

Required. The message content.

↳ language_code string

Optional. The message language. This should be a BCP-47 language tag. Example: "en-US".

↳ participant string

Output only. The participant that sends this message.

↳ participant_role int

Output only. The role of the participant.

↳ create_time Google\Protobuf\Timestamp

Output only. The time when the message was created in Contact Center AI.

↳ send_time Google\Protobuf\Timestamp

Optional. The time when the message was sent.

↳ message_annotation Google\Cloud\Dialogflow\V2\MessageAnnotation

Output only. The annotation for the message.

↳ sentiment_analysis Google\Cloud\Dialogflow\V2\SentimentAnalysisResult

Output only. The sentiment analysis result for the message.

getName

Optional. The unique identifier of the message.

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

Returns
TypeDescription
string

setName

Optional. The unique identifier of the message.

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getContent

Required. The message content.

Returns
TypeDescription
string

setContent

Required. The message content.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getLanguageCode

Optional. The message language.

This should be a BCP-47 language tag. Example: "en-US".

Returns
TypeDescription
string

setLanguageCode

Optional. The message language.

This should be a BCP-47 language tag. Example: "en-US".

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getParticipant

Output only. The participant that sends this message.

Returns
TypeDescription
string

setParticipant

Output only. The participant that sends this message.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getParticipantRole

Output only. The role of the participant.

Returns
TypeDescription
int

setParticipantRole

Output only. The role of the participant.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getCreateTime

Output only. The time when the message was created in Contact Center AI.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. The time when the message was created in Contact Center AI.

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

getSendTime

Optional. The time when the message was sent.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasSendTime

clearSendTime

setSendTime

Optional. The time when the message was sent.

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

getMessageAnnotation

Output only. The annotation for the message.

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

hasMessageAnnotation

clearMessageAnnotation

setMessageAnnotation

Output only. The annotation for the message.

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

getSentimentAnalysis

Output only. The sentiment analysis result for the message.

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

hasSentimentAnalysis

clearSentimentAnalysis

setSentimentAnalysis

Output only. The sentiment analysis result for the message.

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