1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 Google LLC 2*d5c09012SAndroid Build Coastguard Worker// 3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*d5c09012SAndroid Build Coastguard Worker// 7*d5c09012SAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*d5c09012SAndroid Build Coastguard Worker// 9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*d5c09012SAndroid Build Coastguard Worker// limitations under the License. 14*d5c09012SAndroid Build Coastguard Worker 15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3"; 16*d5c09012SAndroid Build Coastguard Worker 17*d5c09012SAndroid Build Coastguard Workerpackage google.chat.v1; 18*d5c09012SAndroid Build Coastguard Worker 19*d5c09012SAndroid Build Coastguard Workerimport "google/api/field_behavior.proto"; 20*d5c09012SAndroid Build Coastguard Workerimport "google/api/resource.proto"; 21*d5c09012SAndroid Build Coastguard Workerimport "google/apps/card/v1/card.proto"; 22*d5c09012SAndroid Build Coastguard Workerimport "google/chat/v1/action_status.proto"; 23*d5c09012SAndroid Build Coastguard Workerimport "google/chat/v1/annotation.proto"; 24*d5c09012SAndroid Build Coastguard Workerimport "google/chat/v1/attachment.proto"; 25*d5c09012SAndroid Build Coastguard Workerimport "google/chat/v1/contextual_addon.proto"; 26*d5c09012SAndroid Build Coastguard Workerimport "google/chat/v1/deletion_metadata.proto"; 27*d5c09012SAndroid Build Coastguard Workerimport "google/chat/v1/matched_url.proto"; 28*d5c09012SAndroid Build Coastguard Workerimport "google/chat/v1/reaction.proto"; 29*d5c09012SAndroid Build Coastguard Workerimport "google/chat/v1/slash_command.proto"; 30*d5c09012SAndroid Build Coastguard Workerimport "google/chat/v1/space.proto"; 31*d5c09012SAndroid Build Coastguard Workerimport "google/chat/v1/user.proto"; 32*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/field_mask.proto"; 33*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/timestamp.proto"; 34*d5c09012SAndroid Build Coastguard Worker 35*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Apps.Chat.V1"; 36*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; 37*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true; 38*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "MessageProto"; 39*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.chat.v1"; 40*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Apps\\Chat\\V1"; 41*d5c09012SAndroid Build Coastguard Workeroption ruby_package = "Google::Apps::Chat::V1"; 42*d5c09012SAndroid Build Coastguard Worker 43*d5c09012SAndroid Build Coastguard Worker// A message in a Google Chat space. 44*d5c09012SAndroid Build Coastguard Workermessage Message { 45*d5c09012SAndroid Build Coastguard Worker option (google.api.resource) = { 46*d5c09012SAndroid Build Coastguard Worker type: "chat.googleapis.com/Message" 47*d5c09012SAndroid Build Coastguard Worker pattern: "spaces/{space}/messages/{message}" 48*d5c09012SAndroid Build Coastguard Worker }; 49*d5c09012SAndroid Build Coastguard Worker 50*d5c09012SAndroid Build Coastguard Worker // Resource name of the message. 51*d5c09012SAndroid Build Coastguard Worker // 52*d5c09012SAndroid Build Coastguard Worker // Format: `spaces/{space}/messages/{message}` 53*d5c09012SAndroid Build Coastguard Worker // 54*d5c09012SAndroid Build Coastguard Worker // 55*d5c09012SAndroid Build Coastguard Worker // Where `{space}` is the ID of the space where the message is posted and 56*d5c09012SAndroid Build Coastguard Worker // `{message}` is a system-assigned ID for the message. For example, 57*d5c09012SAndroid Build Coastguard Worker // `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. 58*d5c09012SAndroid Build Coastguard Worker // 59*d5c09012SAndroid Build Coastguard Worker // If you set a custom ID when you create a message, you can use this ID to 60*d5c09012SAndroid Build Coastguard Worker // specify the message in a request by replacing `{message}` with the value 61*d5c09012SAndroid Build Coastguard Worker // from the `clientAssignedMessageId` field. For example, 62*d5c09012SAndroid Build Coastguard Worker // `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name 63*d5c09012SAndroid Build Coastguard Worker // a 64*d5c09012SAndroid Build Coastguard Worker // message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). 65*d5c09012SAndroid Build Coastguard Worker string name = 1; 66*d5c09012SAndroid Build Coastguard Worker 67*d5c09012SAndroid Build Coastguard Worker // Output only. The user who created the message. 68*d5c09012SAndroid Build Coastguard Worker // If your Chat app [authenticates as a 69*d5c09012SAndroid Build Coastguard Worker // user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), 70*d5c09012SAndroid Build Coastguard Worker // the output populates the 71*d5c09012SAndroid Build Coastguard Worker // [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) 72*d5c09012SAndroid Build Coastguard Worker // `name` and `type`. 73*d5c09012SAndroid Build Coastguard Worker User sender = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 74*d5c09012SAndroid Build Coastguard Worker 75*d5c09012SAndroid Build Coastguard Worker // Optional. Immutable. For spaces created in Chat, the time at which the 76*d5c09012SAndroid Build Coastguard Worker // message was created. This field is output only, except when used in import 77*d5c09012SAndroid Build Coastguard Worker // mode spaces. 78*d5c09012SAndroid Build Coastguard Worker // 79*d5c09012SAndroid Build Coastguard Worker // For import mode spaces, set this field to the historical timestamp at which 80*d5c09012SAndroid Build Coastguard Worker // the message was created in the source in order to preserve the original 81*d5c09012SAndroid Build Coastguard Worker // creation time. 82*d5c09012SAndroid Build Coastguard Worker google.protobuf.Timestamp create_time = 3 [ 83*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = IMMUTABLE, 84*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = OPTIONAL 85*d5c09012SAndroid Build Coastguard Worker ]; 86*d5c09012SAndroid Build Coastguard Worker 87*d5c09012SAndroid Build Coastguard Worker // Output only. The time at which the message was last edited by a user. If 88*d5c09012SAndroid Build Coastguard Worker // the message has never been edited, this field is empty. 89*d5c09012SAndroid Build Coastguard Worker google.protobuf.Timestamp last_update_time = 23 90*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OUTPUT_ONLY]; 91*d5c09012SAndroid Build Coastguard Worker 92*d5c09012SAndroid Build Coastguard Worker // Output only. The time at which the message was deleted in 93*d5c09012SAndroid Build Coastguard Worker // Google Chat. If the message is never deleted, this field is empty. 94*d5c09012SAndroid Build Coastguard Worker google.protobuf.Timestamp delete_time = 26 95*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OUTPUT_ONLY]; 96*d5c09012SAndroid Build Coastguard Worker 97*d5c09012SAndroid Build Coastguard Worker // Plain-text body of the message. The first link to an image, video, or web 98*d5c09012SAndroid Build Coastguard Worker // page generates a 99*d5c09012SAndroid Build Coastguard Worker // [preview chip](https://developers.google.com/workspace/chat/preview-links). 100*d5c09012SAndroid Build Coastguard Worker // You can also [@mention a Google Chat 101*d5c09012SAndroid Build Coastguard Worker // user](https://developers.google.com/workspace/chat/format-messages#messages-@mention), 102*d5c09012SAndroid Build Coastguard Worker // or everyone in the space. 103*d5c09012SAndroid Build Coastguard Worker // 104*d5c09012SAndroid Build Coastguard Worker // To learn about creating text messages, see [Send a text 105*d5c09012SAndroid Build Coastguard Worker // message](https://developers.google.com/workspace/chat/create-messages#create-text-messages). 106*d5c09012SAndroid Build Coastguard Worker string text = 4; 107*d5c09012SAndroid Build Coastguard Worker 108*d5c09012SAndroid Build Coastguard Worker // Output only. Contains the message `text` with markups added to communicate 109*d5c09012SAndroid Build Coastguard Worker // formatting. This field might not capture all formatting visible in the UI, 110*d5c09012SAndroid Build Coastguard Worker // but includes the following: 111*d5c09012SAndroid Build Coastguard Worker // 112*d5c09012SAndroid Build Coastguard Worker // * [Markup 113*d5c09012SAndroid Build Coastguard Worker // syntax](https://developers.google.com/workspace/chat/format-messages) 114*d5c09012SAndroid Build Coastguard Worker // for bold, italic, strikethrough, monospace, monospace block, and bulleted 115*d5c09012SAndroid Build Coastguard Worker // list. 116*d5c09012SAndroid Build Coastguard Worker // 117*d5c09012SAndroid Build Coastguard Worker // * [User 118*d5c09012SAndroid Build Coastguard Worker // mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) 119*d5c09012SAndroid Build Coastguard Worker // using the format `<users/{user}>`. 120*d5c09012SAndroid Build Coastguard Worker // 121*d5c09012SAndroid Build Coastguard Worker // * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the 122*d5c09012SAndroid Build Coastguard Worker // first string is the URL and the second is the rendered text—for example, 123*d5c09012SAndroid Build Coastguard Worker // `<http://example.com|custom text>`. 124*d5c09012SAndroid Build Coastguard Worker // 125*d5c09012SAndroid Build Coastguard Worker // * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`. 126*d5c09012SAndroid Build Coastguard Worker // This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning 127*d5c09012SAndroid Build Coastguard Worker // face emoji. 128*d5c09012SAndroid Build Coastguard Worker // 129*d5c09012SAndroid Build Coastguard Worker // For more information, see [View text formatting sent in a 130*d5c09012SAndroid Build Coastguard Worker // message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message) 131*d5c09012SAndroid Build Coastguard Worker string formatted_text = 43 [(google.api.field_behavior) = OUTPUT_ONLY]; 132*d5c09012SAndroid Build Coastguard Worker 133*d5c09012SAndroid Build Coastguard Worker // Deprecated: Use `cards_v2` instead. 134*d5c09012SAndroid Build Coastguard Worker // 135*d5c09012SAndroid Build Coastguard Worker // Rich, formatted, and interactive cards that you can use to display UI 136*d5c09012SAndroid Build Coastguard Worker // elements such as: formatted texts, buttons, and clickable images. Cards are 137*d5c09012SAndroid Build Coastguard Worker // normally displayed below the plain-text body of the message. `cards` and 138*d5c09012SAndroid Build Coastguard Worker // `cards_v2` can have a maximum size of 32 KB. 139*d5c09012SAndroid Build Coastguard Worker repeated ContextualAddOnMarkup.Card cards = 5 [deprecated = true]; 140*d5c09012SAndroid Build Coastguard Worker 141*d5c09012SAndroid Build Coastguard Worker // An array of 142*d5c09012SAndroid Build Coastguard Worker // [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards). 143*d5c09012SAndroid Build Coastguard Worker // 144*d5c09012SAndroid Build Coastguard Worker // Only Chat apps can create cards. If your Chat app [authenticates as a 145*d5c09012SAndroid Build Coastguard Worker // user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), 146*d5c09012SAndroid Build Coastguard Worker // the messages can't contain cards. 147*d5c09012SAndroid Build Coastguard Worker // 148*d5c09012SAndroid Build Coastguard Worker // To learn about cards and how to create them, see [Send card 149*d5c09012SAndroid Build Coastguard Worker // messages](https://developers.google.com/workspace/chat/create-messages#create). 150*d5c09012SAndroid Build Coastguard Worker // 151*d5c09012SAndroid Build Coastguard Worker // [Card builder](https://addons.gsuite.google.com/uikit/builder) 152*d5c09012SAndroid Build Coastguard Worker repeated CardWithId cards_v2 = 22; 153*d5c09012SAndroid Build Coastguard Worker 154*d5c09012SAndroid Build Coastguard Worker // Output only. Annotations associated with the `text` in this message. 155*d5c09012SAndroid Build Coastguard Worker repeated Annotation annotations = 10 156*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OUTPUT_ONLY]; 157*d5c09012SAndroid Build Coastguard Worker 158*d5c09012SAndroid Build Coastguard Worker // The thread the message belongs to. For example usage, see 159*d5c09012SAndroid Build Coastguard Worker // [Start or reply to a message 160*d5c09012SAndroid Build Coastguard Worker // thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). 161*d5c09012SAndroid Build Coastguard Worker Thread thread = 11; 162*d5c09012SAndroid Build Coastguard Worker 163*d5c09012SAndroid Build Coastguard Worker // If your Chat app [authenticates as a 164*d5c09012SAndroid Build Coastguard Worker // user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), 165*d5c09012SAndroid Build Coastguard Worker // the output populates the 166*d5c09012SAndroid Build Coastguard Worker // [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) 167*d5c09012SAndroid Build Coastguard Worker // `name`. 168*d5c09012SAndroid Build Coastguard Worker Space space = 12; 169*d5c09012SAndroid Build Coastguard Worker 170*d5c09012SAndroid Build Coastguard Worker // A plain-text description of the message's cards, used when the actual cards 171*d5c09012SAndroid Build Coastguard Worker // can't be displayed—for example, mobile notifications. 172*d5c09012SAndroid Build Coastguard Worker string fallback_text = 13; 173*d5c09012SAndroid Build Coastguard Worker 174*d5c09012SAndroid Build Coastguard Worker // Input only. Parameters that a Chat app can use to configure how its 175*d5c09012SAndroid Build Coastguard Worker // response is posted. 176*d5c09012SAndroid Build Coastguard Worker ActionResponse action_response = 14 177*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = INPUT_ONLY]; 178*d5c09012SAndroid Build Coastguard Worker 179*d5c09012SAndroid Build Coastguard Worker // Output only. Plain-text body of the message with all Chat app mentions 180*d5c09012SAndroid Build Coastguard Worker // stripped out. 181*d5c09012SAndroid Build Coastguard Worker string argument_text = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; 182*d5c09012SAndroid Build Coastguard Worker 183*d5c09012SAndroid Build Coastguard Worker // Output only. Slash command information, if applicable. 184*d5c09012SAndroid Build Coastguard Worker SlashCommand slash_command = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; 185*d5c09012SAndroid Build Coastguard Worker 186*d5c09012SAndroid Build Coastguard Worker // User-uploaded attachment. 187*d5c09012SAndroid Build Coastguard Worker repeated Attachment attachment = 18; 188*d5c09012SAndroid Build Coastguard Worker 189*d5c09012SAndroid Build Coastguard Worker // Output only. A URL in `spaces.messages.text` that matches a link preview 190*d5c09012SAndroid Build Coastguard Worker // pattern. For more information, see [Preview 191*d5c09012SAndroid Build Coastguard Worker // links](https://developers.google.com/workspace/chat/preview-links). 192*d5c09012SAndroid Build Coastguard Worker MatchedUrl matched_url = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; 193*d5c09012SAndroid Build Coastguard Worker 194*d5c09012SAndroid Build Coastguard Worker // Output only. When `true`, the message is a response in a reply thread. When 195*d5c09012SAndroid Build Coastguard Worker // `false`, the message is visible in the space's top-level conversation as 196*d5c09012SAndroid Build Coastguard Worker // either the first message of a thread or a message with no threaded replies. 197*d5c09012SAndroid Build Coastguard Worker // 198*d5c09012SAndroid Build Coastguard Worker // If the space doesn't support reply in threads, this field is always 199*d5c09012SAndroid Build Coastguard Worker // `false`. 200*d5c09012SAndroid Build Coastguard Worker bool thread_reply = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; 201*d5c09012SAndroid Build Coastguard Worker 202*d5c09012SAndroid Build Coastguard Worker // Optional. A custom ID for the message. You can use field to identify a 203*d5c09012SAndroid Build Coastguard Worker // message, or to get, delete, or update a message. To set a custom ID, 204*d5c09012SAndroid Build Coastguard Worker // specify the 205*d5c09012SAndroid Build Coastguard Worker // [`messageId`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id) 206*d5c09012SAndroid Build Coastguard Worker // field when you create the message. For details, see [Name a 207*d5c09012SAndroid Build Coastguard Worker // message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). 208*d5c09012SAndroid Build Coastguard Worker string client_assigned_message_id = 32; 209*d5c09012SAndroid Build Coastguard Worker 210*d5c09012SAndroid Build Coastguard Worker // Output only. The list of emoji reaction summaries on the message. 211*d5c09012SAndroid Build Coastguard Worker repeated EmojiReactionSummary emoji_reaction_summaries = 33 212*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OUTPUT_ONLY]; 213*d5c09012SAndroid Build Coastguard Worker 214*d5c09012SAndroid Build Coastguard Worker // Immutable. Input for creating a message, otherwise output only. The user 215*d5c09012SAndroid Build Coastguard Worker // that can view the message. When set, the message is private and only 216*d5c09012SAndroid Build Coastguard Worker // visible to the specified user and the Chat app. Link previews and 217*d5c09012SAndroid Build Coastguard Worker // attachments aren't supported for private messages. 218*d5c09012SAndroid Build Coastguard Worker // 219*d5c09012SAndroid Build Coastguard Worker // Only Chat apps can send private messages. If your Chat app [authenticates 220*d5c09012SAndroid Build Coastguard Worker // as a 221*d5c09012SAndroid Build Coastguard Worker // user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) 222*d5c09012SAndroid Build Coastguard Worker // to send a message, the message can't be private and must omit this field. 223*d5c09012SAndroid Build Coastguard Worker // 224*d5c09012SAndroid Build Coastguard Worker // For details, see [Send private messages to Google Chat 225*d5c09012SAndroid Build Coastguard Worker // users](https://developers.google.com/workspace/chat/private-messages). 226*d5c09012SAndroid Build Coastguard Worker User private_message_viewer = 36 [(google.api.field_behavior) = IMMUTABLE]; 227*d5c09012SAndroid Build Coastguard Worker 228*d5c09012SAndroid Build Coastguard Worker // Output only. Information about a deleted message. A message is deleted when 229*d5c09012SAndroid Build Coastguard Worker // `delete_time` is set. 230*d5c09012SAndroid Build Coastguard Worker DeletionMetadata deletion_metadata = 38 231*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OUTPUT_ONLY]; 232*d5c09012SAndroid Build Coastguard Worker 233*d5c09012SAndroid Build Coastguard Worker // Output only. Information about a message that's quoted by a Google Chat 234*d5c09012SAndroid Build Coastguard Worker // user in a space. Google Chat users can quote a message to reply to it. 235*d5c09012SAndroid Build Coastguard Worker QuotedMessageMetadata quoted_message_metadata = 39 236*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OUTPUT_ONLY]; 237*d5c09012SAndroid Build Coastguard Worker 238*d5c09012SAndroid Build Coastguard Worker // Output only. GIF images that are attached to the message. 239*d5c09012SAndroid Build Coastguard Worker repeated AttachedGif attached_gifs = 42 240*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OUTPUT_ONLY]; 241*d5c09012SAndroid Build Coastguard Worker 242*d5c09012SAndroid Build Coastguard Worker // One or more interactive widgets that appear at the bottom of a message. 243*d5c09012SAndroid Build Coastguard Worker // You can add accessory widgets to messages that contain text, cards, or both 244*d5c09012SAndroid Build Coastguard Worker // text and cards. Not supported for messages that contain dialogs. For 245*d5c09012SAndroid Build Coastguard Worker // details, see [Add interactive widgets at the bottom of a 246*d5c09012SAndroid Build Coastguard Worker // message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets). 247*d5c09012SAndroid Build Coastguard Worker // 248*d5c09012SAndroid Build Coastguard Worker // Creating a message with accessory widgets requires [app 249*d5c09012SAndroid Build Coastguard Worker // authentication] 250*d5c09012SAndroid Build Coastguard Worker // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). 251*d5c09012SAndroid Build Coastguard Worker repeated AccessoryWidget accessory_widgets = 44; 252*d5c09012SAndroid Build Coastguard Worker} 253*d5c09012SAndroid Build Coastguard Worker 254*d5c09012SAndroid Build Coastguard Worker// A GIF image that's specified by a URL. 255*d5c09012SAndroid Build Coastguard Workermessage AttachedGif { 256*d5c09012SAndroid Build Coastguard Worker // Output only. The URL that hosts the GIF image. 257*d5c09012SAndroid Build Coastguard Worker string uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 258*d5c09012SAndroid Build Coastguard Worker} 259*d5c09012SAndroid Build Coastguard Worker 260*d5c09012SAndroid Build Coastguard Worker// Information about a quoted message. 261*d5c09012SAndroid Build Coastguard Workermessage QuotedMessageMetadata { 262*d5c09012SAndroid Build Coastguard Worker option (google.api.resource) = { 263*d5c09012SAndroid Build Coastguard Worker type: "chat.googleapis.com/QuotedMessageMetadata" 264*d5c09012SAndroid Build Coastguard Worker pattern: "spaces/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata}" 265*d5c09012SAndroid Build Coastguard Worker }; 266*d5c09012SAndroid Build Coastguard Worker 267*d5c09012SAndroid Build Coastguard Worker // Output only. Resource name of the quoted message. 268*d5c09012SAndroid Build Coastguard Worker // 269*d5c09012SAndroid Build Coastguard Worker // Format: `spaces/{space}/messages/{message}` 270*d5c09012SAndroid Build Coastguard Worker string name = 1 [ 271*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = OUTPUT_ONLY, 272*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { type: "chat.googleapis.com/Message" } 273*d5c09012SAndroid Build Coastguard Worker ]; 274*d5c09012SAndroid Build Coastguard Worker 275*d5c09012SAndroid Build Coastguard Worker // Output only. The timestamp when the quoted message was created or when the 276*d5c09012SAndroid Build Coastguard Worker // quoted message was last updated. 277*d5c09012SAndroid Build Coastguard Worker google.protobuf.Timestamp last_update_time = 2 278*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OUTPUT_ONLY]; 279*d5c09012SAndroid Build Coastguard Worker} 280*d5c09012SAndroid Build Coastguard Worker 281*d5c09012SAndroid Build Coastguard Worker// A thread in a Google Chat space. For example usage, see 282*d5c09012SAndroid Build Coastguard Worker// [Start or reply to a message 283*d5c09012SAndroid Build Coastguard Worker// thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). 284*d5c09012SAndroid Build Coastguard Worker// 285*d5c09012SAndroid Build Coastguard Worker// If you specify a thread when creating a message, you can set the 286*d5c09012SAndroid Build Coastguard Worker// [`messageReplyOption`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#messagereplyoption) 287*d5c09012SAndroid Build Coastguard Worker// field to determine what happens if no matching thread is found. 288*d5c09012SAndroid Build Coastguard Workermessage Thread { 289*d5c09012SAndroid Build Coastguard Worker option (google.api.resource) = { 290*d5c09012SAndroid Build Coastguard Worker type: "chat.googleapis.com/Thread" 291*d5c09012SAndroid Build Coastguard Worker pattern: "spaces/{space}/threads/{thread}" 292*d5c09012SAndroid Build Coastguard Worker }; 293*d5c09012SAndroid Build Coastguard Worker 294*d5c09012SAndroid Build Coastguard Worker // Output only. Resource name of the thread. 295*d5c09012SAndroid Build Coastguard Worker // 296*d5c09012SAndroid Build Coastguard Worker // Example: `spaces/{space}/threads/{thread}` 297*d5c09012SAndroid Build Coastguard Worker string name = 1; 298*d5c09012SAndroid Build Coastguard Worker 299*d5c09012SAndroid Build Coastguard Worker // Optional. Input for creating or updating a thread. Otherwise, output only. 300*d5c09012SAndroid Build Coastguard Worker // ID for the thread. Supports up to 4000 characters. 301*d5c09012SAndroid Build Coastguard Worker // 302*d5c09012SAndroid Build Coastguard Worker // This ID is unique to the Chat app that sets it. For example, if 303*d5c09012SAndroid Build Coastguard Worker // multiple Chat apps create a message using the same thread key, 304*d5c09012SAndroid Build Coastguard Worker // the messages are posted in different threads. To reply in a 305*d5c09012SAndroid Build Coastguard Worker // thread created by a person or another Chat app, specify the thread `name` 306*d5c09012SAndroid Build Coastguard Worker // field instead. 307*d5c09012SAndroid Build Coastguard Worker string thread_key = 3 [(google.api.field_behavior) = OPTIONAL]; 308*d5c09012SAndroid Build Coastguard Worker} 309*d5c09012SAndroid Build Coastguard Worker 310*d5c09012SAndroid Build Coastguard Worker// Parameters that a Chat app can use to configure how its response is posted. 311*d5c09012SAndroid Build Coastguard Workermessage ActionResponse { 312*d5c09012SAndroid Build Coastguard Worker // The type of Chat app response. 313*d5c09012SAndroid Build Coastguard Worker enum ResponseType { 314*d5c09012SAndroid Build Coastguard Worker // Default type that's handled as `NEW_MESSAGE`. 315*d5c09012SAndroid Build Coastguard Worker TYPE_UNSPECIFIED = 0; 316*d5c09012SAndroid Build Coastguard Worker 317*d5c09012SAndroid Build Coastguard Worker // Post as a new message in the topic. 318*d5c09012SAndroid Build Coastguard Worker NEW_MESSAGE = 1; 319*d5c09012SAndroid Build Coastguard Worker 320*d5c09012SAndroid Build Coastguard Worker // Update the Chat app's message. This is only permitted on a `CARD_CLICKED` 321*d5c09012SAndroid Build Coastguard Worker // event where the message sender type is `BOT`. 322*d5c09012SAndroid Build Coastguard Worker UPDATE_MESSAGE = 2; 323*d5c09012SAndroid Build Coastguard Worker 324*d5c09012SAndroid Build Coastguard Worker // Update the cards on a user's message. This is only permitted as a 325*d5c09012SAndroid Build Coastguard Worker // response to a `MESSAGE` event with a matched url, or a `CARD_CLICKED` 326*d5c09012SAndroid Build Coastguard Worker // event where the message sender type is `HUMAN`. Text is ignored. 327*d5c09012SAndroid Build Coastguard Worker UPDATE_USER_MESSAGE_CARDS = 6; 328*d5c09012SAndroid Build Coastguard Worker 329*d5c09012SAndroid Build Coastguard Worker // Privately ask the user for additional authentication or configuration. 330*d5c09012SAndroid Build Coastguard Worker REQUEST_CONFIG = 3; 331*d5c09012SAndroid Build Coastguard Worker 332*d5c09012SAndroid Build Coastguard Worker // Presents a 333*d5c09012SAndroid Build Coastguard Worker // [dialog](https://developers.google.com/workspace/chat/dialogs). 334*d5c09012SAndroid Build Coastguard Worker DIALOG = 4; 335*d5c09012SAndroid Build Coastguard Worker 336*d5c09012SAndroid Build Coastguard Worker // Widget text autocomplete options query. 337*d5c09012SAndroid Build Coastguard Worker UPDATE_WIDGET = 7; 338*d5c09012SAndroid Build Coastguard Worker } 339*d5c09012SAndroid Build Coastguard Worker 340*d5c09012SAndroid Build Coastguard Worker // List of widget autocomplete results. 341*d5c09012SAndroid Build Coastguard Worker message SelectionItems { 342*d5c09012SAndroid Build Coastguard Worker // An array of the SelectionItem objects. 343*d5c09012SAndroid Build Coastguard Worker repeated google.apps.card.v1.SelectionInput.SelectionItem items = 1; 344*d5c09012SAndroid Build Coastguard Worker } 345*d5c09012SAndroid Build Coastguard Worker 346*d5c09012SAndroid Build Coastguard Worker // The response of the updated widget. 347*d5c09012SAndroid Build Coastguard Worker // Used to provide autocomplete options for a widget. 348*d5c09012SAndroid Build Coastguard Worker message UpdatedWidget { 349*d5c09012SAndroid Build Coastguard Worker // The widget updated in response to a user action. 350*d5c09012SAndroid Build Coastguard Worker oneof updated_widget { 351*d5c09012SAndroid Build Coastguard Worker // List of widget autocomplete results 352*d5c09012SAndroid Build Coastguard Worker SelectionItems suggestions = 1; 353*d5c09012SAndroid Build Coastguard Worker } 354*d5c09012SAndroid Build Coastguard Worker 355*d5c09012SAndroid Build Coastguard Worker // The ID of the updated widget. The ID must match the one for the 356*d5c09012SAndroid Build Coastguard Worker // widget that triggered the update request. 357*d5c09012SAndroid Build Coastguard Worker string widget = 2; 358*d5c09012SAndroid Build Coastguard Worker } 359*d5c09012SAndroid Build Coastguard Worker 360*d5c09012SAndroid Build Coastguard Worker // Input only. The type of Chat app response. 361*d5c09012SAndroid Build Coastguard Worker ResponseType type = 1 [(google.api.field_behavior) = INPUT_ONLY]; 362*d5c09012SAndroid Build Coastguard Worker 363*d5c09012SAndroid Build Coastguard Worker // Input only. URL for users to authenticate or configure. (Only for 364*d5c09012SAndroid Build Coastguard Worker // `REQUEST_CONFIG` response types.) 365*d5c09012SAndroid Build Coastguard Worker string url = 2 [(google.api.field_behavior) = INPUT_ONLY]; 366*d5c09012SAndroid Build Coastguard Worker 367*d5c09012SAndroid Build Coastguard Worker // Input only. A response to an interaction event related to a 368*d5c09012SAndroid Build Coastguard Worker // [dialog](https://developers.google.com/workspace/chat/dialogs). Must be 369*d5c09012SAndroid Build Coastguard Worker // accompanied by `ResponseType.Dialog`. 370*d5c09012SAndroid Build Coastguard Worker DialogAction dialog_action = 3 [(google.api.field_behavior) = INPUT_ONLY]; 371*d5c09012SAndroid Build Coastguard Worker 372*d5c09012SAndroid Build Coastguard Worker // Input only. The response of the updated widget. 373*d5c09012SAndroid Build Coastguard Worker UpdatedWidget updated_widget = 4 [(google.api.field_behavior) = INPUT_ONLY]; 374*d5c09012SAndroid Build Coastguard Worker} 375*d5c09012SAndroid Build Coastguard Worker 376*d5c09012SAndroid Build Coastguard Worker// One or more interactive widgets that appear at the bottom of a message. For 377*d5c09012SAndroid Build Coastguard Worker// details, see [Add interactive widgets at the bottom of a 378*d5c09012SAndroid Build Coastguard Worker// message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets). 379*d5c09012SAndroid Build Coastguard Workermessage AccessoryWidget { 380*d5c09012SAndroid Build Coastguard Worker // The type of action. 381*d5c09012SAndroid Build Coastguard Worker oneof action { 382*d5c09012SAndroid Build Coastguard Worker // A list of buttons. 383*d5c09012SAndroid Build Coastguard Worker google.apps.card.v1.ButtonList button_list = 1; 384*d5c09012SAndroid Build Coastguard Worker } 385*d5c09012SAndroid Build Coastguard Worker} 386*d5c09012SAndroid Build Coastguard Worker 387*d5c09012SAndroid Build Coastguard Worker// Request to get a message. 388*d5c09012SAndroid Build Coastguard Workermessage GetMessageRequest { 389*d5c09012SAndroid Build Coastguard Worker // Required. Resource name of the message. 390*d5c09012SAndroid Build Coastguard Worker // 391*d5c09012SAndroid Build Coastguard Worker // Format: `spaces/{space}/messages/{message}` 392*d5c09012SAndroid Build Coastguard Worker // 393*d5c09012SAndroid Build Coastguard Worker // If you've set a custom ID for your message, you can use the value from the 394*d5c09012SAndroid Build Coastguard Worker // `clientAssignedMessageId` field for `{message}`. For details, see [Name a 395*d5c09012SAndroid Build Coastguard Worker // message] 396*d5c09012SAndroid Build Coastguard Worker // (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). 397*d5c09012SAndroid Build Coastguard Worker string name = 1 [ 398*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = REQUIRED, 399*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { type: "chat.googleapis.com/Message" } 400*d5c09012SAndroid Build Coastguard Worker ]; 401*d5c09012SAndroid Build Coastguard Worker} 402*d5c09012SAndroid Build Coastguard Worker 403*d5c09012SAndroid Build Coastguard Worker// Request to delete a message. 404*d5c09012SAndroid Build Coastguard Workermessage DeleteMessageRequest { 405*d5c09012SAndroid Build Coastguard Worker // Required. Resource name of the message. 406*d5c09012SAndroid Build Coastguard Worker // 407*d5c09012SAndroid Build Coastguard Worker // Format: `spaces/{space}/messages/{message}` 408*d5c09012SAndroid Build Coastguard Worker // 409*d5c09012SAndroid Build Coastguard Worker // If you've set a custom ID for your message, you can use the value from the 410*d5c09012SAndroid Build Coastguard Worker // `clientAssignedMessageId` field for `{message}`. For details, see [Name a 411*d5c09012SAndroid Build Coastguard Worker // message] 412*d5c09012SAndroid Build Coastguard Worker // (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). 413*d5c09012SAndroid Build Coastguard Worker string name = 1 [ 414*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = REQUIRED, 415*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { type: "chat.googleapis.com/Message" } 416*d5c09012SAndroid Build Coastguard Worker ]; 417*d5c09012SAndroid Build Coastguard Worker 418*d5c09012SAndroid Build Coastguard Worker // When `true`, deleting a message also deletes its threaded replies. When 419*d5c09012SAndroid Build Coastguard Worker // `false`, if a message has threaded replies, deletion fails. 420*d5c09012SAndroid Build Coastguard Worker // 421*d5c09012SAndroid Build Coastguard Worker // Only applies when [authenticating as a 422*d5c09012SAndroid Build Coastguard Worker // user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). 423*d5c09012SAndroid Build Coastguard Worker // Has no effect when [authenticating as a Chat app] 424*d5c09012SAndroid Build Coastguard Worker // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). 425*d5c09012SAndroid Build Coastguard Worker bool force = 2; 426*d5c09012SAndroid Build Coastguard Worker} 427*d5c09012SAndroid Build Coastguard Worker 428*d5c09012SAndroid Build Coastguard Worker// Request to update a message. 429*d5c09012SAndroid Build Coastguard Workermessage UpdateMessageRequest { 430*d5c09012SAndroid Build Coastguard Worker // Required. Message with fields updated. 431*d5c09012SAndroid Build Coastguard Worker Message message = 1 [(google.api.field_behavior) = REQUIRED]; 432*d5c09012SAndroid Build Coastguard Worker 433*d5c09012SAndroid Build Coastguard Worker // Required. The field paths to update. Separate multiple values with commas 434*d5c09012SAndroid Build Coastguard Worker // or use `*` to update all field paths. 435*d5c09012SAndroid Build Coastguard Worker // 436*d5c09012SAndroid Build Coastguard Worker // Currently supported field paths: 437*d5c09012SAndroid Build Coastguard Worker // 438*d5c09012SAndroid Build Coastguard Worker // - `text` 439*d5c09012SAndroid Build Coastguard Worker // 440*d5c09012SAndroid Build Coastguard Worker // - `attachment` 441*d5c09012SAndroid Build Coastguard Worker // 442*d5c09012SAndroid Build Coastguard Worker // - `cards` (Requires [app 443*d5c09012SAndroid Build Coastguard Worker // authentication](/chat/api/guides/auth/service-accounts).) 444*d5c09012SAndroid Build Coastguard Worker // 445*d5c09012SAndroid Build Coastguard Worker // - `cards_v2` (Requires [app 446*d5c09012SAndroid Build Coastguard Worker // authentication](/chat/api/guides/auth/service-accounts).) 447*d5c09012SAndroid Build Coastguard Worker // 448*d5c09012SAndroid Build Coastguard Worker // - `accessory_widgets` (Requires [app 449*d5c09012SAndroid Build Coastguard Worker // authentication](/chat/api/guides/auth/service-accounts).) 450*d5c09012SAndroid Build Coastguard Worker google.protobuf.FieldMask update_mask = 2; 451*d5c09012SAndroid Build Coastguard Worker 452*d5c09012SAndroid Build Coastguard Worker // Optional. If `true` and the message isn't found, a new message is created 453*d5c09012SAndroid Build Coastguard Worker // and `updateMask` is ignored. The specified message ID must be 454*d5c09012SAndroid Build Coastguard Worker // [client-assigned](https://developers.google.com/workspace/chat/create-messages#name_a_created_message) 455*d5c09012SAndroid Build Coastguard Worker // or the request fails. 456*d5c09012SAndroid Build Coastguard Worker bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; 457*d5c09012SAndroid Build Coastguard Worker} 458*d5c09012SAndroid Build Coastguard Worker 459*d5c09012SAndroid Build Coastguard Worker// Creates a message. 460*d5c09012SAndroid Build Coastguard Workermessage CreateMessageRequest { 461*d5c09012SAndroid Build Coastguard Worker // Specifies how to reply to a message. 462*d5c09012SAndroid Build Coastguard Worker // More states might be added in the future. 463*d5c09012SAndroid Build Coastguard Worker enum MessageReplyOption { 464*d5c09012SAndroid Build Coastguard Worker // Default. Starts a new thread. Using this option ignores any [thread 465*d5c09012SAndroid Build Coastguard Worker // ID][google.chat.v1.Thread.name] or 466*d5c09012SAndroid Build Coastguard Worker // [`thread_key`][google.chat.v1.Thread.thread_key] that's included. 467*d5c09012SAndroid Build Coastguard Worker MESSAGE_REPLY_OPTION_UNSPECIFIED = 0; 468*d5c09012SAndroid Build Coastguard Worker 469*d5c09012SAndroid Build Coastguard Worker // Creates the message as a reply to the thread specified by [thread 470*d5c09012SAndroid Build Coastguard Worker // ID][google.chat.v1.Thread.name] or 471*d5c09012SAndroid Build Coastguard Worker // [`thread_key`][google.chat.v1.Thread.thread_key]. If it fails, the 472*d5c09012SAndroid Build Coastguard Worker // message starts a new thread instead. 473*d5c09012SAndroid Build Coastguard Worker REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD = 1; 474*d5c09012SAndroid Build Coastguard Worker 475*d5c09012SAndroid Build Coastguard Worker // Creates the message as a reply to the thread specified by [thread 476*d5c09012SAndroid Build Coastguard Worker // ID][google.chat.v1.Thread.name] or 477*d5c09012SAndroid Build Coastguard Worker // [`thread_key`][google.chat.v1.Thread.thread_key]. If a new `thread_key` 478*d5c09012SAndroid Build Coastguard Worker // is used, a new thread is created. If the message creation fails, a 479*d5c09012SAndroid Build Coastguard Worker // `NOT_FOUND` error is returned instead. 480*d5c09012SAndroid Build Coastguard Worker REPLY_MESSAGE_OR_FAIL = 2; 481*d5c09012SAndroid Build Coastguard Worker } 482*d5c09012SAndroid Build Coastguard Worker 483*d5c09012SAndroid Build Coastguard Worker // Required. The resource name of the space in which to create a message. 484*d5c09012SAndroid Build Coastguard Worker // 485*d5c09012SAndroid Build Coastguard Worker // Format: `spaces/{space}` 486*d5c09012SAndroid Build Coastguard Worker string parent = 1 [ 487*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = REQUIRED, 488*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { 489*d5c09012SAndroid Build Coastguard Worker child_type: "chat.googleapis.com/Message" 490*d5c09012SAndroid Build Coastguard Worker } 491*d5c09012SAndroid Build Coastguard Worker ]; 492*d5c09012SAndroid Build Coastguard Worker 493*d5c09012SAndroid Build Coastguard Worker // Required. Message body. 494*d5c09012SAndroid Build Coastguard Worker Message message = 4 [(google.api.field_behavior) = REQUIRED]; 495*d5c09012SAndroid Build Coastguard Worker 496*d5c09012SAndroid Build Coastguard Worker // Optional. Deprecated: Use 497*d5c09012SAndroid Build Coastguard Worker // [thread.thread_key][google.chat.v1.Thread.thread_key] instead. ID for the 498*d5c09012SAndroid Build Coastguard Worker // thread. Supports up to 4000 characters. To start or add to a thread, create 499*d5c09012SAndroid Build Coastguard Worker // a message and specify a `threadKey` or the 500*d5c09012SAndroid Build Coastguard Worker // [thread.name][google.chat.v1.Thread.name]. For example usage, see [Start or 501*d5c09012SAndroid Build Coastguard Worker // reply to a message 502*d5c09012SAndroid Build Coastguard Worker // thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). 503*d5c09012SAndroid Build Coastguard Worker string thread_key = 6 504*d5c09012SAndroid Build Coastguard Worker [deprecated = true, (google.api.field_behavior) = OPTIONAL]; 505*d5c09012SAndroid Build Coastguard Worker 506*d5c09012SAndroid Build Coastguard Worker // Optional. A unique request ID for this message. Specifying an existing 507*d5c09012SAndroid Build Coastguard Worker // request ID returns the message created with that ID instead of creating a 508*d5c09012SAndroid Build Coastguard Worker // new message. 509*d5c09012SAndroid Build Coastguard Worker string request_id = 7 [(google.api.field_behavior) = OPTIONAL]; 510*d5c09012SAndroid Build Coastguard Worker 511*d5c09012SAndroid Build Coastguard Worker // Optional. Specifies whether a message starts a thread or replies to one. 512*d5c09012SAndroid Build Coastguard Worker // Only supported in named spaces. 513*d5c09012SAndroid Build Coastguard Worker MessageReplyOption message_reply_option = 8 514*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OPTIONAL]; 515*d5c09012SAndroid Build Coastguard Worker 516*d5c09012SAndroid Build Coastguard Worker // Optional. A custom ID for a message. Lets Chat apps get, update, or delete 517*d5c09012SAndroid Build Coastguard Worker // a message without needing to store the system-assigned ID in the message's 518*d5c09012SAndroid Build Coastguard Worker // resource name (represented in the message `name` field). 519*d5c09012SAndroid Build Coastguard Worker // 520*d5c09012SAndroid Build Coastguard Worker // The value for this field must meet the following requirements: 521*d5c09012SAndroid Build Coastguard Worker // 522*d5c09012SAndroid Build Coastguard Worker // * Begins with `client-`. For example, `client-custom-name` is a valid 523*d5c09012SAndroid Build Coastguard Worker // custom ID, but `custom-name` is not. 524*d5c09012SAndroid Build Coastguard Worker // * Contains up to 63 characters and only lowercase letters, numbers, and 525*d5c09012SAndroid Build Coastguard Worker // hyphens. 526*d5c09012SAndroid Build Coastguard Worker // * Is unique within a space. A Chat app can't use the same custom ID for 527*d5c09012SAndroid Build Coastguard Worker // different messages. 528*d5c09012SAndroid Build Coastguard Worker // 529*d5c09012SAndroid Build Coastguard Worker // For details, see [Name a 530*d5c09012SAndroid Build Coastguard Worker // message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). 531*d5c09012SAndroid Build Coastguard Worker string message_id = 9 [(google.api.field_behavior) = OPTIONAL]; 532*d5c09012SAndroid Build Coastguard Worker} 533*d5c09012SAndroid Build Coastguard Worker 534*d5c09012SAndroid Build Coastguard Worker// Lists messages in the specified space, that the user is a member of. 535*d5c09012SAndroid Build Coastguard Workermessage ListMessagesRequest { 536*d5c09012SAndroid Build Coastguard Worker // Required. The resource name of the space to list messages from. 537*d5c09012SAndroid Build Coastguard Worker // 538*d5c09012SAndroid Build Coastguard Worker // Format: `spaces/{space}` 539*d5c09012SAndroid Build Coastguard Worker string parent = 1 [ 540*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = REQUIRED, 541*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { 542*d5c09012SAndroid Build Coastguard Worker child_type: "chat.googleapis.com/Message" 543*d5c09012SAndroid Build Coastguard Worker } 544*d5c09012SAndroid Build Coastguard Worker ]; 545*d5c09012SAndroid Build Coastguard Worker 546*d5c09012SAndroid Build Coastguard Worker // The maximum number of messages returned. The service might return fewer 547*d5c09012SAndroid Build Coastguard Worker // messages than this value. 548*d5c09012SAndroid Build Coastguard Worker // 549*d5c09012SAndroid Build Coastguard Worker // If unspecified, at most 25 are returned. 550*d5c09012SAndroid Build Coastguard Worker // 551*d5c09012SAndroid Build Coastguard Worker // The maximum value is 1000. If you use a value more than 1000, it's 552*d5c09012SAndroid Build Coastguard Worker // automatically changed to 1000. 553*d5c09012SAndroid Build Coastguard Worker // 554*d5c09012SAndroid Build Coastguard Worker // Negative values return an `INVALID_ARGUMENT` error. 555*d5c09012SAndroid Build Coastguard Worker int32 page_size = 2; 556*d5c09012SAndroid Build Coastguard Worker 557*d5c09012SAndroid Build Coastguard Worker // Optional, if resuming from a previous query. 558*d5c09012SAndroid Build Coastguard Worker // 559*d5c09012SAndroid Build Coastguard Worker // A page token received from a previous list messages call. Provide this 560*d5c09012SAndroid Build Coastguard Worker // parameter to retrieve the subsequent page. 561*d5c09012SAndroid Build Coastguard Worker // 562*d5c09012SAndroid Build Coastguard Worker // When paginating, all other parameters provided should match the call that 563*d5c09012SAndroid Build Coastguard Worker // provided the page token. Passing different values to the other parameters 564*d5c09012SAndroid Build Coastguard Worker // might lead to unexpected results. 565*d5c09012SAndroid Build Coastguard Worker string page_token = 3; 566*d5c09012SAndroid Build Coastguard Worker 567*d5c09012SAndroid Build Coastguard Worker // A query filter. 568*d5c09012SAndroid Build Coastguard Worker // 569*d5c09012SAndroid Build Coastguard Worker // You can filter messages by date (`create_time`) and thread (`thread.name`). 570*d5c09012SAndroid Build Coastguard Worker // 571*d5c09012SAndroid Build Coastguard Worker // To filter messages by the date they were created, specify the `create_time` 572*d5c09012SAndroid Build Coastguard Worker // with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) 573*d5c09012SAndroid Build Coastguard Worker // format and double quotation marks. For example, 574*d5c09012SAndroid Build Coastguard Worker // `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to 575*d5c09012SAndroid Build Coastguard Worker // list messages that were created after a timestamp, or the less than 576*d5c09012SAndroid Build Coastguard Worker // operator `<` to list messages that were created before a timestamp. To 577*d5c09012SAndroid Build Coastguard Worker // filter messages within a time interval, use the `AND` operator between two 578*d5c09012SAndroid Build Coastguard Worker // timestamps. 579*d5c09012SAndroid Build Coastguard Worker // 580*d5c09012SAndroid Build Coastguard Worker // To filter by thread, specify the `thread.name`, formatted as 581*d5c09012SAndroid Build Coastguard Worker // `spaces/{space}/threads/{thread}`. You can only specify one 582*d5c09012SAndroid Build Coastguard Worker // `thread.name` per query. 583*d5c09012SAndroid Build Coastguard Worker // 584*d5c09012SAndroid Build Coastguard Worker // To filter by both thread and date, use the `AND` operator in your query. 585*d5c09012SAndroid Build Coastguard Worker // 586*d5c09012SAndroid Build Coastguard Worker // For example, the following queries are valid: 587*d5c09012SAndroid Build Coastguard Worker // 588*d5c09012SAndroid Build Coastguard Worker // ``` 589*d5c09012SAndroid Build Coastguard Worker // create_time > "2012-04-21T11:30:00-04:00" 590*d5c09012SAndroid Build Coastguard Worker // 591*d5c09012SAndroid Build Coastguard Worker // create_time > "2012-04-21T11:30:00-04:00" AND 592*d5c09012SAndroid Build Coastguard Worker // thread.name = spaces/AAAAAAAAAAA/threads/123 593*d5c09012SAndroid Build Coastguard Worker // 594*d5c09012SAndroid Build Coastguard Worker // create_time > "2012-04-21T11:30:00+00:00" AND 595*d5c09012SAndroid Build Coastguard Worker // 596*d5c09012SAndroid Build Coastguard Worker // create_time < "2013-01-01T00:00:00+00:00" AND 597*d5c09012SAndroid Build Coastguard Worker // thread.name = spaces/AAAAAAAAAAA/threads/123 598*d5c09012SAndroid Build Coastguard Worker // 599*d5c09012SAndroid Build Coastguard Worker // thread.name = spaces/AAAAAAAAAAA/threads/123 600*d5c09012SAndroid Build Coastguard Worker // ``` 601*d5c09012SAndroid Build Coastguard Worker // 602*d5c09012SAndroid Build Coastguard Worker // Invalid queries are rejected by the server with an `INVALID_ARGUMENT` 603*d5c09012SAndroid Build Coastguard Worker // error. 604*d5c09012SAndroid Build Coastguard Worker string filter = 4; 605*d5c09012SAndroid Build Coastguard Worker 606*d5c09012SAndroid Build Coastguard Worker // Optional, if resuming from a previous query. 607*d5c09012SAndroid Build Coastguard Worker // 608*d5c09012SAndroid Build Coastguard Worker // How the list of messages is ordered. Specify a value to order by an 609*d5c09012SAndroid Build Coastguard Worker // ordering operation. Valid ordering operation values are as follows: 610*d5c09012SAndroid Build Coastguard Worker // 611*d5c09012SAndroid Build Coastguard Worker // - `ASC` for ascending. 612*d5c09012SAndroid Build Coastguard Worker // 613*d5c09012SAndroid Build Coastguard Worker // - `DESC` for descending. 614*d5c09012SAndroid Build Coastguard Worker // 615*d5c09012SAndroid Build Coastguard Worker // The default ordering is `create_time ASC`. 616*d5c09012SAndroid Build Coastguard Worker string order_by = 5; 617*d5c09012SAndroid Build Coastguard Worker 618*d5c09012SAndroid Build Coastguard Worker // Whether to include deleted messages. Deleted messages include deleted time 619*d5c09012SAndroid Build Coastguard Worker // and metadata about their deletion, but message content is unavailable. 620*d5c09012SAndroid Build Coastguard Worker bool show_deleted = 6; 621*d5c09012SAndroid Build Coastguard Worker} 622*d5c09012SAndroid Build Coastguard Worker 623*d5c09012SAndroid Build Coastguard Worker// Response message for listing messages. 624*d5c09012SAndroid Build Coastguard Workermessage ListMessagesResponse { 625*d5c09012SAndroid Build Coastguard Worker // List of messages. 626*d5c09012SAndroid Build Coastguard Worker repeated Message messages = 1; 627*d5c09012SAndroid Build Coastguard Worker 628*d5c09012SAndroid Build Coastguard Worker // You can send a token as `pageToken` to retrieve the next page of 629*d5c09012SAndroid Build Coastguard Worker // results. If empty, there are no subsequent pages. 630*d5c09012SAndroid Build Coastguard Worker string next_page_token = 2; 631*d5c09012SAndroid Build Coastguard Worker} 632*d5c09012SAndroid Build Coastguard Worker 633*d5c09012SAndroid Build Coastguard Worker// Contains a 634*d5c09012SAndroid Build Coastguard Worker// [dialog](https://developers.google.com/workspace/chat/dialogs) and request 635*d5c09012SAndroid Build Coastguard Worker// status code. 636*d5c09012SAndroid Build Coastguard Workermessage DialogAction { 637*d5c09012SAndroid Build Coastguard Worker // Action to perform. 638*d5c09012SAndroid Build Coastguard Worker oneof action { 639*d5c09012SAndroid Build Coastguard Worker // Input only. 640*d5c09012SAndroid Build Coastguard Worker // [Dialog](https://developers.google.com/workspace/chat/dialogs) for the 641*d5c09012SAndroid Build Coastguard Worker // request. 642*d5c09012SAndroid Build Coastguard Worker Dialog dialog = 1 [(google.api.field_behavior) = INPUT_ONLY]; 643*d5c09012SAndroid Build Coastguard Worker } 644*d5c09012SAndroid Build Coastguard Worker 645*d5c09012SAndroid Build Coastguard Worker // Input only. Status for a request to either invoke or submit a 646*d5c09012SAndroid Build Coastguard Worker // [dialog](https://developers.google.com/workspace/chat/dialogs). Displays 647*d5c09012SAndroid Build Coastguard Worker // a status and message to users, if necessary. 648*d5c09012SAndroid Build Coastguard Worker // For example, in case of an error or success. 649*d5c09012SAndroid Build Coastguard Worker ActionStatus action_status = 2 [(google.api.field_behavior) = INPUT_ONLY]; 650*d5c09012SAndroid Build Coastguard Worker} 651*d5c09012SAndroid Build Coastguard Worker 652*d5c09012SAndroid Build Coastguard Worker// Wrapper around the card body of the dialog. 653*d5c09012SAndroid Build Coastguard Workermessage Dialog { 654*d5c09012SAndroid Build Coastguard Worker // Input only. Body of the dialog, which is rendered in a modal. 655*d5c09012SAndroid Build Coastguard Worker // Google Chat apps don't support the following card entities: 656*d5c09012SAndroid Build Coastguard Worker // `DateTimePicker`, `OnChangeAction`. 657*d5c09012SAndroid Build Coastguard Worker google.apps.card.v1.Card body = 1 [(google.api.field_behavior) = INPUT_ONLY]; 658*d5c09012SAndroid Build Coastguard Worker} 659*d5c09012SAndroid Build Coastguard Worker 660*d5c09012SAndroid Build Coastguard Worker// A 661*d5c09012SAndroid Build Coastguard Worker// [card](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards) 662*d5c09012SAndroid Build Coastguard Worker// in a Google Chat message. 663*d5c09012SAndroid Build Coastguard Worker// 664*d5c09012SAndroid Build Coastguard Worker// Only Chat apps can create cards. If your Chat app [authenticates as a 665*d5c09012SAndroid Build Coastguard Worker// user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), 666*d5c09012SAndroid Build Coastguard Worker// the message can't contain cards. 667*d5c09012SAndroid Build Coastguard Worker// 668*d5c09012SAndroid Build Coastguard Worker// [Card builder](https://addons.gsuite.google.com/uikit/builder) 669*d5c09012SAndroid Build Coastguard Workermessage CardWithId { 670*d5c09012SAndroid Build Coastguard Worker // Required if the message contains multiple cards. A unique identifier for 671*d5c09012SAndroid Build Coastguard Worker // a card in a message. 672*d5c09012SAndroid Build Coastguard Worker string card_id = 1; 673*d5c09012SAndroid Build Coastguard Worker 674*d5c09012SAndroid Build Coastguard Worker // A card. Maximum size is 32 KB. 675*d5c09012SAndroid Build Coastguard Worker google.apps.card.v1.Card card = 2; 676*d5c09012SAndroid Build Coastguard Worker} 677