Skip to content

Commit

Permalink
feat: add rich link annotation type
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 615897483
  • Loading branch information
Google APIs authored and Copybara-Service committed Mar 14, 2024
1 parent 65277dd commit f5ed6db
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions google/chat/v1/annotation.proto
Expand Up @@ -16,6 +16,7 @@ syntax = "proto3";

package google.chat.v1;

import "google/chat/v1/attachment.proto";
import "google/chat/v1/user.proto";

option csharp_namespace = "Google.Apps.Chat.V1";
Expand Down Expand Up @@ -72,6 +73,9 @@ message Annotation {

// The metadata for a slash command.
SlashCommandMetadata slash_command = 5;

// The metadata for a rich link.
RichLinkMetadata rich_link_metadata = 6;
}
}

Expand Down Expand Up @@ -124,6 +128,41 @@ message SlashCommandMetadata {
bool triggers_dialog = 5;
}

// A rich link to a resource.
message RichLinkMetadata {
// The rich link type. More types might be added in the future.
enum RichLinkType {
// Default value for the enum. Don't use.
RICH_LINK_TYPE_UNSPECIFIED = 0;

// A Google Drive rich link type.
DRIVE_FILE = 1;
}

// The URI of this link.
string uri = 1;

// The rich link type.
RichLinkType rich_link_type = 2;

// Data for the linked resource.
oneof data {
// Data for a drive link.
DriveLinkData drive_link_data = 3;
}
}

// Data for Google Drive links.
message DriveLinkData {
// A
// [DriveDataRef](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref)
// which references a Google Drive file.
DriveDataRef drive_data_ref = 1;

// The mime type of the linked Google Drive resource.
string mime_type = 2;
}

// Type of the annotation.
enum AnnotationType {
// Default value for the enum. Don't use.
Expand All @@ -134,4 +173,7 @@ enum AnnotationType {

// A slash command is invoked.
SLASH_COMMAND = 2;

// A rich link annotation.
RICH_LINK = 3;
}

0 comments on commit f5ed6db

Please sign in to comment.