Google Apps Chat V1 Client - Class CreateMessageRequest (0.4.0)

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 \ V1

Methods

__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: spaces/{space}

↳ message Google\Apps\Chat\V1\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 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.

↳ 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}

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
Google\Apps\Chat\V1\Message|null

hasMessage

clearMessage

setMessage

Required. Message body.

Parameter
Name Description
var Google\Apps\Chat\V1\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.

Returns
Type Description
int

setMessageReplyOption

Optional. Specifies whether a message starts a thread or replies to one.

Only supported in named spaces.

Parameter
Name Description
var int
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-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.
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-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.
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: spaces/{space} Please see Google\Apps\Chat\V1\ChatServiceClient::spaceName() for help formatting this field.

message Google\Apps\Chat\V1\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 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.

Returns
Type Description
Google\Apps\Chat\V1\CreateMessageRequest