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.
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: spaces/{space}
↳ message
↳ 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 threadKey
or the thread.name
. For example usage, see Start or reply to a message thread
.
↳ 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 name
field). The value for this field must meet the following requirements: * * Begins with client-
. For example, client-custom-name
is a valid custom ID, but custom-name
is 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
.
getParent
Required. The resource name of the space in which to create a message.
Format: spaces/{space}
string
setParent
Required. The resource name of the space in which to create a message.
Format: spaces/{space}
var
string
$this
getMessage
Required. Message body.
hasMessage
clearMessage
setMessage
Required. Message body.
$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
.
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
.
var
string
$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.
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.
var
string
$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.
int
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.
var
int
$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-name
is a valid custom ID, butcustom-name
is 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 .
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-name
is a valid custom ID, butcustom-name
is 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 .
var
string
$this
static::build
parent
string
Required. The resource name of the space in which to create a message.
Format: spaces/{space}
Please see ChatServiceClient::spaceName()
for help formatting this field.
message
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 name
field).
The value for this field must meet the following requirements:
-
- Begins with
client-
. For example,client-custom-name
is a valid custom ID, butcustom-name
is not.
- Begins with
-
- 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 .