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
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Optional. The unique identifier of the message. Format: |
↳ 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>
.
Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
string |
setName
Optional. The unique identifier of the message.
Format: projects/<Project ID>/locations/<Location
ID>/conversations/<Conversation ID>/messages/<Message ID>
.
Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getContent
Required. The message content.
Generated from protobuf field string content = 2 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
string |
setContent
Required. The message content.
Generated from protobuf field string content = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getLanguageCode
Optional. The message language.
This should be a BCP-47 language tag. Example: "en-US".
Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
string |
setLanguageCode
Optional. The message language.
This should be a BCP-47 language tag. Example: "en-US".
Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getParticipant
Output only. The participant that sends this message.
Generated from protobuf field string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
string |
setParticipant
Output only. The participant that sends this message.
Generated from protobuf field string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getParticipantRole
Output only. The role of the participant.
Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
int |
setParticipantRole
Output only. The role of the participant.
Generated from protobuf field .google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getCreateTime
Output only. The time when the message was created in Contact Center AI.
Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasCreateTime
clearCreateTime
setCreateTime
Output only. The time when the message was created in Contact Center AI.
Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$this |
getSendTime
Optional. The time when the message was sent.
Generated from protobuf field .google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasSendTime
clearSendTime
setSendTime
Optional. The time when the message was sent.
Generated from protobuf field .google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$this |
getMessageAnnotation
Output only. The annotation for the message.
Generated from protobuf field .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
Google\Cloud\Dialogflow\V2\MessageAnnotation|null |
hasMessageAnnotation
clearMessageAnnotation
setMessageAnnotation
Output only. The annotation for the message.
Generated from protobuf field .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Dialogflow\V2\MessageAnnotation
|
Returns | |
---|---|
Type | Description |
$this |
getSentimentAnalysis
Output only. The sentiment analysis result for the message.
Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
Google\Cloud\Dialogflow\V2\SentimentAnalysisResult|null |
hasSentimentAnalysis
clearSentimentAnalysis
setSentimentAnalysis
Output only. The sentiment analysis result for the message.
Generated from protobuf field .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Dialogflow\V2\SentimentAnalysisResult
|
Returns | |
---|---|
Type | Description |
$this |