Class SpacesResource.MessagesResource.CreateRequest
Creates a message in a Google Chat space. For an example, see Send a message. Calling this method requires authentication and supports the following authentication types: - For text messages, user authentication or app authentication are supported. - For card messages, only app authentication is supported. (Only Chat apps can create card messages.)
Inheritance
Inherited Members
Namespace: Google.Apis.HangoutsChat.v1
Assembly: Google.Apis.HangoutsChat.v1.dll
Syntax
public class SpacesResource.MessagesResource.CreateRequest : HangoutsChatBaseServiceRequest<Message>, IClientServiceRequest<Message>, IClientServiceRequest
Constructors
CreateRequest(IClientService, Message, string)
Constructs a new Create request.
Declaration
public CreateRequest(IClientService service, Message body, string parent)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service | |
Message | body | |
string | parent |
Properties
HttpMethod
Gets the HTTP method.
Declaration
public override string HttpMethod { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
MessageId
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.
Declaration
[RequestParameter("messageId", RequestParameterType.Query)]
public virtual string MessageId { get; set; }
Property Value
Type | Description |
---|---|
string |
MessageReplyOption
Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.
Declaration
[RequestParameter("messageReplyOption", RequestParameterType.Query)]
public virtual SpacesResource.MessagesResource.CreateRequest.MessageReplyOptionEnum? MessageReplyOption { get; set; }
Property Value
Type | Description |
---|---|
SpacesResource.MessagesResource.CreateRequest.MessageReplyOptionEnum? |
MethodName
Gets the method name.
Declaration
public override string MethodName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Parent
Required. The resource name of the space in which to create a message. Format: spaces/{space}
Declaration
[RequestParameter("parent", RequestParameterType.Path)]
public virtual string Parent { get; }
Property Value
Type | Description |
---|---|
string |
RequestId
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.
Declaration
[RequestParameter("requestId", RequestParameterType.Query)]
public virtual string RequestId { get; set; }
Property Value
Type | Description |
---|---|
string |
RestPath
Gets the REST path.
Declaration
public override string RestPath { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
ThreadKey
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.
Declaration
[RequestParameter("threadKey", RequestParameterType.Query)]
public virtual string ThreadKey { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
GetBody()
Returns the body of the request.
Declaration
protected override object GetBody()
Returns
Type | Description |
---|---|
object |
Overrides
InitParameters()
Initializes Create parameter list.
Declaration
protected override void InitParameters()