@@ -61,13 +61,74 @@ message Emoji {
6161 }
6262}
6363
64- // Represents a custom emoji.
64+ // Represents a [ custom emoji](https://support.google.com/chat/answer/12800149) .
6565message CustomEmoji {
66+ option (google.api.resource ) = {
67+ type : "chat.googleapis.com/CustomEmoji"
68+ pattern : "customEmojis/{custom_emoji}"
69+ plural : "customEmojis"
70+ singular : "customEmoji"
71+ };
72+
73+ // Payload data for the custom emoji.
74+ message CustomEmojiPayload {
75+ // Required. Input only. The image used for the custom emoji.
76+ //
77+ // The payload must be under 256 KB and the dimension of
78+ // the image must be square and between 64 and 500 pixels. The
79+ // restrictions are subject to change.
80+ bytes file_content = 1 [
81+ (google.api.field_behavior ) = INPUT_ONLY ,
82+ (google.api.field_behavior ) = REQUIRED
83+ ];
84+
85+ // Required. Input only. The image file name.
86+ //
87+ // Supported file extensions: `.png`, `.jpg`, `.gif`.
88+ string filename = 2 [
89+ (google.api.field_behavior ) = INPUT_ONLY ,
90+ (google.api.field_behavior ) = REQUIRED
91+ ];
92+ }
93+
94+ // Identifier. The resource name of the custom emoji, assigned by the server.
95+ //
96+ // Format: `customEmojis/{customEmoji}`
97+ string name = 2 [(google.api.field_behavior ) = IDENTIFIER ];
98+
6699 // Output only. Unique key for the custom emoji resource.
67100 string uid = 1 [
68101 (google.api.field_info ).format = UUID4 ,
69102 (google.api.field_behavior ) = OUTPUT_ONLY
70103 ];
104+
105+ // Optional. Immutable. User-provided name for the custom emoji, which is
106+ // unique within the organization.
107+ //
108+ // Required when the custom emoji is created, output only otherwise.
109+ //
110+ // Emoji names must start and end with colons, must be lowercase and can only
111+ // contain alphanumeric characters, hyphens, and underscores.
112+ // Hyphens and underscores should be used to separate words and cannot be used
113+ // consecutively.
114+ //
115+ // Example: `:valid-emoji-name:`
116+ string emoji_name = 3 [
117+ (google.api.field_behavior ) = OPTIONAL ,
118+ (google.api.field_behavior ) = IMMUTABLE
119+ ];
120+
121+ // Output only. A temporary image URL for the custom emoji, valid for at least
122+ // 10 minutes. Note that this is not populated in the response when the custom
123+ // emoji is created.
124+ string temporary_image_uri = 4 [(google.api.field_behavior ) = OUTPUT_ONLY ];
125+
126+ // Optional. Input only. Payload data.
127+ // Required when the custom emoji is created.
128+ CustomEmojiPayload payload = 5 [
129+ (google.api.field_behavior ) = INPUT_ONLY ,
130+ (google.api.field_behavior ) = OPTIONAL
131+ ];
71132}
72133
73134// The number of people who reacted to a message with a specific emoji.
@@ -163,8 +224,7 @@ message ListReactionsRequest {
163224 // AND user.name = "users/{user}"
164225 // ```
165226 //
166- // Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
167- // error.
227+ // Invalid queries are rejected with an `INVALID_ARGUMENT` error.
168228 string filter = 4 [(google.api.field_behavior ) = OPTIONAL ];
169229}
170230
@@ -188,3 +248,88 @@ message DeleteReactionRequest {
188248 (google.api.resource_reference ) = { type : "chat.googleapis.com/Reaction" }
189249 ];
190250}
251+
252+ // A request to create a custom emoji.
253+ message CreateCustomEmojiRequest {
254+ // Required. The custom emoji to create.
255+ CustomEmoji custom_emoji = 1 [(google.api.field_behavior ) = REQUIRED ];
256+ }
257+
258+ // A request to return a single custom emoji.
259+ message GetCustomEmojiRequest {
260+ // Required. Resource name of the custom emoji.
261+ //
262+ // Format: `customEmojis/{customEmoji}`
263+ //
264+ // You can use the emoji name as an alias for `{customEmoji}`. For example,
265+ // `customEmojis/:example-emoji:` where `:example-emoji:` is the emoji name
266+ // for a custom emoji.
267+ string name = 1 [
268+ (google.api.field_behavior ) = REQUIRED ,
269+ (google.api.resource_reference ) = {
270+ type : "chat.googleapis.com/CustomEmoji"
271+ }
272+ ];
273+ }
274+
275+ // A request to return a list of custom emojis.
276+ message ListCustomEmojisRequest {
277+ // Optional. The maximum number of custom emojis returned. The service can
278+ // return fewer custom emojis than this value. If unspecified, the default
279+ // value is 25. The maximum value is 200; values above 200 are changed to 200.
280+ int32 page_size = 1 [(google.api.field_behavior ) = OPTIONAL ];
281+
282+ // Optional. (If resuming from a previous query.)
283+ //
284+ // A page token received from a previous list custom emoji call. Provide this
285+ // to retrieve the subsequent page.
286+ //
287+ // When paginating, the filter value should match the call that provided the
288+ // page token. Passing a different value might lead to unexpected results.
289+ string page_token = 2 [(google.api.field_behavior ) = OPTIONAL ];
290+
291+ // Optional. A query filter.
292+ //
293+ // Supports filtering by creator.
294+ //
295+ // To filter by creator, you must specify a valid value. Currently only
296+ // `creator("users/me")` and `NOT creator("users/me")` are accepted to filter
297+ // custom emojis by whether they were created by the calling user or not.
298+ //
299+ // For example, the following query returns custom emojis created by the
300+ // caller:
301+ // ```
302+ // creator("users/me")
303+ // ```
304+ //
305+ // Invalid queries are rejected with an `INVALID_ARGUMENT` error.
306+ string filter = 3 [(google.api.field_behavior ) = OPTIONAL ];
307+ }
308+
309+ // A response to list custom emojis.
310+ message ListCustomEmojisResponse {
311+ // Unordered list. List of custom emojis.
312+ repeated CustomEmoji custom_emojis = 1
313+ [(google.api.field_behavior ) = UNORDERED_LIST ];
314+
315+ // A token that you can send as `pageToken` to retrieve the next page of
316+ // results. If empty, there are no subsequent pages.
317+ string next_page_token = 2 ;
318+ }
319+
320+ // Request for deleting a custom emoji.
321+ message DeleteCustomEmojiRequest {
322+ // Required. Resource name of the custom emoji to delete.
323+ //
324+ // Format: `customEmojis/{customEmoji}`
325+ //
326+ // You can use the emoji name as an alias for `{customEmoji}`. For example,
327+ // `customEmojis/:example-emoji:` where `:example-emoji:` is the emoji name
328+ // for a custom emoji.
329+ string name = 1 [
330+ (google.api.field_behavior ) = REQUIRED ,
331+ (google.api.resource_reference ) = {
332+ type : "chat.googleapis.com/CustomEmoji"
333+ }
334+ ];
335+ }
0 commit comments