Show / Hide Table of Contents

Class Annotation

Output only. Annotations associated with the plain-text body of the message. To add basic formatting to a text message, see Format text messages.

Example plain-text message body:

Hello @FooBot how are you!"

The corresponding annotations metadata:

"annotations":[{
  "type":"USER_MENTION",
  "startIndex":6,
  "length":7,
  "userMention": {
    "user": {
      "name":"users/{user}",
      "displayName":"FooBot",
      "avatarUrl":"https://goo.gl/aeDtrS",
      "type":"BOT"
    },
    "type":"MENTION"
   }
}]
Inheritance
object
Annotation
Implements
IMessage<Annotation>
IEquatable<Annotation>
IDeepCloneable<Annotation>
IBufferMessage
IMessage
Inherited Members
object.GetHashCode()
object.GetType()
object.ToString()
Namespace: Google.Apps.Chat.V1
Assembly: Google.Apps.Chat.V1.dll
Syntax
public sealed class Annotation : IMessage<Annotation>, IEquatable<Annotation>, IDeepCloneable<Annotation>, IBufferMessage, IMessage

Constructors

Annotation()

Declaration
public Annotation()

Annotation(Annotation)

Declaration
public Annotation(Annotation other)
Parameters
Type Name Description
Annotation other

Properties

CustomEmojiMetadata

The metadata for a custom emoji.

Declaration
public CustomEmojiMetadata CustomEmojiMetadata { get; set; }
Property Value
Type Description
CustomEmojiMetadata

HasStartIndex

Gets whether the "start_index" field is set

Declaration
public bool HasStartIndex { get; }
Property Value
Type Description
bool

Length

Length of the substring in the plain-text message body this annotation corresponds to.

Declaration
public int Length { get; set; }
Property Value
Type Description
int

MetadataCase

Declaration
public Annotation.MetadataOneofCase MetadataCase { get; }
Property Value
Type Description
Annotation.MetadataOneofCase

RichLinkMetadata

The metadata for a rich link.

Declaration
public RichLinkMetadata RichLinkMetadata { get; set; }
Property Value
Type Description
RichLinkMetadata

SlashCommand

The metadata for a slash command.

Declaration
public SlashCommandMetadata SlashCommand { get; set; }
Property Value
Type Description
SlashCommandMetadata

StartIndex

Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to.

Declaration
public int StartIndex { get; set; }
Property Value
Type Description
int

Type

The type of this annotation.

Declaration
public AnnotationType Type { get; set; }
Property Value
Type Description
AnnotationType

UserMention

The metadata of user mention.

Declaration
public UserMentionMetadata UserMention { get; set; }
Property Value
Type Description
UserMentionMetadata
In this article
Back to top Generated by DocFX