Show / Hide Table of Contents

Class Message

A message in Google Chat.

Inheritance
object
Message
Implements
IDirectResponseSchema
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.HangoutsChat.v1.Data
Assembly: Google.Apis.HangoutsChat.v1.dll
Syntax
public class Message : IDirectResponseSchema

Properties

ActionResponse

Input only. Parameters that a Chat app can use to configure how its response is posted.

Declaration
[JsonProperty("actionResponse")]
public virtual ActionResponse ActionResponse { get; set; }
Property Value
Type Description
ActionResponse

Annotations

Output only. Annotations associated with the text in this message.

Declaration
[JsonProperty("annotations")]
public virtual IList<Annotation> Annotations { get; set; }
Property Value
Type Description
IList<Annotation>

ArgumentText

Output only. Plain-text body of the message with all Chat app mentions stripped out.

Declaration
[JsonProperty("argumentText")]
public virtual string ArgumentText { get; set; }
Property Value
Type Description
string

AttachedGifs

Output only. GIF images that are attached to the message.

Declaration
[JsonProperty("attachedGifs")]
public virtual IList<AttachedGif> AttachedGifs { get; set; }
Property Value
Type Description
IList<AttachedGif>

Attachment

User-uploaded attachment.

Declaration
[JsonProperty("attachment")]
public virtual IList<Attachment> Attachment { get; set; }
Property Value
Type Description
IList<Attachment>

Cards

Deprecated: Use cards_v2 instead. Rich, formatted, and interactive cards that you can use to display UI elements such as: formatted texts, buttons, and clickable images. Cards are normally displayed below the plain-text body of the message. cards and cards_v2 can have a maximum size of 32 KB.

Declaration
[JsonProperty("cards")]
public virtual IList<Card> Cards { get; set; }
Property Value
Type Description
IList<Card>

CardsV2

Richly formatted and interactive cards that display UI elements and editable widgets, such as: - Formatted text - Buttons - Clickable images - Checkboxes - Radio buttons - Input widgets. Cards are usually displayed below the text body of a Chat message, but can situationally appear other places, such as dialogs. Each card can have a maximum size of 32 KB. The cardId is a unique identifier among cards in the same message and for identifying user input values. Currently supported widgets include: - TextParagraph - DecoratedText - Image - ButtonList - Divider - TextInput - SelectionInput - Grid

Declaration
[JsonProperty("cardsV2")]
public virtual IList<CardWithId> CardsV2 { get; set; }
Property Value
Type Description
IList<CardWithId>

ClientAssignedMessageId

A custom name for a Chat message assigned at creation. Must start with client- and contain only lowercase letters, numbers, and hyphens up to 63 characters in length. Specify this field to get, update, or delete the message with the specified value. Assigning a custom name lets a Chat app recall the message without saving the message name from the response body returned when creating the message. Assigning a custom name doesn't replace the generated name field, the message's resource name. Instead, it sets the custom name as the clientAssignedMessageId field, which you can reference while processing later operations, like updating or deleting the message. For example usage, see Name a created message.

Declaration
[JsonProperty("clientAssignedMessageId")]
public virtual string ClientAssignedMessageId { get; set; }
Property Value
Type Description
string

CreateTime

object representation of CreateTimeRaw.

Declaration
[JsonIgnore]
[Obsolete("This property is obsolete and may behave unexpectedly; please use CreateTimeDateTimeOffset instead.")]
public virtual object CreateTime { get; set; }
Property Value
Type Description
object

CreateTimeDateTimeOffset

DateTimeOffset representation of CreateTimeRaw.

Declaration
[JsonIgnore]
public virtual DateTimeOffset? CreateTimeDateTimeOffset { get; set; }
Property Value
Type Description
DateTimeOffset?

CreateTimeRaw

For spaces created in Chat, the time at which the message was created. This field is output only, except when used in imported spaces. Developer Preview: For imported spaces, set this field to the historical timestamp at which the message was created in the source in order to preserve the original creation time.

Declaration
[JsonProperty("createTime")]
public virtual string CreateTimeRaw { get; set; }
Property Value
Type Description
string

DeleteTime

object representation of DeleteTimeRaw.

Declaration
[JsonIgnore]
[Obsolete("This property is obsolete and may behave unexpectedly; please use DeleteTimeDateTimeOffset instead.")]
public virtual object DeleteTime { get; set; }
Property Value
Type Description
object

DeleteTimeDateTimeOffset

DateTimeOffset representation of DeleteTimeRaw.

Declaration
[JsonIgnore]
public virtual DateTimeOffset? DeleteTimeDateTimeOffset { get; set; }
Property Value
Type Description
DateTimeOffset?

DeleteTimeRaw

Output only. The time at which the message was deleted in Google Chat. If the message is never deleted, this field is empty.

Declaration
[JsonProperty("deleteTime")]
public virtual string DeleteTimeRaw { get; set; }
Property Value
Type Description
string

DeletionMetadata

Output only. Information about a deleted message. A message is deleted when delete_time is set.

Declaration
[JsonProperty("deletionMetadata")]
public virtual DeletionMetadata DeletionMetadata { get; set; }
Property Value
Type Description
DeletionMetadata

EmojiReactionSummaries

Output only. The list of emoji reaction summaries on the message.

Declaration
[JsonProperty("emojiReactionSummaries")]
public virtual IList<EmojiReactionSummary> EmojiReactionSummaries { get; set; }
Property Value
Type Description
IList<EmojiReactionSummary>

ETag

The ETag of the item.

Declaration
public virtual string ETag { get; set; }
Property Value
Type Description
string

FallbackText

A plain-text description of the message's cards, used when the actual cards can't be displayed—for example, mobile notifications.

Declaration
[JsonProperty("fallbackText")]
public virtual string FallbackText { get; set; }
Property Value
Type Description
string

LastUpdateTime

object representation of LastUpdateTimeRaw.

Declaration
[JsonIgnore]
[Obsolete("This property is obsolete and may behave unexpectedly; please use LastUpdateTimeDateTimeOffset instead.")]
public virtual object LastUpdateTime { get; set; }
Property Value
Type Description
object

LastUpdateTimeDateTimeOffset

DateTimeOffset representation of LastUpdateTimeRaw.

Declaration
[JsonIgnore]
public virtual DateTimeOffset? LastUpdateTimeDateTimeOffset { get; set; }
Property Value
Type Description
DateTimeOffset?

LastUpdateTimeRaw

Output only. The time at which the message was last edited by a user. If the message has never been edited, this field is empty.

Declaration
[JsonProperty("lastUpdateTime")]
public virtual string LastUpdateTimeRaw { get; set; }
Property Value
Type Description
string

MatchedUrl

Output only. A URL in spaces.messages.text that matches a link preview pattern. For more information, see Preview links.

Declaration
[JsonProperty("matchedUrl")]
public virtual MatchedUrl MatchedUrl { get; set; }
Property Value
Type Description
MatchedUrl

Name

Resource name in the form spaces/*/messages/*. Example: spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB

Declaration
[JsonProperty("name")]
public virtual string Name { get; set; }
Property Value
Type Description
string

QuotedMessageMetadata

Output only. Information about a message that's quoted by a Google Chat user in a space. Google Chat users can quote a message to reply to it.

Declaration
[JsonProperty("quotedMessageMetadata")]
public virtual QuotedMessageMetadata QuotedMessageMetadata { get; set; }
Property Value
Type Description
QuotedMessageMetadata

Sender

Output only. The user who created the message. If your Chat app authenticates as a user, the output populates the user name and type.

Declaration
[JsonProperty("sender")]
public virtual User Sender { get; set; }
Property Value
Type Description
User

SlashCommand

Output only. Slash command information, if applicable.

Declaration
[JsonProperty("slashCommand")]
public virtual SlashCommand SlashCommand { get; set; }
Property Value
Type Description
SlashCommand

Space

If your Chat app authenticates as a user, the output populates the space name.

Declaration
[JsonProperty("space")]
public virtual Space Space { get; set; }
Property Value
Type Description
Space

Text

Plain-text body of the message. The first link to an image, video, or web page generates a preview chip. You can also @mention a Google Chat user, or everyone in the space. To learn about creating text messages, see Create a text message.

Declaration
[JsonProperty("text")]
public virtual string Text { get; set; }
Property Value
Type Description
string

Thread

The thread the message belongs to. For example usage, see Start or reply to a message thread.

Declaration
[JsonProperty("thread")]
public virtual Thread Thread { get; set; }
Property Value
Type Description
Thread

ThreadReply

Output only. When true, the message is a response in a reply thread. When false, the message is visible in the space's top-level conversation as either the first message of a thread or a message with no threaded replies. If the space doesn't support reply in threads, this field is always false.

Declaration
[JsonProperty("threadReply")]
public virtual bool? ThreadReply { get; set; }
Property Value
Type Description
bool?

Implements

IDirectResponseSchema
In This Article
Back to top Generated by DocFX