Reference documentation and code samples for the Google Apps Chat V1 Client class CreateMessageRequest.
Creates a message.
Generated from protobuf message google.chat.v1.CreateMessageRequest
Namespace
Google \ Apps \ Chat \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ parent |
string
Required. The resource name of the space in which to create a message. Format: |
↳ message |
Message
Required. Message body. |
↳ thread_key |
string
Optional. Deprecated: Use thread.thread_key instead. ID for the thread. Supports up to 4000 characters. To start or add to a thread, create a message and specify a |
↳ request_id |
string
Optional. A unique request ID for this message. Specifying an existing request ID returns the message created with that ID instead of creating a new message. |
↳ message_reply_option |
int
Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces. When responding to user interactions, this field is ignored. For interactions within a thread, the reply is created in the same thread. Otherwise, the reply is created as a new thread. |
↳ message_id |
string
Optional. A custom ID for a message. Lets Chat apps get, update, or delete a message without needing to store the system-assigned ID in the message's resource name (represented in the message |
getParent
Required. The resource name of the space in which to create a message.
Format: spaces/{space}
| Returns | |
|---|---|
| Type | Description |
string |
|
setParent
Required. The resource name of the space in which to create a message.
Format: spaces/{space}
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMessage
Required. Message body.
| Returns | |
|---|---|
| Type | Description |
Message|null |
|
hasMessage
clearMessage
setMessage
Required. Message body.
| Parameter | |
|---|---|
| Name | Description |
var |
Message
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getThreadKey
Optional. Deprecated: Use
thread.thread_key instead. ID for the
thread. Supports up to 4000 characters. To start or add to a thread, create
a message and specify a threadKey or the
thread.name. For example usage, see Start or
reply to a message
thread.
| Returns | |
|---|---|
| Type | Description |
string |
|
setThreadKey
Optional. Deprecated: Use
thread.thread_key instead. ID for the
thread. Supports up to 4000 characters. To start or add to a thread, create
a message and specify a threadKey or the
thread.name. For example usage, see Start or
reply to a message
thread.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getRequestId
Optional. A unique request ID for this message. Specifying an existing request ID returns the message created with that ID instead of creating a new message.
| Returns | |
|---|---|
| Type | Description |
string |
|
setRequestId
Optional. A unique request ID for this message. Specifying an existing request ID returns the message created with that ID instead of creating a new message.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMessageReplyOption
Optional. Specifies whether a message starts a thread or replies to one.
Only supported in named spaces. When responding to user interactions, this field is ignored. For interactions within a thread, the reply is created in the same thread. Otherwise, the reply is created as a new thread.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type MessageReplyOption. |
setMessageReplyOption
Optional. Specifies whether a message starts a thread or replies to one.
Only supported in named spaces. When responding to user interactions, this field is ignored. For interactions within a thread, the reply is created in the same thread. Otherwise, the reply is created as a new thread.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type MessageReplyOption. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMessageId
Optional. A custom ID for a message. Lets Chat apps get, update, or delete
a message without needing to store the system-assigned ID in the message's
resource name (represented in the message name field).
The value for this field must meet the following requirements:
- Begins with
client-. For example,client-custom-nameis a valid custom ID, butcustom-nameis not. - Contains up to 63 characters and only lowercase letters, numbers, and hyphens.
- Is unique within a space. A Chat app can't use the same custom ID for different messages. For details, see Name a message.
| Returns | |
|---|---|
| Type | Description |
string |
|
setMessageId
Optional. A custom ID for a message. Lets Chat apps get, update, or delete
a message without needing to store the system-assigned ID in the message's
resource name (represented in the message name field).
The value for this field must meet the following requirements:
- Begins with
client-. For example,client-custom-nameis a valid custom ID, butcustom-nameis not. - Contains up to 63 characters and only lowercase letters, numbers, and hyphens.
- Is unique within a space. A Chat app can't use the same custom ID for different messages. For details, see Name a message.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
static::build
| Parameters | |
|---|---|
| Name | Description |
parent |
string
Required. The resource name of the space in which to create a message. Format: |
message |
Message
Required. Message body. |
messageId |
string
Optional. A custom ID for a message. Lets Chat apps get, update, or delete
a message without needing to store the system-assigned ID in the message's
resource name (represented in the message The value for this field must meet the following requirements:
For details, see Name a message. |
| Returns | |
|---|---|
| Type | Description |
CreateMessageRequest |
|