@google-apps/chat 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1197,6 +1197,26 @@ message SelectionInput {
1197
1197
  SWITCH = 2;
1198
1198
 
1199
1199
  // A dropdown menu. Users can select one item from the menu.
1200
+ //
1201
+ // For Google Chat apps, you can populate items using a dynamic data source
1202
+ // and autosuggest items as users type in the menu. For example, users can
1203
+ // start typing the name of a Google Chat space and the widget autosuggests
1204
+ // the space. To dynamically populate items for a dropdown menu, use one of
1205
+ // the following types of data sources:
1206
+ //
1207
+ // * Google Workspace data: Items are populated using data from Google
1208
+ // Workspace, such as Google Workspace users or Google Chat spaces.
1209
+ // * External data: Items are populated from an external data
1210
+ // source outside of Google Workspace.
1211
+ //
1212
+ // For examples of how to implement dropdown menus for Chat apps, see
1213
+ // [Add a dropdown
1214
+ // menu](https://developers.google.com/workspace/chat/design-interactive-card-dialog#dropdown-menu)
1215
+ // and [Dynamically populate drop-down
1216
+ // menus](https://developers.google.com/workspace/chat/design-interactive-card-dialog#dynamic-dropdown-menu).
1217
+ //
1218
+ // [Google Workspace add-ons and Chat
1219
+ // apps](https://developers.google.com/workspace/extend):
1200
1220
  DROPDOWN = 3;
1201
1221
 
1202
1222
  // A menu with a text box. Users can type and select one or more items.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -292,6 +292,23 @@ message QuotedMessageMetadata {
292
292
  pattern: "spaces/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata}"
293
293
  };
294
294
 
295
+ // The quote type of the quoted message.
296
+ enum QuoteType {
297
+ // Reserved. This value is unused.
298
+ QUOTE_TYPE_UNSPECIFIED = 0;
299
+
300
+ // If quote_type is `REPLY`, you can do the following:
301
+ //
302
+ // * If you're replying in a thread, you can quote another message in that
303
+ // thread.
304
+ //
305
+ // * If you're creating a root message, you can quote another root message
306
+ // in that space.
307
+ //
308
+ // You can't quote a message reply from a different thread.
309
+ REPLY = 1;
310
+ }
311
+
295
312
  // Required. Resource name of the message that is quoted.
296
313
  //
297
314
  // Format: `spaces/{space}/messages/{message}`
@@ -310,6 +327,63 @@ message QuotedMessageMetadata {
310
327
  // message, the request fails.
311
328
  google.protobuf.Timestamp last_update_time = 2
312
329
  [(google.api.field_behavior) = REQUIRED];
330
+
331
+ // Optional. Specifies the quote type. If not set, defaults to REPLY in the
332
+ // message read/write path for backward compatibility.
333
+ QuoteType quote_type = 4 [(google.api.field_behavior) = OPTIONAL];
334
+
335
+ // Output only. A snapshot of the quoted message's content.
336
+ QuotedMessageSnapshot quoted_message_snapshot = 5
337
+ [(google.api.field_behavior) = OUTPUT_ONLY];
338
+
339
+ // Output only. Metadata about the source space of the quoted message.
340
+ // Populated only for FORWARD quote type.
341
+ ForwardedMetadata forwarded_metadata = 6
342
+ [(google.api.field_behavior) = OUTPUT_ONLY];
343
+ }
344
+
345
+ // Provides a snapshot of the content of the quoted message at the time of
346
+ // quoting or forwarding
347
+ message QuotedMessageSnapshot {
348
+ // Output only. The quoted message's author name.
349
+ // Populated for both REPLY & FORWARD quote types.
350
+ string sender = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
351
+
352
+ // Output only. Snapshot of the quoted message's text content.
353
+ string text = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
354
+
355
+ // Output only. Contains the quoted message `text` with markups added to
356
+ // support rich formatting like hyperlinks,custom emojis, markup, etc.
357
+ // Populated only for FORWARD quote type.
358
+ string formatted_text = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
359
+
360
+ // Output only. Annotations parsed from the text body of the quoted message.
361
+ // Populated only for FORWARD quote type.
362
+ repeated Annotation annotations = 4
363
+ [(google.api.field_behavior) = OUTPUT_ONLY];
364
+
365
+ // Output only. Attachments that were part of the quoted message. These are
366
+ // copies of the quoted message's attachment metadata. Populated only for
367
+ // FORWARD quote type.
368
+ repeated Attachment attachments = 5
369
+ [(google.api.field_behavior) = OUTPUT_ONLY];
370
+ }
371
+
372
+ // Metadata about the source space from which a message was forwarded.
373
+ message ForwardedMetadata {
374
+ // Output only. The resource name of the source space.
375
+ // Format: spaces/{space}
376
+ string space = 1 [
377
+ (google.api.field_behavior) = OUTPUT_ONLY,
378
+ (google.api.resource_reference) = { type: "chat.googleapis.com/Space" }
379
+ ];
380
+
381
+ // Output only. The display name of the source space or DM at the time of
382
+ // forwarding. For `SPACE`, this is the space name. For `DIRECT_MESSAGE`, this
383
+ // is the other participant's name (e.g., "User A"). For `GROUP_CHAT`, this is
384
+ // a generated name based on members' first names, limited to 5 including the
385
+ // creator (e.g., "User A, User B").
386
+ string space_display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
313
387
  }
314
388
 
315
389
  // A thread in a Google Chat space. For example usage, see
@@ -16252,6 +16252,15 @@ export namespace google {
16252
16252
 
16253
16253
  /** QuotedMessageMetadata lastUpdateTime */
16254
16254
  lastUpdateTime?: (google.protobuf.ITimestamp|null);
16255
+
16256
+ /** QuotedMessageMetadata quoteType */
16257
+ quoteType?: (google.chat.v1.QuotedMessageMetadata.QuoteType|keyof typeof google.chat.v1.QuotedMessageMetadata.QuoteType|null);
16258
+
16259
+ /** QuotedMessageMetadata quotedMessageSnapshot */
16260
+ quotedMessageSnapshot?: (google.chat.v1.IQuotedMessageSnapshot|null);
16261
+
16262
+ /** QuotedMessageMetadata forwardedMetadata */
16263
+ forwardedMetadata?: (google.chat.v1.IForwardedMetadata|null);
16255
16264
  }
16256
16265
 
16257
16266
  /** Represents a QuotedMessageMetadata. */
@@ -16269,6 +16278,15 @@ export namespace google {
16269
16278
  /** QuotedMessageMetadata lastUpdateTime. */
16270
16279
  public lastUpdateTime?: (google.protobuf.ITimestamp|null);
16271
16280
 
16281
+ /** QuotedMessageMetadata quoteType. */
16282
+ public quoteType: (google.chat.v1.QuotedMessageMetadata.QuoteType|keyof typeof google.chat.v1.QuotedMessageMetadata.QuoteType);
16283
+
16284
+ /** QuotedMessageMetadata quotedMessageSnapshot. */
16285
+ public quotedMessageSnapshot?: (google.chat.v1.IQuotedMessageSnapshot|null);
16286
+
16287
+ /** QuotedMessageMetadata forwardedMetadata. */
16288
+ public forwardedMetadata?: (google.chat.v1.IForwardedMetadata|null);
16289
+
16272
16290
  /**
16273
16291
  * Creates a new QuotedMessageMetadata instance using the specified properties.
16274
16292
  * @param [properties] Properties to set
@@ -16347,6 +16365,239 @@ export namespace google {
16347
16365
  public static getTypeUrl(typeUrlPrefix?: string): string;
16348
16366
  }
16349
16367
 
16368
+ namespace QuotedMessageMetadata {
16369
+
16370
+ /** QuoteType enum. */
16371
+ enum QuoteType {
16372
+ QUOTE_TYPE_UNSPECIFIED = 0,
16373
+ REPLY = 1
16374
+ }
16375
+ }
16376
+
16377
+ /** Properties of a QuotedMessageSnapshot. */
16378
+ interface IQuotedMessageSnapshot {
16379
+
16380
+ /** QuotedMessageSnapshot sender */
16381
+ sender?: (string|null);
16382
+
16383
+ /** QuotedMessageSnapshot text */
16384
+ text?: (string|null);
16385
+
16386
+ /** QuotedMessageSnapshot formattedText */
16387
+ formattedText?: (string|null);
16388
+
16389
+ /** QuotedMessageSnapshot annotations */
16390
+ annotations?: (google.chat.v1.IAnnotation[]|null);
16391
+
16392
+ /** QuotedMessageSnapshot attachments */
16393
+ attachments?: (google.chat.v1.IAttachment[]|null);
16394
+ }
16395
+
16396
+ /** Represents a QuotedMessageSnapshot. */
16397
+ class QuotedMessageSnapshot implements IQuotedMessageSnapshot {
16398
+
16399
+ /**
16400
+ * Constructs a new QuotedMessageSnapshot.
16401
+ * @param [properties] Properties to set
16402
+ */
16403
+ constructor(properties?: google.chat.v1.IQuotedMessageSnapshot);
16404
+
16405
+ /** QuotedMessageSnapshot sender. */
16406
+ public sender: string;
16407
+
16408
+ /** QuotedMessageSnapshot text. */
16409
+ public text: string;
16410
+
16411
+ /** QuotedMessageSnapshot formattedText. */
16412
+ public formattedText: string;
16413
+
16414
+ /** QuotedMessageSnapshot annotations. */
16415
+ public annotations: google.chat.v1.IAnnotation[];
16416
+
16417
+ /** QuotedMessageSnapshot attachments. */
16418
+ public attachments: google.chat.v1.IAttachment[];
16419
+
16420
+ /**
16421
+ * Creates a new QuotedMessageSnapshot instance using the specified properties.
16422
+ * @param [properties] Properties to set
16423
+ * @returns QuotedMessageSnapshot instance
16424
+ */
16425
+ public static create(properties?: google.chat.v1.IQuotedMessageSnapshot): google.chat.v1.QuotedMessageSnapshot;
16426
+
16427
+ /**
16428
+ * Encodes the specified QuotedMessageSnapshot message. Does not implicitly {@link google.chat.v1.QuotedMessageSnapshot.verify|verify} messages.
16429
+ * @param message QuotedMessageSnapshot message or plain object to encode
16430
+ * @param [writer] Writer to encode to
16431
+ * @returns Writer
16432
+ */
16433
+ public static encode(message: google.chat.v1.IQuotedMessageSnapshot, writer?: $protobuf.Writer): $protobuf.Writer;
16434
+
16435
+ /**
16436
+ * Encodes the specified QuotedMessageSnapshot message, length delimited. Does not implicitly {@link google.chat.v1.QuotedMessageSnapshot.verify|verify} messages.
16437
+ * @param message QuotedMessageSnapshot message or plain object to encode
16438
+ * @param [writer] Writer to encode to
16439
+ * @returns Writer
16440
+ */
16441
+ public static encodeDelimited(message: google.chat.v1.IQuotedMessageSnapshot, writer?: $protobuf.Writer): $protobuf.Writer;
16442
+
16443
+ /**
16444
+ * Decodes a QuotedMessageSnapshot message from the specified reader or buffer.
16445
+ * @param reader Reader or buffer to decode from
16446
+ * @param [length] Message length if known beforehand
16447
+ * @returns QuotedMessageSnapshot
16448
+ * @throws {Error} If the payload is not a reader or valid buffer
16449
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
16450
+ */
16451
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.chat.v1.QuotedMessageSnapshot;
16452
+
16453
+ /**
16454
+ * Decodes a QuotedMessageSnapshot message from the specified reader or buffer, length delimited.
16455
+ * @param reader Reader or buffer to decode from
16456
+ * @returns QuotedMessageSnapshot
16457
+ * @throws {Error} If the payload is not a reader or valid buffer
16458
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
16459
+ */
16460
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.chat.v1.QuotedMessageSnapshot;
16461
+
16462
+ /**
16463
+ * Verifies a QuotedMessageSnapshot message.
16464
+ * @param message Plain object to verify
16465
+ * @returns `null` if valid, otherwise the reason why it is not
16466
+ */
16467
+ public static verify(message: { [k: string]: any }): (string|null);
16468
+
16469
+ /**
16470
+ * Creates a QuotedMessageSnapshot message from a plain object. Also converts values to their respective internal types.
16471
+ * @param object Plain object
16472
+ * @returns QuotedMessageSnapshot
16473
+ */
16474
+ public static fromObject(object: { [k: string]: any }): google.chat.v1.QuotedMessageSnapshot;
16475
+
16476
+ /**
16477
+ * Creates a plain object from a QuotedMessageSnapshot message. Also converts values to other types if specified.
16478
+ * @param message QuotedMessageSnapshot
16479
+ * @param [options] Conversion options
16480
+ * @returns Plain object
16481
+ */
16482
+ public static toObject(message: google.chat.v1.QuotedMessageSnapshot, options?: $protobuf.IConversionOptions): { [k: string]: any };
16483
+
16484
+ /**
16485
+ * Converts this QuotedMessageSnapshot to JSON.
16486
+ * @returns JSON object
16487
+ */
16488
+ public toJSON(): { [k: string]: any };
16489
+
16490
+ /**
16491
+ * Gets the default type url for QuotedMessageSnapshot
16492
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
16493
+ * @returns The default type url
16494
+ */
16495
+ public static getTypeUrl(typeUrlPrefix?: string): string;
16496
+ }
16497
+
16498
+ /** Properties of a ForwardedMetadata. */
16499
+ interface IForwardedMetadata {
16500
+
16501
+ /** ForwardedMetadata space */
16502
+ space?: (string|null);
16503
+
16504
+ /** ForwardedMetadata spaceDisplayName */
16505
+ spaceDisplayName?: (string|null);
16506
+ }
16507
+
16508
+ /** Represents a ForwardedMetadata. */
16509
+ class ForwardedMetadata implements IForwardedMetadata {
16510
+
16511
+ /**
16512
+ * Constructs a new ForwardedMetadata.
16513
+ * @param [properties] Properties to set
16514
+ */
16515
+ constructor(properties?: google.chat.v1.IForwardedMetadata);
16516
+
16517
+ /** ForwardedMetadata space. */
16518
+ public space: string;
16519
+
16520
+ /** ForwardedMetadata spaceDisplayName. */
16521
+ public spaceDisplayName: string;
16522
+
16523
+ /**
16524
+ * Creates a new ForwardedMetadata instance using the specified properties.
16525
+ * @param [properties] Properties to set
16526
+ * @returns ForwardedMetadata instance
16527
+ */
16528
+ public static create(properties?: google.chat.v1.IForwardedMetadata): google.chat.v1.ForwardedMetadata;
16529
+
16530
+ /**
16531
+ * Encodes the specified ForwardedMetadata message. Does not implicitly {@link google.chat.v1.ForwardedMetadata.verify|verify} messages.
16532
+ * @param message ForwardedMetadata message or plain object to encode
16533
+ * @param [writer] Writer to encode to
16534
+ * @returns Writer
16535
+ */
16536
+ public static encode(message: google.chat.v1.IForwardedMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
16537
+
16538
+ /**
16539
+ * Encodes the specified ForwardedMetadata message, length delimited. Does not implicitly {@link google.chat.v1.ForwardedMetadata.verify|verify} messages.
16540
+ * @param message ForwardedMetadata message or plain object to encode
16541
+ * @param [writer] Writer to encode to
16542
+ * @returns Writer
16543
+ */
16544
+ public static encodeDelimited(message: google.chat.v1.IForwardedMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
16545
+
16546
+ /**
16547
+ * Decodes a ForwardedMetadata message from the specified reader or buffer.
16548
+ * @param reader Reader or buffer to decode from
16549
+ * @param [length] Message length if known beforehand
16550
+ * @returns ForwardedMetadata
16551
+ * @throws {Error} If the payload is not a reader or valid buffer
16552
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
16553
+ */
16554
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.chat.v1.ForwardedMetadata;
16555
+
16556
+ /**
16557
+ * Decodes a ForwardedMetadata message from the specified reader or buffer, length delimited.
16558
+ * @param reader Reader or buffer to decode from
16559
+ * @returns ForwardedMetadata
16560
+ * @throws {Error} If the payload is not a reader or valid buffer
16561
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
16562
+ */
16563
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.chat.v1.ForwardedMetadata;
16564
+
16565
+ /**
16566
+ * Verifies a ForwardedMetadata message.
16567
+ * @param message Plain object to verify
16568
+ * @returns `null` if valid, otherwise the reason why it is not
16569
+ */
16570
+ public static verify(message: { [k: string]: any }): (string|null);
16571
+
16572
+ /**
16573
+ * Creates a ForwardedMetadata message from a plain object. Also converts values to their respective internal types.
16574
+ * @param object Plain object
16575
+ * @returns ForwardedMetadata
16576
+ */
16577
+ public static fromObject(object: { [k: string]: any }): google.chat.v1.ForwardedMetadata;
16578
+
16579
+ /**
16580
+ * Creates a plain object from a ForwardedMetadata message. Also converts values to other types if specified.
16581
+ * @param message ForwardedMetadata
16582
+ * @param [options] Conversion options
16583
+ * @returns Plain object
16584
+ */
16585
+ public static toObject(message: google.chat.v1.ForwardedMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
16586
+
16587
+ /**
16588
+ * Converts this ForwardedMetadata to JSON.
16589
+ * @returns JSON object
16590
+ */
16591
+ public toJSON(): { [k: string]: any };
16592
+
16593
+ /**
16594
+ * Gets the default type url for ForwardedMetadata
16595
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
16596
+ * @returns The default type url
16597
+ */
16598
+ public static getTypeUrl(typeUrlPrefix?: string): string;
16599
+ }
16600
+
16350
16601
  /** Properties of a Thread. */
16351
16602
  interface IThread {
16352
16603
 
@@ -42510,6 +42510,9 @@
42510
42510
  * @interface IQuotedMessageMetadata
42511
42511
  * @property {string|null} [name] QuotedMessageMetadata name
42512
42512
  * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] QuotedMessageMetadata lastUpdateTime
42513
+ * @property {google.chat.v1.QuotedMessageMetadata.QuoteType|null} [quoteType] QuotedMessageMetadata quoteType
42514
+ * @property {google.chat.v1.IQuotedMessageSnapshot|null} [quotedMessageSnapshot] QuotedMessageMetadata quotedMessageSnapshot
42515
+ * @property {google.chat.v1.IForwardedMetadata|null} [forwardedMetadata] QuotedMessageMetadata forwardedMetadata
42513
42516
  */
42514
42517
 
42515
42518
  /**
@@ -42543,6 +42546,30 @@
42543
42546
  */
42544
42547
  QuotedMessageMetadata.prototype.lastUpdateTime = null;
42545
42548
 
42549
+ /**
42550
+ * QuotedMessageMetadata quoteType.
42551
+ * @member {google.chat.v1.QuotedMessageMetadata.QuoteType} quoteType
42552
+ * @memberof google.chat.v1.QuotedMessageMetadata
42553
+ * @instance
42554
+ */
42555
+ QuotedMessageMetadata.prototype.quoteType = 0;
42556
+
42557
+ /**
42558
+ * QuotedMessageMetadata quotedMessageSnapshot.
42559
+ * @member {google.chat.v1.IQuotedMessageSnapshot|null|undefined} quotedMessageSnapshot
42560
+ * @memberof google.chat.v1.QuotedMessageMetadata
42561
+ * @instance
42562
+ */
42563
+ QuotedMessageMetadata.prototype.quotedMessageSnapshot = null;
42564
+
42565
+ /**
42566
+ * QuotedMessageMetadata forwardedMetadata.
42567
+ * @member {google.chat.v1.IForwardedMetadata|null|undefined} forwardedMetadata
42568
+ * @memberof google.chat.v1.QuotedMessageMetadata
42569
+ * @instance
42570
+ */
42571
+ QuotedMessageMetadata.prototype.forwardedMetadata = null;
42572
+
42546
42573
  /**
42547
42574
  * Creates a new QuotedMessageMetadata instance using the specified properties.
42548
42575
  * @function create
@@ -42571,6 +42598,12 @@
42571
42598
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
42572
42599
  if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime"))
42573
42600
  $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
42601
+ if (message.quoteType != null && Object.hasOwnProperty.call(message, "quoteType"))
42602
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.quoteType);
42603
+ if (message.quotedMessageSnapshot != null && Object.hasOwnProperty.call(message, "quotedMessageSnapshot"))
42604
+ $root.google.chat.v1.QuotedMessageSnapshot.encode(message.quotedMessageSnapshot, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
42605
+ if (message.forwardedMetadata != null && Object.hasOwnProperty.call(message, "forwardedMetadata"))
42606
+ $root.google.chat.v1.ForwardedMetadata.encode(message.forwardedMetadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
42574
42607
  return writer;
42575
42608
  };
42576
42609
 
@@ -42615,6 +42648,18 @@
42615
42648
  message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
42616
42649
  break;
42617
42650
  }
42651
+ case 4: {
42652
+ message.quoteType = reader.int32();
42653
+ break;
42654
+ }
42655
+ case 5: {
42656
+ message.quotedMessageSnapshot = $root.google.chat.v1.QuotedMessageSnapshot.decode(reader, reader.uint32());
42657
+ break;
42658
+ }
42659
+ case 6: {
42660
+ message.forwardedMetadata = $root.google.chat.v1.ForwardedMetadata.decode(reader, reader.uint32());
42661
+ break;
42662
+ }
42618
42663
  default:
42619
42664
  reader.skipType(tag & 7);
42620
42665
  break;
@@ -42658,6 +42703,24 @@
42658
42703
  if (error)
42659
42704
  return "lastUpdateTime." + error;
42660
42705
  }
42706
+ if (message.quoteType != null && message.hasOwnProperty("quoteType"))
42707
+ switch (message.quoteType) {
42708
+ default:
42709
+ return "quoteType: enum value expected";
42710
+ case 0:
42711
+ case 1:
42712
+ break;
42713
+ }
42714
+ if (message.quotedMessageSnapshot != null && message.hasOwnProperty("quotedMessageSnapshot")) {
42715
+ var error = $root.google.chat.v1.QuotedMessageSnapshot.verify(message.quotedMessageSnapshot);
42716
+ if (error)
42717
+ return "quotedMessageSnapshot." + error;
42718
+ }
42719
+ if (message.forwardedMetadata != null && message.hasOwnProperty("forwardedMetadata")) {
42720
+ var error = $root.google.chat.v1.ForwardedMetadata.verify(message.forwardedMetadata);
42721
+ if (error)
42722
+ return "forwardedMetadata." + error;
42723
+ }
42661
42724
  return null;
42662
42725
  };
42663
42726
 
@@ -42680,6 +42743,32 @@
42680
42743
  throw TypeError(".google.chat.v1.QuotedMessageMetadata.lastUpdateTime: object expected");
42681
42744
  message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime);
42682
42745
  }
42746
+ switch (object.quoteType) {
42747
+ default:
42748
+ if (typeof object.quoteType === "number") {
42749
+ message.quoteType = object.quoteType;
42750
+ break;
42751
+ }
42752
+ break;
42753
+ case "QUOTE_TYPE_UNSPECIFIED":
42754
+ case 0:
42755
+ message.quoteType = 0;
42756
+ break;
42757
+ case "REPLY":
42758
+ case 1:
42759
+ message.quoteType = 1;
42760
+ break;
42761
+ }
42762
+ if (object.quotedMessageSnapshot != null) {
42763
+ if (typeof object.quotedMessageSnapshot !== "object")
42764
+ throw TypeError(".google.chat.v1.QuotedMessageMetadata.quotedMessageSnapshot: object expected");
42765
+ message.quotedMessageSnapshot = $root.google.chat.v1.QuotedMessageSnapshot.fromObject(object.quotedMessageSnapshot);
42766
+ }
42767
+ if (object.forwardedMetadata != null) {
42768
+ if (typeof object.forwardedMetadata !== "object")
42769
+ throw TypeError(".google.chat.v1.QuotedMessageMetadata.forwardedMetadata: object expected");
42770
+ message.forwardedMetadata = $root.google.chat.v1.ForwardedMetadata.fromObject(object.forwardedMetadata);
42771
+ }
42683
42772
  return message;
42684
42773
  };
42685
42774
 
@@ -42699,11 +42788,20 @@
42699
42788
  if (options.defaults) {
42700
42789
  object.name = "";
42701
42790
  object.lastUpdateTime = null;
42791
+ object.quoteType = options.enums === String ? "QUOTE_TYPE_UNSPECIFIED" : 0;
42792
+ object.quotedMessageSnapshot = null;
42793
+ object.forwardedMetadata = null;
42702
42794
  }
42703
42795
  if (message.name != null && message.hasOwnProperty("name"))
42704
42796
  object.name = message.name;
42705
42797
  if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime"))
42706
42798
  object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options);
42799
+ if (message.quoteType != null && message.hasOwnProperty("quoteType"))
42800
+ object.quoteType = options.enums === String ? $root.google.chat.v1.QuotedMessageMetadata.QuoteType[message.quoteType] === undefined ? message.quoteType : $root.google.chat.v1.QuotedMessageMetadata.QuoteType[message.quoteType] : message.quoteType;
42801
+ if (message.quotedMessageSnapshot != null && message.hasOwnProperty("quotedMessageSnapshot"))
42802
+ object.quotedMessageSnapshot = $root.google.chat.v1.QuotedMessageSnapshot.toObject(message.quotedMessageSnapshot, options);
42803
+ if (message.forwardedMetadata != null && message.hasOwnProperty("forwardedMetadata"))
42804
+ object.forwardedMetadata = $root.google.chat.v1.ForwardedMetadata.toObject(message.forwardedMetadata, options);
42707
42805
  return object;
42708
42806
  };
42709
42807
 
@@ -42733,9 +42831,594 @@
42733
42831
  return typeUrlPrefix + "/google.chat.v1.QuotedMessageMetadata";
42734
42832
  };
42735
42833
 
42834
+ /**
42835
+ * QuoteType enum.
42836
+ * @name google.chat.v1.QuotedMessageMetadata.QuoteType
42837
+ * @enum {number}
42838
+ * @property {number} QUOTE_TYPE_UNSPECIFIED=0 QUOTE_TYPE_UNSPECIFIED value
42839
+ * @property {number} REPLY=1 REPLY value
42840
+ */
42841
+ QuotedMessageMetadata.QuoteType = (function() {
42842
+ var valuesById = {}, values = Object.create(valuesById);
42843
+ values[valuesById[0] = "QUOTE_TYPE_UNSPECIFIED"] = 0;
42844
+ values[valuesById[1] = "REPLY"] = 1;
42845
+ return values;
42846
+ })();
42847
+
42736
42848
  return QuotedMessageMetadata;
42737
42849
  })();
42738
42850
 
42851
+ v1.QuotedMessageSnapshot = (function() {
42852
+
42853
+ /**
42854
+ * Properties of a QuotedMessageSnapshot.
42855
+ * @memberof google.chat.v1
42856
+ * @interface IQuotedMessageSnapshot
42857
+ * @property {string|null} [sender] QuotedMessageSnapshot sender
42858
+ * @property {string|null} [text] QuotedMessageSnapshot text
42859
+ * @property {string|null} [formattedText] QuotedMessageSnapshot formattedText
42860
+ * @property {Array.<google.chat.v1.IAnnotation>|null} [annotations] QuotedMessageSnapshot annotations
42861
+ * @property {Array.<google.chat.v1.IAttachment>|null} [attachments] QuotedMessageSnapshot attachments
42862
+ */
42863
+
42864
+ /**
42865
+ * Constructs a new QuotedMessageSnapshot.
42866
+ * @memberof google.chat.v1
42867
+ * @classdesc Represents a QuotedMessageSnapshot.
42868
+ * @implements IQuotedMessageSnapshot
42869
+ * @constructor
42870
+ * @param {google.chat.v1.IQuotedMessageSnapshot=} [properties] Properties to set
42871
+ */
42872
+ function QuotedMessageSnapshot(properties) {
42873
+ this.annotations = [];
42874
+ this.attachments = [];
42875
+ if (properties)
42876
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
42877
+ if (properties[keys[i]] != null)
42878
+ this[keys[i]] = properties[keys[i]];
42879
+ }
42880
+
42881
+ /**
42882
+ * QuotedMessageSnapshot sender.
42883
+ * @member {string} sender
42884
+ * @memberof google.chat.v1.QuotedMessageSnapshot
42885
+ * @instance
42886
+ */
42887
+ QuotedMessageSnapshot.prototype.sender = "";
42888
+
42889
+ /**
42890
+ * QuotedMessageSnapshot text.
42891
+ * @member {string} text
42892
+ * @memberof google.chat.v1.QuotedMessageSnapshot
42893
+ * @instance
42894
+ */
42895
+ QuotedMessageSnapshot.prototype.text = "";
42896
+
42897
+ /**
42898
+ * QuotedMessageSnapshot formattedText.
42899
+ * @member {string} formattedText
42900
+ * @memberof google.chat.v1.QuotedMessageSnapshot
42901
+ * @instance
42902
+ */
42903
+ QuotedMessageSnapshot.prototype.formattedText = "";
42904
+
42905
+ /**
42906
+ * QuotedMessageSnapshot annotations.
42907
+ * @member {Array.<google.chat.v1.IAnnotation>} annotations
42908
+ * @memberof google.chat.v1.QuotedMessageSnapshot
42909
+ * @instance
42910
+ */
42911
+ QuotedMessageSnapshot.prototype.annotations = $util.emptyArray;
42912
+
42913
+ /**
42914
+ * QuotedMessageSnapshot attachments.
42915
+ * @member {Array.<google.chat.v1.IAttachment>} attachments
42916
+ * @memberof google.chat.v1.QuotedMessageSnapshot
42917
+ * @instance
42918
+ */
42919
+ QuotedMessageSnapshot.prototype.attachments = $util.emptyArray;
42920
+
42921
+ /**
42922
+ * Creates a new QuotedMessageSnapshot instance using the specified properties.
42923
+ * @function create
42924
+ * @memberof google.chat.v1.QuotedMessageSnapshot
42925
+ * @static
42926
+ * @param {google.chat.v1.IQuotedMessageSnapshot=} [properties] Properties to set
42927
+ * @returns {google.chat.v1.QuotedMessageSnapshot} QuotedMessageSnapshot instance
42928
+ */
42929
+ QuotedMessageSnapshot.create = function create(properties) {
42930
+ return new QuotedMessageSnapshot(properties);
42931
+ };
42932
+
42933
+ /**
42934
+ * Encodes the specified QuotedMessageSnapshot message. Does not implicitly {@link google.chat.v1.QuotedMessageSnapshot.verify|verify} messages.
42935
+ * @function encode
42936
+ * @memberof google.chat.v1.QuotedMessageSnapshot
42937
+ * @static
42938
+ * @param {google.chat.v1.IQuotedMessageSnapshot} message QuotedMessageSnapshot message or plain object to encode
42939
+ * @param {$protobuf.Writer} [writer] Writer to encode to
42940
+ * @returns {$protobuf.Writer} Writer
42941
+ */
42942
+ QuotedMessageSnapshot.encode = function encode(message, writer) {
42943
+ if (!writer)
42944
+ writer = $Writer.create();
42945
+ if (message.sender != null && Object.hasOwnProperty.call(message, "sender"))
42946
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.sender);
42947
+ if (message.text != null && Object.hasOwnProperty.call(message, "text"))
42948
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.text);
42949
+ if (message.formattedText != null && Object.hasOwnProperty.call(message, "formattedText"))
42950
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.formattedText);
42951
+ if (message.annotations != null && message.annotations.length)
42952
+ for (var i = 0; i < message.annotations.length; ++i)
42953
+ $root.google.chat.v1.Annotation.encode(message.annotations[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
42954
+ if (message.attachments != null && message.attachments.length)
42955
+ for (var i = 0; i < message.attachments.length; ++i)
42956
+ $root.google.chat.v1.Attachment.encode(message.attachments[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
42957
+ return writer;
42958
+ };
42959
+
42960
+ /**
42961
+ * Encodes the specified QuotedMessageSnapshot message, length delimited. Does not implicitly {@link google.chat.v1.QuotedMessageSnapshot.verify|verify} messages.
42962
+ * @function encodeDelimited
42963
+ * @memberof google.chat.v1.QuotedMessageSnapshot
42964
+ * @static
42965
+ * @param {google.chat.v1.IQuotedMessageSnapshot} message QuotedMessageSnapshot message or plain object to encode
42966
+ * @param {$protobuf.Writer} [writer] Writer to encode to
42967
+ * @returns {$protobuf.Writer} Writer
42968
+ */
42969
+ QuotedMessageSnapshot.encodeDelimited = function encodeDelimited(message, writer) {
42970
+ return this.encode(message, writer).ldelim();
42971
+ };
42972
+
42973
+ /**
42974
+ * Decodes a QuotedMessageSnapshot message from the specified reader or buffer.
42975
+ * @function decode
42976
+ * @memberof google.chat.v1.QuotedMessageSnapshot
42977
+ * @static
42978
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
42979
+ * @param {number} [length] Message length if known beforehand
42980
+ * @returns {google.chat.v1.QuotedMessageSnapshot} QuotedMessageSnapshot
42981
+ * @throws {Error} If the payload is not a reader or valid buffer
42982
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
42983
+ */
42984
+ QuotedMessageSnapshot.decode = function decode(reader, length, error) {
42985
+ if (!(reader instanceof $Reader))
42986
+ reader = $Reader.create(reader);
42987
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.QuotedMessageSnapshot();
42988
+ while (reader.pos < end) {
42989
+ var tag = reader.uint32();
42990
+ if (tag === error)
42991
+ break;
42992
+ switch (tag >>> 3) {
42993
+ case 1: {
42994
+ message.sender = reader.string();
42995
+ break;
42996
+ }
42997
+ case 2: {
42998
+ message.text = reader.string();
42999
+ break;
43000
+ }
43001
+ case 3: {
43002
+ message.formattedText = reader.string();
43003
+ break;
43004
+ }
43005
+ case 4: {
43006
+ if (!(message.annotations && message.annotations.length))
43007
+ message.annotations = [];
43008
+ message.annotations.push($root.google.chat.v1.Annotation.decode(reader, reader.uint32()));
43009
+ break;
43010
+ }
43011
+ case 5: {
43012
+ if (!(message.attachments && message.attachments.length))
43013
+ message.attachments = [];
43014
+ message.attachments.push($root.google.chat.v1.Attachment.decode(reader, reader.uint32()));
43015
+ break;
43016
+ }
43017
+ default:
43018
+ reader.skipType(tag & 7);
43019
+ break;
43020
+ }
43021
+ }
43022
+ return message;
43023
+ };
43024
+
43025
+ /**
43026
+ * Decodes a QuotedMessageSnapshot message from the specified reader or buffer, length delimited.
43027
+ * @function decodeDelimited
43028
+ * @memberof google.chat.v1.QuotedMessageSnapshot
43029
+ * @static
43030
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
43031
+ * @returns {google.chat.v1.QuotedMessageSnapshot} QuotedMessageSnapshot
43032
+ * @throws {Error} If the payload is not a reader or valid buffer
43033
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
43034
+ */
43035
+ QuotedMessageSnapshot.decodeDelimited = function decodeDelimited(reader) {
43036
+ if (!(reader instanceof $Reader))
43037
+ reader = new $Reader(reader);
43038
+ return this.decode(reader, reader.uint32());
43039
+ };
43040
+
43041
+ /**
43042
+ * Verifies a QuotedMessageSnapshot message.
43043
+ * @function verify
43044
+ * @memberof google.chat.v1.QuotedMessageSnapshot
43045
+ * @static
43046
+ * @param {Object.<string,*>} message Plain object to verify
43047
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
43048
+ */
43049
+ QuotedMessageSnapshot.verify = function verify(message) {
43050
+ if (typeof message !== "object" || message === null)
43051
+ return "object expected";
43052
+ if (message.sender != null && message.hasOwnProperty("sender"))
43053
+ if (!$util.isString(message.sender))
43054
+ return "sender: string expected";
43055
+ if (message.text != null && message.hasOwnProperty("text"))
43056
+ if (!$util.isString(message.text))
43057
+ return "text: string expected";
43058
+ if (message.formattedText != null && message.hasOwnProperty("formattedText"))
43059
+ if (!$util.isString(message.formattedText))
43060
+ return "formattedText: string expected";
43061
+ if (message.annotations != null && message.hasOwnProperty("annotations")) {
43062
+ if (!Array.isArray(message.annotations))
43063
+ return "annotations: array expected";
43064
+ for (var i = 0; i < message.annotations.length; ++i) {
43065
+ var error = $root.google.chat.v1.Annotation.verify(message.annotations[i]);
43066
+ if (error)
43067
+ return "annotations." + error;
43068
+ }
43069
+ }
43070
+ if (message.attachments != null && message.hasOwnProperty("attachments")) {
43071
+ if (!Array.isArray(message.attachments))
43072
+ return "attachments: array expected";
43073
+ for (var i = 0; i < message.attachments.length; ++i) {
43074
+ var error = $root.google.chat.v1.Attachment.verify(message.attachments[i]);
43075
+ if (error)
43076
+ return "attachments." + error;
43077
+ }
43078
+ }
43079
+ return null;
43080
+ };
43081
+
43082
+ /**
43083
+ * Creates a QuotedMessageSnapshot message from a plain object. Also converts values to their respective internal types.
43084
+ * @function fromObject
43085
+ * @memberof google.chat.v1.QuotedMessageSnapshot
43086
+ * @static
43087
+ * @param {Object.<string,*>} object Plain object
43088
+ * @returns {google.chat.v1.QuotedMessageSnapshot} QuotedMessageSnapshot
43089
+ */
43090
+ QuotedMessageSnapshot.fromObject = function fromObject(object) {
43091
+ if (object instanceof $root.google.chat.v1.QuotedMessageSnapshot)
43092
+ return object;
43093
+ var message = new $root.google.chat.v1.QuotedMessageSnapshot();
43094
+ if (object.sender != null)
43095
+ message.sender = String(object.sender);
43096
+ if (object.text != null)
43097
+ message.text = String(object.text);
43098
+ if (object.formattedText != null)
43099
+ message.formattedText = String(object.formattedText);
43100
+ if (object.annotations) {
43101
+ if (!Array.isArray(object.annotations))
43102
+ throw TypeError(".google.chat.v1.QuotedMessageSnapshot.annotations: array expected");
43103
+ message.annotations = [];
43104
+ for (var i = 0; i < object.annotations.length; ++i) {
43105
+ if (typeof object.annotations[i] !== "object")
43106
+ throw TypeError(".google.chat.v1.QuotedMessageSnapshot.annotations: object expected");
43107
+ message.annotations[i] = $root.google.chat.v1.Annotation.fromObject(object.annotations[i]);
43108
+ }
43109
+ }
43110
+ if (object.attachments) {
43111
+ if (!Array.isArray(object.attachments))
43112
+ throw TypeError(".google.chat.v1.QuotedMessageSnapshot.attachments: array expected");
43113
+ message.attachments = [];
43114
+ for (var i = 0; i < object.attachments.length; ++i) {
43115
+ if (typeof object.attachments[i] !== "object")
43116
+ throw TypeError(".google.chat.v1.QuotedMessageSnapshot.attachments: object expected");
43117
+ message.attachments[i] = $root.google.chat.v1.Attachment.fromObject(object.attachments[i]);
43118
+ }
43119
+ }
43120
+ return message;
43121
+ };
43122
+
43123
+ /**
43124
+ * Creates a plain object from a QuotedMessageSnapshot message. Also converts values to other types if specified.
43125
+ * @function toObject
43126
+ * @memberof google.chat.v1.QuotedMessageSnapshot
43127
+ * @static
43128
+ * @param {google.chat.v1.QuotedMessageSnapshot} message QuotedMessageSnapshot
43129
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
43130
+ * @returns {Object.<string,*>} Plain object
43131
+ */
43132
+ QuotedMessageSnapshot.toObject = function toObject(message, options) {
43133
+ if (!options)
43134
+ options = {};
43135
+ var object = {};
43136
+ if (options.arrays || options.defaults) {
43137
+ object.annotations = [];
43138
+ object.attachments = [];
43139
+ }
43140
+ if (options.defaults) {
43141
+ object.sender = "";
43142
+ object.text = "";
43143
+ object.formattedText = "";
43144
+ }
43145
+ if (message.sender != null && message.hasOwnProperty("sender"))
43146
+ object.sender = message.sender;
43147
+ if (message.text != null && message.hasOwnProperty("text"))
43148
+ object.text = message.text;
43149
+ if (message.formattedText != null && message.hasOwnProperty("formattedText"))
43150
+ object.formattedText = message.formattedText;
43151
+ if (message.annotations && message.annotations.length) {
43152
+ object.annotations = [];
43153
+ for (var j = 0; j < message.annotations.length; ++j)
43154
+ object.annotations[j] = $root.google.chat.v1.Annotation.toObject(message.annotations[j], options);
43155
+ }
43156
+ if (message.attachments && message.attachments.length) {
43157
+ object.attachments = [];
43158
+ for (var j = 0; j < message.attachments.length; ++j)
43159
+ object.attachments[j] = $root.google.chat.v1.Attachment.toObject(message.attachments[j], options);
43160
+ }
43161
+ return object;
43162
+ };
43163
+
43164
+ /**
43165
+ * Converts this QuotedMessageSnapshot to JSON.
43166
+ * @function toJSON
43167
+ * @memberof google.chat.v1.QuotedMessageSnapshot
43168
+ * @instance
43169
+ * @returns {Object.<string,*>} JSON object
43170
+ */
43171
+ QuotedMessageSnapshot.prototype.toJSON = function toJSON() {
43172
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
43173
+ };
43174
+
43175
+ /**
43176
+ * Gets the default type url for QuotedMessageSnapshot
43177
+ * @function getTypeUrl
43178
+ * @memberof google.chat.v1.QuotedMessageSnapshot
43179
+ * @static
43180
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
43181
+ * @returns {string} The default type url
43182
+ */
43183
+ QuotedMessageSnapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
43184
+ if (typeUrlPrefix === undefined) {
43185
+ typeUrlPrefix = "type.googleapis.com";
43186
+ }
43187
+ return typeUrlPrefix + "/google.chat.v1.QuotedMessageSnapshot";
43188
+ };
43189
+
43190
+ return QuotedMessageSnapshot;
43191
+ })();
43192
+
43193
+ v1.ForwardedMetadata = (function() {
43194
+
43195
+ /**
43196
+ * Properties of a ForwardedMetadata.
43197
+ * @memberof google.chat.v1
43198
+ * @interface IForwardedMetadata
43199
+ * @property {string|null} [space] ForwardedMetadata space
43200
+ * @property {string|null} [spaceDisplayName] ForwardedMetadata spaceDisplayName
43201
+ */
43202
+
43203
+ /**
43204
+ * Constructs a new ForwardedMetadata.
43205
+ * @memberof google.chat.v1
43206
+ * @classdesc Represents a ForwardedMetadata.
43207
+ * @implements IForwardedMetadata
43208
+ * @constructor
43209
+ * @param {google.chat.v1.IForwardedMetadata=} [properties] Properties to set
43210
+ */
43211
+ function ForwardedMetadata(properties) {
43212
+ if (properties)
43213
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
43214
+ if (properties[keys[i]] != null)
43215
+ this[keys[i]] = properties[keys[i]];
43216
+ }
43217
+
43218
+ /**
43219
+ * ForwardedMetadata space.
43220
+ * @member {string} space
43221
+ * @memberof google.chat.v1.ForwardedMetadata
43222
+ * @instance
43223
+ */
43224
+ ForwardedMetadata.prototype.space = "";
43225
+
43226
+ /**
43227
+ * ForwardedMetadata spaceDisplayName.
43228
+ * @member {string} spaceDisplayName
43229
+ * @memberof google.chat.v1.ForwardedMetadata
43230
+ * @instance
43231
+ */
43232
+ ForwardedMetadata.prototype.spaceDisplayName = "";
43233
+
43234
+ /**
43235
+ * Creates a new ForwardedMetadata instance using the specified properties.
43236
+ * @function create
43237
+ * @memberof google.chat.v1.ForwardedMetadata
43238
+ * @static
43239
+ * @param {google.chat.v1.IForwardedMetadata=} [properties] Properties to set
43240
+ * @returns {google.chat.v1.ForwardedMetadata} ForwardedMetadata instance
43241
+ */
43242
+ ForwardedMetadata.create = function create(properties) {
43243
+ return new ForwardedMetadata(properties);
43244
+ };
43245
+
43246
+ /**
43247
+ * Encodes the specified ForwardedMetadata message. Does not implicitly {@link google.chat.v1.ForwardedMetadata.verify|verify} messages.
43248
+ * @function encode
43249
+ * @memberof google.chat.v1.ForwardedMetadata
43250
+ * @static
43251
+ * @param {google.chat.v1.IForwardedMetadata} message ForwardedMetadata message or plain object to encode
43252
+ * @param {$protobuf.Writer} [writer] Writer to encode to
43253
+ * @returns {$protobuf.Writer} Writer
43254
+ */
43255
+ ForwardedMetadata.encode = function encode(message, writer) {
43256
+ if (!writer)
43257
+ writer = $Writer.create();
43258
+ if (message.space != null && Object.hasOwnProperty.call(message, "space"))
43259
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.space);
43260
+ if (message.spaceDisplayName != null && Object.hasOwnProperty.call(message, "spaceDisplayName"))
43261
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.spaceDisplayName);
43262
+ return writer;
43263
+ };
43264
+
43265
+ /**
43266
+ * Encodes the specified ForwardedMetadata message, length delimited. Does not implicitly {@link google.chat.v1.ForwardedMetadata.verify|verify} messages.
43267
+ * @function encodeDelimited
43268
+ * @memberof google.chat.v1.ForwardedMetadata
43269
+ * @static
43270
+ * @param {google.chat.v1.IForwardedMetadata} message ForwardedMetadata message or plain object to encode
43271
+ * @param {$protobuf.Writer} [writer] Writer to encode to
43272
+ * @returns {$protobuf.Writer} Writer
43273
+ */
43274
+ ForwardedMetadata.encodeDelimited = function encodeDelimited(message, writer) {
43275
+ return this.encode(message, writer).ldelim();
43276
+ };
43277
+
43278
+ /**
43279
+ * Decodes a ForwardedMetadata message from the specified reader or buffer.
43280
+ * @function decode
43281
+ * @memberof google.chat.v1.ForwardedMetadata
43282
+ * @static
43283
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
43284
+ * @param {number} [length] Message length if known beforehand
43285
+ * @returns {google.chat.v1.ForwardedMetadata} ForwardedMetadata
43286
+ * @throws {Error} If the payload is not a reader or valid buffer
43287
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
43288
+ */
43289
+ ForwardedMetadata.decode = function decode(reader, length, error) {
43290
+ if (!(reader instanceof $Reader))
43291
+ reader = $Reader.create(reader);
43292
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.ForwardedMetadata();
43293
+ while (reader.pos < end) {
43294
+ var tag = reader.uint32();
43295
+ if (tag === error)
43296
+ break;
43297
+ switch (tag >>> 3) {
43298
+ case 1: {
43299
+ message.space = reader.string();
43300
+ break;
43301
+ }
43302
+ case 2: {
43303
+ message.spaceDisplayName = reader.string();
43304
+ break;
43305
+ }
43306
+ default:
43307
+ reader.skipType(tag & 7);
43308
+ break;
43309
+ }
43310
+ }
43311
+ return message;
43312
+ };
43313
+
43314
+ /**
43315
+ * Decodes a ForwardedMetadata message from the specified reader or buffer, length delimited.
43316
+ * @function decodeDelimited
43317
+ * @memberof google.chat.v1.ForwardedMetadata
43318
+ * @static
43319
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
43320
+ * @returns {google.chat.v1.ForwardedMetadata} ForwardedMetadata
43321
+ * @throws {Error} If the payload is not a reader or valid buffer
43322
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
43323
+ */
43324
+ ForwardedMetadata.decodeDelimited = function decodeDelimited(reader) {
43325
+ if (!(reader instanceof $Reader))
43326
+ reader = new $Reader(reader);
43327
+ return this.decode(reader, reader.uint32());
43328
+ };
43329
+
43330
+ /**
43331
+ * Verifies a ForwardedMetadata message.
43332
+ * @function verify
43333
+ * @memberof google.chat.v1.ForwardedMetadata
43334
+ * @static
43335
+ * @param {Object.<string,*>} message Plain object to verify
43336
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
43337
+ */
43338
+ ForwardedMetadata.verify = function verify(message) {
43339
+ if (typeof message !== "object" || message === null)
43340
+ return "object expected";
43341
+ if (message.space != null && message.hasOwnProperty("space"))
43342
+ if (!$util.isString(message.space))
43343
+ return "space: string expected";
43344
+ if (message.spaceDisplayName != null && message.hasOwnProperty("spaceDisplayName"))
43345
+ if (!$util.isString(message.spaceDisplayName))
43346
+ return "spaceDisplayName: string expected";
43347
+ return null;
43348
+ };
43349
+
43350
+ /**
43351
+ * Creates a ForwardedMetadata message from a plain object. Also converts values to their respective internal types.
43352
+ * @function fromObject
43353
+ * @memberof google.chat.v1.ForwardedMetadata
43354
+ * @static
43355
+ * @param {Object.<string,*>} object Plain object
43356
+ * @returns {google.chat.v1.ForwardedMetadata} ForwardedMetadata
43357
+ */
43358
+ ForwardedMetadata.fromObject = function fromObject(object) {
43359
+ if (object instanceof $root.google.chat.v1.ForwardedMetadata)
43360
+ return object;
43361
+ var message = new $root.google.chat.v1.ForwardedMetadata();
43362
+ if (object.space != null)
43363
+ message.space = String(object.space);
43364
+ if (object.spaceDisplayName != null)
43365
+ message.spaceDisplayName = String(object.spaceDisplayName);
43366
+ return message;
43367
+ };
43368
+
43369
+ /**
43370
+ * Creates a plain object from a ForwardedMetadata message. Also converts values to other types if specified.
43371
+ * @function toObject
43372
+ * @memberof google.chat.v1.ForwardedMetadata
43373
+ * @static
43374
+ * @param {google.chat.v1.ForwardedMetadata} message ForwardedMetadata
43375
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
43376
+ * @returns {Object.<string,*>} Plain object
43377
+ */
43378
+ ForwardedMetadata.toObject = function toObject(message, options) {
43379
+ if (!options)
43380
+ options = {};
43381
+ var object = {};
43382
+ if (options.defaults) {
43383
+ object.space = "";
43384
+ object.spaceDisplayName = "";
43385
+ }
43386
+ if (message.space != null && message.hasOwnProperty("space"))
43387
+ object.space = message.space;
43388
+ if (message.spaceDisplayName != null && message.hasOwnProperty("spaceDisplayName"))
43389
+ object.spaceDisplayName = message.spaceDisplayName;
43390
+ return object;
43391
+ };
43392
+
43393
+ /**
43394
+ * Converts this ForwardedMetadata to JSON.
43395
+ * @function toJSON
43396
+ * @memberof google.chat.v1.ForwardedMetadata
43397
+ * @instance
43398
+ * @returns {Object.<string,*>} JSON object
43399
+ */
43400
+ ForwardedMetadata.prototype.toJSON = function toJSON() {
43401
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
43402
+ };
43403
+
43404
+ /**
43405
+ * Gets the default type url for ForwardedMetadata
43406
+ * @function getTypeUrl
43407
+ * @memberof google.chat.v1.ForwardedMetadata
43408
+ * @static
43409
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
43410
+ * @returns {string} The default type url
43411
+ */
43412
+ ForwardedMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
43413
+ if (typeUrlPrefix === undefined) {
43414
+ typeUrlPrefix = "type.googleapis.com";
43415
+ }
43416
+ return typeUrlPrefix + "/google.chat.v1.ForwardedMetadata";
43417
+ };
43418
+
43419
+ return ForwardedMetadata;
43420
+ })();
43421
+
42739
43422
  v1.Thread = (function() {
42740
43423
 
42741
43424
  /**
@@ -4623,6 +4623,95 @@
4623
4623
  "options": {
4624
4624
  "(google.api.field_behavior)": "REQUIRED"
4625
4625
  }
4626
+ },
4627
+ "quoteType": {
4628
+ "type": "QuoteType",
4629
+ "id": 4,
4630
+ "options": {
4631
+ "(google.api.field_behavior)": "OPTIONAL"
4632
+ }
4633
+ },
4634
+ "quotedMessageSnapshot": {
4635
+ "type": "QuotedMessageSnapshot",
4636
+ "id": 5,
4637
+ "options": {
4638
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
4639
+ }
4640
+ },
4641
+ "forwardedMetadata": {
4642
+ "type": "ForwardedMetadata",
4643
+ "id": 6,
4644
+ "options": {
4645
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
4646
+ }
4647
+ }
4648
+ },
4649
+ "nested": {
4650
+ "QuoteType": {
4651
+ "values": {
4652
+ "QUOTE_TYPE_UNSPECIFIED": 0,
4653
+ "REPLY": 1
4654
+ }
4655
+ }
4656
+ }
4657
+ },
4658
+ "QuotedMessageSnapshot": {
4659
+ "fields": {
4660
+ "sender": {
4661
+ "type": "string",
4662
+ "id": 1,
4663
+ "options": {
4664
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
4665
+ }
4666
+ },
4667
+ "text": {
4668
+ "type": "string",
4669
+ "id": 2,
4670
+ "options": {
4671
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
4672
+ }
4673
+ },
4674
+ "formattedText": {
4675
+ "type": "string",
4676
+ "id": 3,
4677
+ "options": {
4678
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
4679
+ }
4680
+ },
4681
+ "annotations": {
4682
+ "rule": "repeated",
4683
+ "type": "Annotation",
4684
+ "id": 4,
4685
+ "options": {
4686
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
4687
+ }
4688
+ },
4689
+ "attachments": {
4690
+ "rule": "repeated",
4691
+ "type": "Attachment",
4692
+ "id": 5,
4693
+ "options": {
4694
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
4695
+ }
4696
+ }
4697
+ }
4698
+ },
4699
+ "ForwardedMetadata": {
4700
+ "fields": {
4701
+ "space": {
4702
+ "type": "string",
4703
+ "id": 1,
4704
+ "options": {
4705
+ "(google.api.field_behavior)": "OUTPUT_ONLY",
4706
+ "(google.api.resource_reference).type": "chat.googleapis.com/Space"
4707
+ }
4708
+ },
4709
+ "spaceDisplayName": {
4710
+ "type": "string",
4711
+ "id": 2,
4712
+ "options": {
4713
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
4714
+ }
4626
4715
  }
4627
4716
  }
4628
4717
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google-apps/chat",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "description": "Google Chat API client for Node.js",
5
5
  "repository": {
6
6
  "type": "git",