@google-apps/chat 0.23.1 → 0.24.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.
Files changed (34) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +1 -0
  3. package/build/protos/google/chat/v1/action_status.proto +1 -1
  4. package/build/protos/google/chat/v1/annotation.proto +1 -1
  5. package/build/protos/google/chat/v1/attachment.proto +1 -1
  6. package/build/protos/google/chat/v1/chat_service.proto +26 -0
  7. package/build/protos/google/chat/v1/contextual_addon.proto +1 -1
  8. package/build/protos/google/chat/v1/deletion_metadata.proto +1 -1
  9. package/build/protos/google/chat/v1/event_payload.proto +1 -1
  10. package/build/protos/google/chat/v1/group.proto +1 -1
  11. package/build/protos/google/chat/v1/history_state.proto +1 -1
  12. package/build/protos/google/chat/v1/matched_url.proto +1 -1
  13. package/build/protos/google/chat/v1/membership.proto +1 -1
  14. package/build/protos/google/chat/v1/message.proto +41 -0
  15. package/build/protos/google/chat/v1/reaction.proto +1 -1
  16. package/build/protos/google/chat/v1/slash_command.proto +1 -1
  17. package/build/protos/google/chat/v1/space.proto +81 -1
  18. package/build/protos/google/chat/v1/space_event.proto +1 -1
  19. package/build/protos/google/chat/v1/space_notification_setting.proto +1 -1
  20. package/build/protos/google/chat/v1/space_read_state.proto +1 -1
  21. package/build/protos/google/chat/v1/space_setup.proto +1 -1
  22. package/build/protos/google/chat/v1/thread_read_state.proto +1 -1
  23. package/build/protos/google/chat/v1/user.proto +1 -1
  24. package/build/protos/google/chat/v1/widgets.proto +1 -1
  25. package/build/protos/protos.d.ts +365 -0
  26. package/build/protos/protos.js +959 -48
  27. package/build/protos/protos.json +95 -0
  28. package/build/src/index.js +1 -1
  29. package/build/src/v1/chat_service_client.d.ts +205 -0
  30. package/build/src/v1/chat_service_client.js +167 -1
  31. package/build/src/v1/chat_service_client.js.map +1 -1
  32. package/build/src/v1/chat_service_client_config.json +5 -0
  33. package/build/src/v1/gapic_metadata.json +14 -0
  34. package/package.json +1 -1
@@ -38482,6 +38482,39 @@
38482
38482
  * @variation 2
38483
38483
  */
38484
38484
 
38485
+ /**
38486
+ * Callback as used by {@link google.chat.v1.ChatService|findGroupChats}.
38487
+ * @memberof google.chat.v1.ChatService
38488
+ * @typedef FindGroupChatsCallback
38489
+ * @type {function}
38490
+ * @param {Error|null} error Error, if any
38491
+ * @param {google.chat.v1.FindGroupChatsResponse} [response] FindGroupChatsResponse
38492
+ */
38493
+
38494
+ /**
38495
+ * Calls FindGroupChats.
38496
+ * @function findGroupChats
38497
+ * @memberof google.chat.v1.ChatService
38498
+ * @instance
38499
+ * @param {google.chat.v1.IFindGroupChatsRequest} request FindGroupChatsRequest message or plain object
38500
+ * @param {google.chat.v1.ChatService.FindGroupChatsCallback} callback Node-style callback called with the error, if any, and FindGroupChatsResponse
38501
+ * @returns {undefined}
38502
+ * @variation 1
38503
+ */
38504
+ Object.defineProperty(ChatService.prototype.findGroupChats = function findGroupChats(request, callback) {
38505
+ return this.rpcCall(findGroupChats, $root.google.chat.v1.FindGroupChatsRequest, $root.google.chat.v1.FindGroupChatsResponse, request, callback);
38506
+ }, "name", { value: "FindGroupChats" });
38507
+
38508
+ /**
38509
+ * Calls FindGroupChats.
38510
+ * @function findGroupChats
38511
+ * @memberof google.chat.v1.ChatService
38512
+ * @instance
38513
+ * @param {google.chat.v1.IFindGroupChatsRequest} request FindGroupChatsRequest message or plain object
38514
+ * @returns {Promise<google.chat.v1.FindGroupChatsResponse>} Promise
38515
+ * @variation 2
38516
+ */
38517
+
38485
38518
  /**
38486
38519
  * Callback as used by {@link google.chat.v1.ChatService|createMembership}.
38487
38520
  * @memberof google.chat.v1.ChatService
@@ -41563,6 +41596,7 @@
41563
41596
  * @property {Array.<google.chat.v1.IAttachment>|null} [attachment] Message attachment
41564
41597
  * @property {google.chat.v1.IMatchedUrl|null} [matchedUrl] Message matchedUrl
41565
41598
  * @property {boolean|null} [threadReply] Message threadReply
41599
+ * @property {boolean|null} [silent] Message silent
41566
41600
  * @property {string|null} [clientAssignedMessageId] Message clientAssignedMessageId
41567
41601
  * @property {Array.<google.chat.v1.IEmojiReactionSummary>|null} [emojiReactionSummaries] Message emojiReactionSummaries
41568
41602
  * @property {google.chat.v1.IUser|null} [privateMessageViewer] Message privateMessageViewer
@@ -41746,6 +41780,14 @@
41746
41780
  */
41747
41781
  Message.prototype.threadReply = false;
41748
41782
 
41783
+ /**
41784
+ * Message silent.
41785
+ * @member {boolean} silent
41786
+ * @memberof google.chat.v1.Message
41787
+ * @instance
41788
+ */
41789
+ Message.prototype.silent = false;
41790
+
41749
41791
  /**
41750
41792
  * Message clientAssignedMessageId.
41751
41793
  * @member {string} clientAssignedMessageId
@@ -41885,6 +41927,8 @@
41885
41927
  if (message.accessoryWidgets != null && message.accessoryWidgets.length)
41886
41928
  for (var i = 0; i < message.accessoryWidgets.length; ++i)
41887
41929
  $root.google.chat.v1.AccessoryWidget.encode(message.accessoryWidgets[i], writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim();
41930
+ if (message.silent != null && Object.hasOwnProperty.call(message, "silent"))
41931
+ writer.uint32(/* id 46, wireType 0 =*/368).bool(message.silent);
41888
41932
  return writer;
41889
41933
  };
41890
41934
 
@@ -42005,6 +42049,10 @@
42005
42049
  message.threadReply = reader.bool();
42006
42050
  break;
42007
42051
  }
42052
+ case 46: {
42053
+ message.silent = reader.bool();
42054
+ break;
42055
+ }
42008
42056
  case 32: {
42009
42057
  message.clientAssignedMessageId = reader.string();
42010
42058
  break;
@@ -42173,6 +42221,9 @@
42173
42221
  if (message.threadReply != null && message.hasOwnProperty("threadReply"))
42174
42222
  if (typeof message.threadReply !== "boolean")
42175
42223
  return "threadReply: boolean expected";
42224
+ if (message.silent != null && message.hasOwnProperty("silent"))
42225
+ if (typeof message.silent !== "boolean")
42226
+ return "silent: boolean expected";
42176
42227
  if (message.clientAssignedMessageId != null && message.hasOwnProperty("clientAssignedMessageId"))
42177
42228
  if (!$util.isString(message.clientAssignedMessageId))
42178
42229
  return "clientAssignedMessageId: string expected";
@@ -42330,6 +42381,8 @@
42330
42381
  }
42331
42382
  if (object.threadReply != null)
42332
42383
  message.threadReply = Boolean(object.threadReply);
42384
+ if (object.silent != null)
42385
+ message.silent = Boolean(object.silent);
42333
42386
  if (object.clientAssignedMessageId != null)
42334
42387
  message.clientAssignedMessageId = String(object.clientAssignedMessageId);
42335
42388
  if (object.emojiReactionSummaries) {
@@ -42422,6 +42475,7 @@
42422
42475
  object.deletionMetadata = null;
42423
42476
  object.quotedMessageMetadata = null;
42424
42477
  object.formattedText = "";
42478
+ object.silent = false;
42425
42479
  }
42426
42480
  if (message.name != null && message.hasOwnProperty("name"))
42427
42481
  object.name = message.name;
@@ -42496,6 +42550,8 @@
42496
42550
  for (var j = 0; j < message.accessoryWidgets.length; ++j)
42497
42551
  object.accessoryWidgets[j] = $root.google.chat.v1.AccessoryWidget.toObject(message.accessoryWidgets[j], options);
42498
42552
  }
42553
+ if (message.silent != null && message.hasOwnProperty("silent"))
42554
+ object.silent = message.silent;
42499
42555
  return object;
42500
42556
  };
42501
42557
 
@@ -45648,6 +45704,7 @@
45648
45704
  * @property {string|null} [requestId] CreateMessageRequest requestId
45649
45705
  * @property {google.chat.v1.CreateMessageRequest.MessageReplyOption|null} [messageReplyOption] CreateMessageRequest messageReplyOption
45650
45706
  * @property {string|null} [messageId] CreateMessageRequest messageId
45707
+ * @property {google.chat.v1.ICreateMessageNotificationOptions|null} [createMessageNotificationOptions] CreateMessageRequest createMessageNotificationOptions
45651
45708
  */
45652
45709
 
45653
45710
  /**
@@ -45713,6 +45770,14 @@
45713
45770
  */
45714
45771
  CreateMessageRequest.prototype.messageId = "";
45715
45772
 
45773
+ /**
45774
+ * CreateMessageRequest createMessageNotificationOptions.
45775
+ * @member {google.chat.v1.ICreateMessageNotificationOptions|null|undefined} createMessageNotificationOptions
45776
+ * @memberof google.chat.v1.CreateMessageRequest
45777
+ * @instance
45778
+ */
45779
+ CreateMessageRequest.prototype.createMessageNotificationOptions = null;
45780
+
45716
45781
  /**
45717
45782
  * Creates a new CreateMessageRequest instance using the specified properties.
45718
45783
  * @function create
@@ -45749,6 +45814,8 @@
45749
45814
  writer.uint32(/* id 8, wireType 0 =*/64).int32(message.messageReplyOption);
45750
45815
  if (message.messageId != null && Object.hasOwnProperty.call(message, "messageId"))
45751
45816
  writer.uint32(/* id 9, wireType 2 =*/74).string(message.messageId);
45817
+ if (message.createMessageNotificationOptions != null && Object.hasOwnProperty.call(message, "createMessageNotificationOptions"))
45818
+ $root.google.chat.v1.CreateMessageNotificationOptions.encode(message.createMessageNotificationOptions, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
45752
45819
  return writer;
45753
45820
  };
45754
45821
 
@@ -45809,6 +45876,10 @@
45809
45876
  message.messageId = reader.string();
45810
45877
  break;
45811
45878
  }
45879
+ case 10: {
45880
+ message.createMessageNotificationOptions = $root.google.chat.v1.CreateMessageNotificationOptions.decode(reader, reader.uint32());
45881
+ break;
45882
+ }
45812
45883
  default:
45813
45884
  reader.skipType(tag & 7);
45814
45885
  break;
@@ -45870,6 +45941,11 @@
45870
45941
  if (message.messageId != null && message.hasOwnProperty("messageId"))
45871
45942
  if (!$util.isString(message.messageId))
45872
45943
  return "messageId: string expected";
45944
+ if (message.createMessageNotificationOptions != null && message.hasOwnProperty("createMessageNotificationOptions")) {
45945
+ var error = $root.google.chat.v1.CreateMessageNotificationOptions.verify(message.createMessageNotificationOptions);
45946
+ if (error)
45947
+ return "createMessageNotificationOptions." + error;
45948
+ }
45873
45949
  return null;
45874
45950
  };
45875
45951
 
@@ -45918,6 +45994,11 @@
45918
45994
  }
45919
45995
  if (object.messageId != null)
45920
45996
  message.messageId = String(object.messageId);
45997
+ if (object.createMessageNotificationOptions != null) {
45998
+ if (typeof object.createMessageNotificationOptions !== "object")
45999
+ throw TypeError(".google.chat.v1.CreateMessageRequest.createMessageNotificationOptions: object expected");
46000
+ message.createMessageNotificationOptions = $root.google.chat.v1.CreateMessageNotificationOptions.fromObject(object.createMessageNotificationOptions);
46001
+ }
45921
46002
  return message;
45922
46003
  };
45923
46004
 
@@ -45941,6 +46022,7 @@
45941
46022
  object.requestId = "";
45942
46023
  object.messageReplyOption = options.enums === String ? "MESSAGE_REPLY_OPTION_UNSPECIFIED" : 0;
45943
46024
  object.messageId = "";
46025
+ object.createMessageNotificationOptions = null;
45944
46026
  }
45945
46027
  if (message.parent != null && message.hasOwnProperty("parent"))
45946
46028
  object.parent = message.parent;
@@ -45954,6 +46036,8 @@
45954
46036
  object.messageReplyOption = options.enums === String ? $root.google.chat.v1.CreateMessageRequest.MessageReplyOption[message.messageReplyOption] === undefined ? message.messageReplyOption : $root.google.chat.v1.CreateMessageRequest.MessageReplyOption[message.messageReplyOption] : message.messageReplyOption;
45955
46037
  if (message.messageId != null && message.hasOwnProperty("messageId"))
45956
46038
  object.messageId = message.messageId;
46039
+ if (message.createMessageNotificationOptions != null && message.hasOwnProperty("createMessageNotificationOptions"))
46040
+ object.createMessageNotificationOptions = $root.google.chat.v1.CreateMessageNotificationOptions.toObject(message.createMessageNotificationOptions, options);
45957
46041
  return object;
45958
46042
  };
45959
46043
 
@@ -46002,6 +46086,251 @@
46002
46086
  return CreateMessageRequest;
46003
46087
  })();
46004
46088
 
46089
+ v1.CreateMessageNotificationOptions = (function() {
46090
+
46091
+ /**
46092
+ * Properties of a CreateMessageNotificationOptions.
46093
+ * @memberof google.chat.v1
46094
+ * @interface ICreateMessageNotificationOptions
46095
+ * @property {google.chat.v1.CreateMessageNotificationOptions.NotificationType|null} [notificationType] CreateMessageNotificationOptions notificationType
46096
+ */
46097
+
46098
+ /**
46099
+ * Constructs a new CreateMessageNotificationOptions.
46100
+ * @memberof google.chat.v1
46101
+ * @classdesc Represents a CreateMessageNotificationOptions.
46102
+ * @implements ICreateMessageNotificationOptions
46103
+ * @constructor
46104
+ * @param {google.chat.v1.ICreateMessageNotificationOptions=} [properties] Properties to set
46105
+ */
46106
+ function CreateMessageNotificationOptions(properties) {
46107
+ if (properties)
46108
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
46109
+ if (properties[keys[i]] != null)
46110
+ this[keys[i]] = properties[keys[i]];
46111
+ }
46112
+
46113
+ /**
46114
+ * CreateMessageNotificationOptions notificationType.
46115
+ * @member {google.chat.v1.CreateMessageNotificationOptions.NotificationType} notificationType
46116
+ * @memberof google.chat.v1.CreateMessageNotificationOptions
46117
+ * @instance
46118
+ */
46119
+ CreateMessageNotificationOptions.prototype.notificationType = 0;
46120
+
46121
+ /**
46122
+ * Creates a new CreateMessageNotificationOptions instance using the specified properties.
46123
+ * @function create
46124
+ * @memberof google.chat.v1.CreateMessageNotificationOptions
46125
+ * @static
46126
+ * @param {google.chat.v1.ICreateMessageNotificationOptions=} [properties] Properties to set
46127
+ * @returns {google.chat.v1.CreateMessageNotificationOptions} CreateMessageNotificationOptions instance
46128
+ */
46129
+ CreateMessageNotificationOptions.create = function create(properties) {
46130
+ return new CreateMessageNotificationOptions(properties);
46131
+ };
46132
+
46133
+ /**
46134
+ * Encodes the specified CreateMessageNotificationOptions message. Does not implicitly {@link google.chat.v1.CreateMessageNotificationOptions.verify|verify} messages.
46135
+ * @function encode
46136
+ * @memberof google.chat.v1.CreateMessageNotificationOptions
46137
+ * @static
46138
+ * @param {google.chat.v1.ICreateMessageNotificationOptions} message CreateMessageNotificationOptions message or plain object to encode
46139
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46140
+ * @returns {$protobuf.Writer} Writer
46141
+ */
46142
+ CreateMessageNotificationOptions.encode = function encode(message, writer) {
46143
+ if (!writer)
46144
+ writer = $Writer.create();
46145
+ if (message.notificationType != null && Object.hasOwnProperty.call(message, "notificationType"))
46146
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.notificationType);
46147
+ return writer;
46148
+ };
46149
+
46150
+ /**
46151
+ * Encodes the specified CreateMessageNotificationOptions message, length delimited. Does not implicitly {@link google.chat.v1.CreateMessageNotificationOptions.verify|verify} messages.
46152
+ * @function encodeDelimited
46153
+ * @memberof google.chat.v1.CreateMessageNotificationOptions
46154
+ * @static
46155
+ * @param {google.chat.v1.ICreateMessageNotificationOptions} message CreateMessageNotificationOptions message or plain object to encode
46156
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46157
+ * @returns {$protobuf.Writer} Writer
46158
+ */
46159
+ CreateMessageNotificationOptions.encodeDelimited = function encodeDelimited(message, writer) {
46160
+ return this.encode(message, writer).ldelim();
46161
+ };
46162
+
46163
+ /**
46164
+ * Decodes a CreateMessageNotificationOptions message from the specified reader or buffer.
46165
+ * @function decode
46166
+ * @memberof google.chat.v1.CreateMessageNotificationOptions
46167
+ * @static
46168
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46169
+ * @param {number} [length] Message length if known beforehand
46170
+ * @returns {google.chat.v1.CreateMessageNotificationOptions} CreateMessageNotificationOptions
46171
+ * @throws {Error} If the payload is not a reader or valid buffer
46172
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46173
+ */
46174
+ CreateMessageNotificationOptions.decode = function decode(reader, length, error) {
46175
+ if (!(reader instanceof $Reader))
46176
+ reader = $Reader.create(reader);
46177
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.CreateMessageNotificationOptions();
46178
+ while (reader.pos < end) {
46179
+ var tag = reader.uint32();
46180
+ if (tag === error)
46181
+ break;
46182
+ switch (tag >>> 3) {
46183
+ case 1: {
46184
+ message.notificationType = reader.int32();
46185
+ break;
46186
+ }
46187
+ default:
46188
+ reader.skipType(tag & 7);
46189
+ break;
46190
+ }
46191
+ }
46192
+ return message;
46193
+ };
46194
+
46195
+ /**
46196
+ * Decodes a CreateMessageNotificationOptions message from the specified reader or buffer, length delimited.
46197
+ * @function decodeDelimited
46198
+ * @memberof google.chat.v1.CreateMessageNotificationOptions
46199
+ * @static
46200
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46201
+ * @returns {google.chat.v1.CreateMessageNotificationOptions} CreateMessageNotificationOptions
46202
+ * @throws {Error} If the payload is not a reader or valid buffer
46203
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46204
+ */
46205
+ CreateMessageNotificationOptions.decodeDelimited = function decodeDelimited(reader) {
46206
+ if (!(reader instanceof $Reader))
46207
+ reader = new $Reader(reader);
46208
+ return this.decode(reader, reader.uint32());
46209
+ };
46210
+
46211
+ /**
46212
+ * Verifies a CreateMessageNotificationOptions message.
46213
+ * @function verify
46214
+ * @memberof google.chat.v1.CreateMessageNotificationOptions
46215
+ * @static
46216
+ * @param {Object.<string,*>} message Plain object to verify
46217
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
46218
+ */
46219
+ CreateMessageNotificationOptions.verify = function verify(message) {
46220
+ if (typeof message !== "object" || message === null)
46221
+ return "object expected";
46222
+ if (message.notificationType != null && message.hasOwnProperty("notificationType"))
46223
+ switch (message.notificationType) {
46224
+ default:
46225
+ return "notificationType: enum value expected";
46226
+ case 0:
46227
+ case 2:
46228
+ case 3:
46229
+ break;
46230
+ }
46231
+ return null;
46232
+ };
46233
+
46234
+ /**
46235
+ * Creates a CreateMessageNotificationOptions message from a plain object. Also converts values to their respective internal types.
46236
+ * @function fromObject
46237
+ * @memberof google.chat.v1.CreateMessageNotificationOptions
46238
+ * @static
46239
+ * @param {Object.<string,*>} object Plain object
46240
+ * @returns {google.chat.v1.CreateMessageNotificationOptions} CreateMessageNotificationOptions
46241
+ */
46242
+ CreateMessageNotificationOptions.fromObject = function fromObject(object) {
46243
+ if (object instanceof $root.google.chat.v1.CreateMessageNotificationOptions)
46244
+ return object;
46245
+ var message = new $root.google.chat.v1.CreateMessageNotificationOptions();
46246
+ switch (object.notificationType) {
46247
+ default:
46248
+ if (typeof object.notificationType === "number") {
46249
+ message.notificationType = object.notificationType;
46250
+ break;
46251
+ }
46252
+ break;
46253
+ case "NOTIFICATION_TYPE_NONE":
46254
+ case 0:
46255
+ message.notificationType = 0;
46256
+ break;
46257
+ case "NOTIFICATION_TYPE_FORCE_NOTIFY":
46258
+ case 2:
46259
+ message.notificationType = 2;
46260
+ break;
46261
+ case "NOTIFICATION_TYPE_SILENT":
46262
+ case 3:
46263
+ message.notificationType = 3;
46264
+ break;
46265
+ }
46266
+ return message;
46267
+ };
46268
+
46269
+ /**
46270
+ * Creates a plain object from a CreateMessageNotificationOptions message. Also converts values to other types if specified.
46271
+ * @function toObject
46272
+ * @memberof google.chat.v1.CreateMessageNotificationOptions
46273
+ * @static
46274
+ * @param {google.chat.v1.CreateMessageNotificationOptions} message CreateMessageNotificationOptions
46275
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
46276
+ * @returns {Object.<string,*>} Plain object
46277
+ */
46278
+ CreateMessageNotificationOptions.toObject = function toObject(message, options) {
46279
+ if (!options)
46280
+ options = {};
46281
+ var object = {};
46282
+ if (options.defaults)
46283
+ object.notificationType = options.enums === String ? "NOTIFICATION_TYPE_NONE" : 0;
46284
+ if (message.notificationType != null && message.hasOwnProperty("notificationType"))
46285
+ object.notificationType = options.enums === String ? $root.google.chat.v1.CreateMessageNotificationOptions.NotificationType[message.notificationType] === undefined ? message.notificationType : $root.google.chat.v1.CreateMessageNotificationOptions.NotificationType[message.notificationType] : message.notificationType;
46286
+ return object;
46287
+ };
46288
+
46289
+ /**
46290
+ * Converts this CreateMessageNotificationOptions to JSON.
46291
+ * @function toJSON
46292
+ * @memberof google.chat.v1.CreateMessageNotificationOptions
46293
+ * @instance
46294
+ * @returns {Object.<string,*>} JSON object
46295
+ */
46296
+ CreateMessageNotificationOptions.prototype.toJSON = function toJSON() {
46297
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
46298
+ };
46299
+
46300
+ /**
46301
+ * Gets the default type url for CreateMessageNotificationOptions
46302
+ * @function getTypeUrl
46303
+ * @memberof google.chat.v1.CreateMessageNotificationOptions
46304
+ * @static
46305
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
46306
+ * @returns {string} The default type url
46307
+ */
46308
+ CreateMessageNotificationOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
46309
+ if (typeUrlPrefix === undefined) {
46310
+ typeUrlPrefix = "type.googleapis.com";
46311
+ }
46312
+ return typeUrlPrefix + "/google.chat.v1.CreateMessageNotificationOptions";
46313
+ };
46314
+
46315
+ /**
46316
+ * NotificationType enum.
46317
+ * @name google.chat.v1.CreateMessageNotificationOptions.NotificationType
46318
+ * @enum {number}
46319
+ * @property {number} NOTIFICATION_TYPE_NONE=0 NOTIFICATION_TYPE_NONE value
46320
+ * @property {number} NOTIFICATION_TYPE_FORCE_NOTIFY=2 NOTIFICATION_TYPE_FORCE_NOTIFY value
46321
+ * @property {number} NOTIFICATION_TYPE_SILENT=3 NOTIFICATION_TYPE_SILENT value
46322
+ */
46323
+ CreateMessageNotificationOptions.NotificationType = (function() {
46324
+ var valuesById = {}, values = Object.create(valuesById);
46325
+ values[valuesById[0] = "NOTIFICATION_TYPE_NONE"] = 0;
46326
+ values[valuesById[2] = "NOTIFICATION_TYPE_FORCE_NOTIFY"] = 2;
46327
+ values[valuesById[3] = "NOTIFICATION_TYPE_SILENT"] = 3;
46328
+ return values;
46329
+ })();
46330
+
46331
+ return CreateMessageNotificationOptions;
46332
+ })();
46333
+
46005
46334
  v1.ListMessagesRequest = (function() {
46006
46335
 
46007
46336
  /**
@@ -56249,26 +56578,28 @@
56249
56578
  return FindDirectMessageRequest;
56250
56579
  })();
56251
56580
 
56252
- v1.UpdateSpaceRequest = (function() {
56581
+ v1.FindGroupChatsRequest = (function() {
56253
56582
 
56254
56583
  /**
56255
- * Properties of an UpdateSpaceRequest.
56584
+ * Properties of a FindGroupChatsRequest.
56256
56585
  * @memberof google.chat.v1
56257
- * @interface IUpdateSpaceRequest
56258
- * @property {google.chat.v1.ISpace|null} [space] UpdateSpaceRequest space
56259
- * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSpaceRequest updateMask
56260
- * @property {boolean|null} [useAdminAccess] UpdateSpaceRequest useAdminAccess
56586
+ * @interface IFindGroupChatsRequest
56587
+ * @property {Array.<string>|null} [users] FindGroupChatsRequest users
56588
+ * @property {number|null} [pageSize] FindGroupChatsRequest pageSize
56589
+ * @property {string|null} [pageToken] FindGroupChatsRequest pageToken
56590
+ * @property {google.chat.v1.SpaceView|null} [spaceView] FindGroupChatsRequest spaceView
56261
56591
  */
56262
56592
 
56263
56593
  /**
56264
- * Constructs a new UpdateSpaceRequest.
56594
+ * Constructs a new FindGroupChatsRequest.
56265
56595
  * @memberof google.chat.v1
56266
- * @classdesc Represents an UpdateSpaceRequest.
56267
- * @implements IUpdateSpaceRequest
56596
+ * @classdesc Represents a FindGroupChatsRequest.
56597
+ * @implements IFindGroupChatsRequest
56268
56598
  * @constructor
56269
- * @param {google.chat.v1.IUpdateSpaceRequest=} [properties] Properties to set
56599
+ * @param {google.chat.v1.IFindGroupChatsRequest=} [properties] Properties to set
56270
56600
  */
56271
- function UpdateSpaceRequest(properties) {
56601
+ function FindGroupChatsRequest(properties) {
56602
+ this.users = [];
56272
56603
  if (properties)
56273
56604
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
56274
56605
  if (properties[keys[i]] != null)
@@ -56276,90 +56607,654 @@
56276
56607
  }
56277
56608
 
56278
56609
  /**
56279
- * UpdateSpaceRequest space.
56280
- * @member {google.chat.v1.ISpace|null|undefined} space
56281
- * @memberof google.chat.v1.UpdateSpaceRequest
56610
+ * FindGroupChatsRequest users.
56611
+ * @member {Array.<string>} users
56612
+ * @memberof google.chat.v1.FindGroupChatsRequest
56282
56613
  * @instance
56283
56614
  */
56284
- UpdateSpaceRequest.prototype.space = null;
56615
+ FindGroupChatsRequest.prototype.users = $util.emptyArray;
56285
56616
 
56286
56617
  /**
56287
- * UpdateSpaceRequest updateMask.
56288
- * @member {google.protobuf.IFieldMask|null|undefined} updateMask
56289
- * @memberof google.chat.v1.UpdateSpaceRequest
56618
+ * FindGroupChatsRequest pageSize.
56619
+ * @member {number} pageSize
56620
+ * @memberof google.chat.v1.FindGroupChatsRequest
56290
56621
  * @instance
56291
56622
  */
56292
- UpdateSpaceRequest.prototype.updateMask = null;
56623
+ FindGroupChatsRequest.prototype.pageSize = 0;
56293
56624
 
56294
56625
  /**
56295
- * UpdateSpaceRequest useAdminAccess.
56296
- * @member {boolean} useAdminAccess
56297
- * @memberof google.chat.v1.UpdateSpaceRequest
56626
+ * FindGroupChatsRequest pageToken.
56627
+ * @member {string} pageToken
56628
+ * @memberof google.chat.v1.FindGroupChatsRequest
56298
56629
  * @instance
56299
56630
  */
56300
- UpdateSpaceRequest.prototype.useAdminAccess = false;
56631
+ FindGroupChatsRequest.prototype.pageToken = "";
56301
56632
 
56302
56633
  /**
56303
- * Creates a new UpdateSpaceRequest instance using the specified properties.
56634
+ * FindGroupChatsRequest spaceView.
56635
+ * @member {google.chat.v1.SpaceView} spaceView
56636
+ * @memberof google.chat.v1.FindGroupChatsRequest
56637
+ * @instance
56638
+ */
56639
+ FindGroupChatsRequest.prototype.spaceView = 0;
56640
+
56641
+ /**
56642
+ * Creates a new FindGroupChatsRequest instance using the specified properties.
56304
56643
  * @function create
56305
- * @memberof google.chat.v1.UpdateSpaceRequest
56644
+ * @memberof google.chat.v1.FindGroupChatsRequest
56306
56645
  * @static
56307
- * @param {google.chat.v1.IUpdateSpaceRequest=} [properties] Properties to set
56308
- * @returns {google.chat.v1.UpdateSpaceRequest} UpdateSpaceRequest instance
56646
+ * @param {google.chat.v1.IFindGroupChatsRequest=} [properties] Properties to set
56647
+ * @returns {google.chat.v1.FindGroupChatsRequest} FindGroupChatsRequest instance
56309
56648
  */
56310
- UpdateSpaceRequest.create = function create(properties) {
56311
- return new UpdateSpaceRequest(properties);
56649
+ FindGroupChatsRequest.create = function create(properties) {
56650
+ return new FindGroupChatsRequest(properties);
56312
56651
  };
56313
56652
 
56314
56653
  /**
56315
- * Encodes the specified UpdateSpaceRequest message. Does not implicitly {@link google.chat.v1.UpdateSpaceRequest.verify|verify} messages.
56654
+ * Encodes the specified FindGroupChatsRequest message. Does not implicitly {@link google.chat.v1.FindGroupChatsRequest.verify|verify} messages.
56316
56655
  * @function encode
56317
- * @memberof google.chat.v1.UpdateSpaceRequest
56656
+ * @memberof google.chat.v1.FindGroupChatsRequest
56318
56657
  * @static
56319
- * @param {google.chat.v1.IUpdateSpaceRequest} message UpdateSpaceRequest message or plain object to encode
56658
+ * @param {google.chat.v1.IFindGroupChatsRequest} message FindGroupChatsRequest message or plain object to encode
56320
56659
  * @param {$protobuf.Writer} [writer] Writer to encode to
56321
56660
  * @returns {$protobuf.Writer} Writer
56322
56661
  */
56323
- UpdateSpaceRequest.encode = function encode(message, writer) {
56662
+ FindGroupChatsRequest.encode = function encode(message, writer) {
56324
56663
  if (!writer)
56325
56664
  writer = $Writer.create();
56326
- if (message.space != null && Object.hasOwnProperty.call(message, "space"))
56327
- $root.google.chat.v1.Space.encode(message.space, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
56328
- if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask"))
56329
- $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
56330
- if (message.useAdminAccess != null && Object.hasOwnProperty.call(message, "useAdminAccess"))
56331
- writer.uint32(/* id 3, wireType 0 =*/24).bool(message.useAdminAccess);
56665
+ if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
56666
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
56667
+ if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
56668
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
56669
+ if (message.spaceView != null && Object.hasOwnProperty.call(message, "spaceView"))
56670
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.spaceView);
56671
+ if (message.users != null && message.users.length)
56672
+ for (var i = 0; i < message.users.length; ++i)
56673
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.users[i]);
56332
56674
  return writer;
56333
56675
  };
56334
56676
 
56335
56677
  /**
56336
- * Encodes the specified UpdateSpaceRequest message, length delimited. Does not implicitly {@link google.chat.v1.UpdateSpaceRequest.verify|verify} messages.
56678
+ * Encodes the specified FindGroupChatsRequest message, length delimited. Does not implicitly {@link google.chat.v1.FindGroupChatsRequest.verify|verify} messages.
56337
56679
  * @function encodeDelimited
56338
- * @memberof google.chat.v1.UpdateSpaceRequest
56680
+ * @memberof google.chat.v1.FindGroupChatsRequest
56339
56681
  * @static
56340
- * @param {google.chat.v1.IUpdateSpaceRequest} message UpdateSpaceRequest message or plain object to encode
56682
+ * @param {google.chat.v1.IFindGroupChatsRequest} message FindGroupChatsRequest message or plain object to encode
56341
56683
  * @param {$protobuf.Writer} [writer] Writer to encode to
56342
56684
  * @returns {$protobuf.Writer} Writer
56343
56685
  */
56344
- UpdateSpaceRequest.encodeDelimited = function encodeDelimited(message, writer) {
56686
+ FindGroupChatsRequest.encodeDelimited = function encodeDelimited(message, writer) {
56345
56687
  return this.encode(message, writer).ldelim();
56346
56688
  };
56347
56689
 
56348
56690
  /**
56349
- * Decodes an UpdateSpaceRequest message from the specified reader or buffer.
56691
+ * Decodes a FindGroupChatsRequest message from the specified reader or buffer.
56350
56692
  * @function decode
56351
- * @memberof google.chat.v1.UpdateSpaceRequest
56693
+ * @memberof google.chat.v1.FindGroupChatsRequest
56352
56694
  * @static
56353
56695
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
56354
56696
  * @param {number} [length] Message length if known beforehand
56355
- * @returns {google.chat.v1.UpdateSpaceRequest} UpdateSpaceRequest
56697
+ * @returns {google.chat.v1.FindGroupChatsRequest} FindGroupChatsRequest
56356
56698
  * @throws {Error} If the payload is not a reader or valid buffer
56357
56699
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
56358
56700
  */
56359
- UpdateSpaceRequest.decode = function decode(reader, length, error) {
56701
+ FindGroupChatsRequest.decode = function decode(reader, length, error) {
56360
56702
  if (!(reader instanceof $Reader))
56361
56703
  reader = $Reader.create(reader);
56362
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.UpdateSpaceRequest();
56704
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.FindGroupChatsRequest();
56705
+ while (reader.pos < end) {
56706
+ var tag = reader.uint32();
56707
+ if (tag === error)
56708
+ break;
56709
+ switch (tag >>> 3) {
56710
+ case 5: {
56711
+ if (!(message.users && message.users.length))
56712
+ message.users = [];
56713
+ message.users.push(reader.string());
56714
+ break;
56715
+ }
56716
+ case 2: {
56717
+ message.pageSize = reader.int32();
56718
+ break;
56719
+ }
56720
+ case 3: {
56721
+ message.pageToken = reader.string();
56722
+ break;
56723
+ }
56724
+ case 4: {
56725
+ message.spaceView = reader.int32();
56726
+ break;
56727
+ }
56728
+ default:
56729
+ reader.skipType(tag & 7);
56730
+ break;
56731
+ }
56732
+ }
56733
+ return message;
56734
+ };
56735
+
56736
+ /**
56737
+ * Decodes a FindGroupChatsRequest message from the specified reader or buffer, length delimited.
56738
+ * @function decodeDelimited
56739
+ * @memberof google.chat.v1.FindGroupChatsRequest
56740
+ * @static
56741
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
56742
+ * @returns {google.chat.v1.FindGroupChatsRequest} FindGroupChatsRequest
56743
+ * @throws {Error} If the payload is not a reader or valid buffer
56744
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
56745
+ */
56746
+ FindGroupChatsRequest.decodeDelimited = function decodeDelimited(reader) {
56747
+ if (!(reader instanceof $Reader))
56748
+ reader = new $Reader(reader);
56749
+ return this.decode(reader, reader.uint32());
56750
+ };
56751
+
56752
+ /**
56753
+ * Verifies a FindGroupChatsRequest message.
56754
+ * @function verify
56755
+ * @memberof google.chat.v1.FindGroupChatsRequest
56756
+ * @static
56757
+ * @param {Object.<string,*>} message Plain object to verify
56758
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
56759
+ */
56760
+ FindGroupChatsRequest.verify = function verify(message) {
56761
+ if (typeof message !== "object" || message === null)
56762
+ return "object expected";
56763
+ if (message.users != null && message.hasOwnProperty("users")) {
56764
+ if (!Array.isArray(message.users))
56765
+ return "users: array expected";
56766
+ for (var i = 0; i < message.users.length; ++i)
56767
+ if (!$util.isString(message.users[i]))
56768
+ return "users: string[] expected";
56769
+ }
56770
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
56771
+ if (!$util.isInteger(message.pageSize))
56772
+ return "pageSize: integer expected";
56773
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
56774
+ if (!$util.isString(message.pageToken))
56775
+ return "pageToken: string expected";
56776
+ if (message.spaceView != null && message.hasOwnProperty("spaceView"))
56777
+ switch (message.spaceView) {
56778
+ default:
56779
+ return "spaceView: enum value expected";
56780
+ case 0:
56781
+ case 3:
56782
+ case 4:
56783
+ break;
56784
+ }
56785
+ return null;
56786
+ };
56787
+
56788
+ /**
56789
+ * Creates a FindGroupChatsRequest message from a plain object. Also converts values to their respective internal types.
56790
+ * @function fromObject
56791
+ * @memberof google.chat.v1.FindGroupChatsRequest
56792
+ * @static
56793
+ * @param {Object.<string,*>} object Plain object
56794
+ * @returns {google.chat.v1.FindGroupChatsRequest} FindGroupChatsRequest
56795
+ */
56796
+ FindGroupChatsRequest.fromObject = function fromObject(object) {
56797
+ if (object instanceof $root.google.chat.v1.FindGroupChatsRequest)
56798
+ return object;
56799
+ var message = new $root.google.chat.v1.FindGroupChatsRequest();
56800
+ if (object.users) {
56801
+ if (!Array.isArray(object.users))
56802
+ throw TypeError(".google.chat.v1.FindGroupChatsRequest.users: array expected");
56803
+ message.users = [];
56804
+ for (var i = 0; i < object.users.length; ++i)
56805
+ message.users[i] = String(object.users[i]);
56806
+ }
56807
+ if (object.pageSize != null)
56808
+ message.pageSize = object.pageSize | 0;
56809
+ if (object.pageToken != null)
56810
+ message.pageToken = String(object.pageToken);
56811
+ switch (object.spaceView) {
56812
+ default:
56813
+ if (typeof object.spaceView === "number") {
56814
+ message.spaceView = object.spaceView;
56815
+ break;
56816
+ }
56817
+ break;
56818
+ case "SPACE_VIEW_UNSPECIFIED":
56819
+ case 0:
56820
+ message.spaceView = 0;
56821
+ break;
56822
+ case "SPACE_VIEW_RESOURCE_NAME_ONLY":
56823
+ case 3:
56824
+ message.spaceView = 3;
56825
+ break;
56826
+ case "SPACE_VIEW_EXPANDED":
56827
+ case 4:
56828
+ message.spaceView = 4;
56829
+ break;
56830
+ }
56831
+ return message;
56832
+ };
56833
+
56834
+ /**
56835
+ * Creates a plain object from a FindGroupChatsRequest message. Also converts values to other types if specified.
56836
+ * @function toObject
56837
+ * @memberof google.chat.v1.FindGroupChatsRequest
56838
+ * @static
56839
+ * @param {google.chat.v1.FindGroupChatsRequest} message FindGroupChatsRequest
56840
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
56841
+ * @returns {Object.<string,*>} Plain object
56842
+ */
56843
+ FindGroupChatsRequest.toObject = function toObject(message, options) {
56844
+ if (!options)
56845
+ options = {};
56846
+ var object = {};
56847
+ if (options.arrays || options.defaults)
56848
+ object.users = [];
56849
+ if (options.defaults) {
56850
+ object.pageSize = 0;
56851
+ object.pageToken = "";
56852
+ object.spaceView = options.enums === String ? "SPACE_VIEW_UNSPECIFIED" : 0;
56853
+ }
56854
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
56855
+ object.pageSize = message.pageSize;
56856
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
56857
+ object.pageToken = message.pageToken;
56858
+ if (message.spaceView != null && message.hasOwnProperty("spaceView"))
56859
+ object.spaceView = options.enums === String ? $root.google.chat.v1.SpaceView[message.spaceView] === undefined ? message.spaceView : $root.google.chat.v1.SpaceView[message.spaceView] : message.spaceView;
56860
+ if (message.users && message.users.length) {
56861
+ object.users = [];
56862
+ for (var j = 0; j < message.users.length; ++j)
56863
+ object.users[j] = message.users[j];
56864
+ }
56865
+ return object;
56866
+ };
56867
+
56868
+ /**
56869
+ * Converts this FindGroupChatsRequest to JSON.
56870
+ * @function toJSON
56871
+ * @memberof google.chat.v1.FindGroupChatsRequest
56872
+ * @instance
56873
+ * @returns {Object.<string,*>} JSON object
56874
+ */
56875
+ FindGroupChatsRequest.prototype.toJSON = function toJSON() {
56876
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
56877
+ };
56878
+
56879
+ /**
56880
+ * Gets the default type url for FindGroupChatsRequest
56881
+ * @function getTypeUrl
56882
+ * @memberof google.chat.v1.FindGroupChatsRequest
56883
+ * @static
56884
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
56885
+ * @returns {string} The default type url
56886
+ */
56887
+ FindGroupChatsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
56888
+ if (typeUrlPrefix === undefined) {
56889
+ typeUrlPrefix = "type.googleapis.com";
56890
+ }
56891
+ return typeUrlPrefix + "/google.chat.v1.FindGroupChatsRequest";
56892
+ };
56893
+
56894
+ return FindGroupChatsRequest;
56895
+ })();
56896
+
56897
+ v1.FindGroupChatsResponse = (function() {
56898
+
56899
+ /**
56900
+ * Properties of a FindGroupChatsResponse.
56901
+ * @memberof google.chat.v1
56902
+ * @interface IFindGroupChatsResponse
56903
+ * @property {Array.<google.chat.v1.ISpace>|null} [spaces] FindGroupChatsResponse spaces
56904
+ * @property {string|null} [nextPageToken] FindGroupChatsResponse nextPageToken
56905
+ */
56906
+
56907
+ /**
56908
+ * Constructs a new FindGroupChatsResponse.
56909
+ * @memberof google.chat.v1
56910
+ * @classdesc Represents a FindGroupChatsResponse.
56911
+ * @implements IFindGroupChatsResponse
56912
+ * @constructor
56913
+ * @param {google.chat.v1.IFindGroupChatsResponse=} [properties] Properties to set
56914
+ */
56915
+ function FindGroupChatsResponse(properties) {
56916
+ this.spaces = [];
56917
+ if (properties)
56918
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
56919
+ if (properties[keys[i]] != null)
56920
+ this[keys[i]] = properties[keys[i]];
56921
+ }
56922
+
56923
+ /**
56924
+ * FindGroupChatsResponse spaces.
56925
+ * @member {Array.<google.chat.v1.ISpace>} spaces
56926
+ * @memberof google.chat.v1.FindGroupChatsResponse
56927
+ * @instance
56928
+ */
56929
+ FindGroupChatsResponse.prototype.spaces = $util.emptyArray;
56930
+
56931
+ /**
56932
+ * FindGroupChatsResponse nextPageToken.
56933
+ * @member {string} nextPageToken
56934
+ * @memberof google.chat.v1.FindGroupChatsResponse
56935
+ * @instance
56936
+ */
56937
+ FindGroupChatsResponse.prototype.nextPageToken = "";
56938
+
56939
+ /**
56940
+ * Creates a new FindGroupChatsResponse instance using the specified properties.
56941
+ * @function create
56942
+ * @memberof google.chat.v1.FindGroupChatsResponse
56943
+ * @static
56944
+ * @param {google.chat.v1.IFindGroupChatsResponse=} [properties] Properties to set
56945
+ * @returns {google.chat.v1.FindGroupChatsResponse} FindGroupChatsResponse instance
56946
+ */
56947
+ FindGroupChatsResponse.create = function create(properties) {
56948
+ return new FindGroupChatsResponse(properties);
56949
+ };
56950
+
56951
+ /**
56952
+ * Encodes the specified FindGroupChatsResponse message. Does not implicitly {@link google.chat.v1.FindGroupChatsResponse.verify|verify} messages.
56953
+ * @function encode
56954
+ * @memberof google.chat.v1.FindGroupChatsResponse
56955
+ * @static
56956
+ * @param {google.chat.v1.IFindGroupChatsResponse} message FindGroupChatsResponse message or plain object to encode
56957
+ * @param {$protobuf.Writer} [writer] Writer to encode to
56958
+ * @returns {$protobuf.Writer} Writer
56959
+ */
56960
+ FindGroupChatsResponse.encode = function encode(message, writer) {
56961
+ if (!writer)
56962
+ writer = $Writer.create();
56963
+ if (message.spaces != null && message.spaces.length)
56964
+ for (var i = 0; i < message.spaces.length; ++i)
56965
+ $root.google.chat.v1.Space.encode(message.spaces[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
56966
+ if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
56967
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
56968
+ return writer;
56969
+ };
56970
+
56971
+ /**
56972
+ * Encodes the specified FindGroupChatsResponse message, length delimited. Does not implicitly {@link google.chat.v1.FindGroupChatsResponse.verify|verify} messages.
56973
+ * @function encodeDelimited
56974
+ * @memberof google.chat.v1.FindGroupChatsResponse
56975
+ * @static
56976
+ * @param {google.chat.v1.IFindGroupChatsResponse} message FindGroupChatsResponse message or plain object to encode
56977
+ * @param {$protobuf.Writer} [writer] Writer to encode to
56978
+ * @returns {$protobuf.Writer} Writer
56979
+ */
56980
+ FindGroupChatsResponse.encodeDelimited = function encodeDelimited(message, writer) {
56981
+ return this.encode(message, writer).ldelim();
56982
+ };
56983
+
56984
+ /**
56985
+ * Decodes a FindGroupChatsResponse message from the specified reader or buffer.
56986
+ * @function decode
56987
+ * @memberof google.chat.v1.FindGroupChatsResponse
56988
+ * @static
56989
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
56990
+ * @param {number} [length] Message length if known beforehand
56991
+ * @returns {google.chat.v1.FindGroupChatsResponse} FindGroupChatsResponse
56992
+ * @throws {Error} If the payload is not a reader or valid buffer
56993
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
56994
+ */
56995
+ FindGroupChatsResponse.decode = function decode(reader, length, error) {
56996
+ if (!(reader instanceof $Reader))
56997
+ reader = $Reader.create(reader);
56998
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.FindGroupChatsResponse();
56999
+ while (reader.pos < end) {
57000
+ var tag = reader.uint32();
57001
+ if (tag === error)
57002
+ break;
57003
+ switch (tag >>> 3) {
57004
+ case 1: {
57005
+ if (!(message.spaces && message.spaces.length))
57006
+ message.spaces = [];
57007
+ message.spaces.push($root.google.chat.v1.Space.decode(reader, reader.uint32()));
57008
+ break;
57009
+ }
57010
+ case 2: {
57011
+ message.nextPageToken = reader.string();
57012
+ break;
57013
+ }
57014
+ default:
57015
+ reader.skipType(tag & 7);
57016
+ break;
57017
+ }
57018
+ }
57019
+ return message;
57020
+ };
57021
+
57022
+ /**
57023
+ * Decodes a FindGroupChatsResponse message from the specified reader or buffer, length delimited.
57024
+ * @function decodeDelimited
57025
+ * @memberof google.chat.v1.FindGroupChatsResponse
57026
+ * @static
57027
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
57028
+ * @returns {google.chat.v1.FindGroupChatsResponse} FindGroupChatsResponse
57029
+ * @throws {Error} If the payload is not a reader or valid buffer
57030
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
57031
+ */
57032
+ FindGroupChatsResponse.decodeDelimited = function decodeDelimited(reader) {
57033
+ if (!(reader instanceof $Reader))
57034
+ reader = new $Reader(reader);
57035
+ return this.decode(reader, reader.uint32());
57036
+ };
57037
+
57038
+ /**
57039
+ * Verifies a FindGroupChatsResponse message.
57040
+ * @function verify
57041
+ * @memberof google.chat.v1.FindGroupChatsResponse
57042
+ * @static
57043
+ * @param {Object.<string,*>} message Plain object to verify
57044
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
57045
+ */
57046
+ FindGroupChatsResponse.verify = function verify(message) {
57047
+ if (typeof message !== "object" || message === null)
57048
+ return "object expected";
57049
+ if (message.spaces != null && message.hasOwnProperty("spaces")) {
57050
+ if (!Array.isArray(message.spaces))
57051
+ return "spaces: array expected";
57052
+ for (var i = 0; i < message.spaces.length; ++i) {
57053
+ var error = $root.google.chat.v1.Space.verify(message.spaces[i]);
57054
+ if (error)
57055
+ return "spaces." + error;
57056
+ }
57057
+ }
57058
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
57059
+ if (!$util.isString(message.nextPageToken))
57060
+ return "nextPageToken: string expected";
57061
+ return null;
57062
+ };
57063
+
57064
+ /**
57065
+ * Creates a FindGroupChatsResponse message from a plain object. Also converts values to their respective internal types.
57066
+ * @function fromObject
57067
+ * @memberof google.chat.v1.FindGroupChatsResponse
57068
+ * @static
57069
+ * @param {Object.<string,*>} object Plain object
57070
+ * @returns {google.chat.v1.FindGroupChatsResponse} FindGroupChatsResponse
57071
+ */
57072
+ FindGroupChatsResponse.fromObject = function fromObject(object) {
57073
+ if (object instanceof $root.google.chat.v1.FindGroupChatsResponse)
57074
+ return object;
57075
+ var message = new $root.google.chat.v1.FindGroupChatsResponse();
57076
+ if (object.spaces) {
57077
+ if (!Array.isArray(object.spaces))
57078
+ throw TypeError(".google.chat.v1.FindGroupChatsResponse.spaces: array expected");
57079
+ message.spaces = [];
57080
+ for (var i = 0; i < object.spaces.length; ++i) {
57081
+ if (typeof object.spaces[i] !== "object")
57082
+ throw TypeError(".google.chat.v1.FindGroupChatsResponse.spaces: object expected");
57083
+ message.spaces[i] = $root.google.chat.v1.Space.fromObject(object.spaces[i]);
57084
+ }
57085
+ }
57086
+ if (object.nextPageToken != null)
57087
+ message.nextPageToken = String(object.nextPageToken);
57088
+ return message;
57089
+ };
57090
+
57091
+ /**
57092
+ * Creates a plain object from a FindGroupChatsResponse message. Also converts values to other types if specified.
57093
+ * @function toObject
57094
+ * @memberof google.chat.v1.FindGroupChatsResponse
57095
+ * @static
57096
+ * @param {google.chat.v1.FindGroupChatsResponse} message FindGroupChatsResponse
57097
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
57098
+ * @returns {Object.<string,*>} Plain object
57099
+ */
57100
+ FindGroupChatsResponse.toObject = function toObject(message, options) {
57101
+ if (!options)
57102
+ options = {};
57103
+ var object = {};
57104
+ if (options.arrays || options.defaults)
57105
+ object.spaces = [];
57106
+ if (options.defaults)
57107
+ object.nextPageToken = "";
57108
+ if (message.spaces && message.spaces.length) {
57109
+ object.spaces = [];
57110
+ for (var j = 0; j < message.spaces.length; ++j)
57111
+ object.spaces[j] = $root.google.chat.v1.Space.toObject(message.spaces[j], options);
57112
+ }
57113
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
57114
+ object.nextPageToken = message.nextPageToken;
57115
+ return object;
57116
+ };
57117
+
57118
+ /**
57119
+ * Converts this FindGroupChatsResponse to JSON.
57120
+ * @function toJSON
57121
+ * @memberof google.chat.v1.FindGroupChatsResponse
57122
+ * @instance
57123
+ * @returns {Object.<string,*>} JSON object
57124
+ */
57125
+ FindGroupChatsResponse.prototype.toJSON = function toJSON() {
57126
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
57127
+ };
57128
+
57129
+ /**
57130
+ * Gets the default type url for FindGroupChatsResponse
57131
+ * @function getTypeUrl
57132
+ * @memberof google.chat.v1.FindGroupChatsResponse
57133
+ * @static
57134
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
57135
+ * @returns {string} The default type url
57136
+ */
57137
+ FindGroupChatsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
57138
+ if (typeUrlPrefix === undefined) {
57139
+ typeUrlPrefix = "type.googleapis.com";
57140
+ }
57141
+ return typeUrlPrefix + "/google.chat.v1.FindGroupChatsResponse";
57142
+ };
57143
+
57144
+ return FindGroupChatsResponse;
57145
+ })();
57146
+
57147
+ v1.UpdateSpaceRequest = (function() {
57148
+
57149
+ /**
57150
+ * Properties of an UpdateSpaceRequest.
57151
+ * @memberof google.chat.v1
57152
+ * @interface IUpdateSpaceRequest
57153
+ * @property {google.chat.v1.ISpace|null} [space] UpdateSpaceRequest space
57154
+ * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSpaceRequest updateMask
57155
+ * @property {boolean|null} [useAdminAccess] UpdateSpaceRequest useAdminAccess
57156
+ */
57157
+
57158
+ /**
57159
+ * Constructs a new UpdateSpaceRequest.
57160
+ * @memberof google.chat.v1
57161
+ * @classdesc Represents an UpdateSpaceRequest.
57162
+ * @implements IUpdateSpaceRequest
57163
+ * @constructor
57164
+ * @param {google.chat.v1.IUpdateSpaceRequest=} [properties] Properties to set
57165
+ */
57166
+ function UpdateSpaceRequest(properties) {
57167
+ if (properties)
57168
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
57169
+ if (properties[keys[i]] != null)
57170
+ this[keys[i]] = properties[keys[i]];
57171
+ }
57172
+
57173
+ /**
57174
+ * UpdateSpaceRequest space.
57175
+ * @member {google.chat.v1.ISpace|null|undefined} space
57176
+ * @memberof google.chat.v1.UpdateSpaceRequest
57177
+ * @instance
57178
+ */
57179
+ UpdateSpaceRequest.prototype.space = null;
57180
+
57181
+ /**
57182
+ * UpdateSpaceRequest updateMask.
57183
+ * @member {google.protobuf.IFieldMask|null|undefined} updateMask
57184
+ * @memberof google.chat.v1.UpdateSpaceRequest
57185
+ * @instance
57186
+ */
57187
+ UpdateSpaceRequest.prototype.updateMask = null;
57188
+
57189
+ /**
57190
+ * UpdateSpaceRequest useAdminAccess.
57191
+ * @member {boolean} useAdminAccess
57192
+ * @memberof google.chat.v1.UpdateSpaceRequest
57193
+ * @instance
57194
+ */
57195
+ UpdateSpaceRequest.prototype.useAdminAccess = false;
57196
+
57197
+ /**
57198
+ * Creates a new UpdateSpaceRequest instance using the specified properties.
57199
+ * @function create
57200
+ * @memberof google.chat.v1.UpdateSpaceRequest
57201
+ * @static
57202
+ * @param {google.chat.v1.IUpdateSpaceRequest=} [properties] Properties to set
57203
+ * @returns {google.chat.v1.UpdateSpaceRequest} UpdateSpaceRequest instance
57204
+ */
57205
+ UpdateSpaceRequest.create = function create(properties) {
57206
+ return new UpdateSpaceRequest(properties);
57207
+ };
57208
+
57209
+ /**
57210
+ * Encodes the specified UpdateSpaceRequest message. Does not implicitly {@link google.chat.v1.UpdateSpaceRequest.verify|verify} messages.
57211
+ * @function encode
57212
+ * @memberof google.chat.v1.UpdateSpaceRequest
57213
+ * @static
57214
+ * @param {google.chat.v1.IUpdateSpaceRequest} message UpdateSpaceRequest message or plain object to encode
57215
+ * @param {$protobuf.Writer} [writer] Writer to encode to
57216
+ * @returns {$protobuf.Writer} Writer
57217
+ */
57218
+ UpdateSpaceRequest.encode = function encode(message, writer) {
57219
+ if (!writer)
57220
+ writer = $Writer.create();
57221
+ if (message.space != null && Object.hasOwnProperty.call(message, "space"))
57222
+ $root.google.chat.v1.Space.encode(message.space, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
57223
+ if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask"))
57224
+ $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
57225
+ if (message.useAdminAccess != null && Object.hasOwnProperty.call(message, "useAdminAccess"))
57226
+ writer.uint32(/* id 3, wireType 0 =*/24).bool(message.useAdminAccess);
57227
+ return writer;
57228
+ };
57229
+
57230
+ /**
57231
+ * Encodes the specified UpdateSpaceRequest message, length delimited. Does not implicitly {@link google.chat.v1.UpdateSpaceRequest.verify|verify} messages.
57232
+ * @function encodeDelimited
57233
+ * @memberof google.chat.v1.UpdateSpaceRequest
57234
+ * @static
57235
+ * @param {google.chat.v1.IUpdateSpaceRequest} message UpdateSpaceRequest message or plain object to encode
57236
+ * @param {$protobuf.Writer} [writer] Writer to encode to
57237
+ * @returns {$protobuf.Writer} Writer
57238
+ */
57239
+ UpdateSpaceRequest.encodeDelimited = function encodeDelimited(message, writer) {
57240
+ return this.encode(message, writer).ldelim();
57241
+ };
57242
+
57243
+ /**
57244
+ * Decodes an UpdateSpaceRequest message from the specified reader or buffer.
57245
+ * @function decode
57246
+ * @memberof google.chat.v1.UpdateSpaceRequest
57247
+ * @static
57248
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
57249
+ * @param {number} [length] Message length if known beforehand
57250
+ * @returns {google.chat.v1.UpdateSpaceRequest} UpdateSpaceRequest
57251
+ * @throws {Error} If the payload is not a reader or valid buffer
57252
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
57253
+ */
57254
+ UpdateSpaceRequest.decode = function decode(reader, length, error) {
57255
+ if (!(reader instanceof $Reader))
57256
+ reader = $Reader.create(reader);
57257
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.UpdateSpaceRequest();
56363
57258
  while (reader.pos < end) {
56364
57259
  var tag = reader.uint32();
56365
57260
  if (tag === error)
@@ -57727,6 +58622,22 @@
57727
58622
  return CompleteImportSpaceResponse;
57728
58623
  })();
57729
58624
 
58625
+ /**
58626
+ * SpaceView enum.
58627
+ * @name google.chat.v1.SpaceView
58628
+ * @enum {number}
58629
+ * @property {number} SPACE_VIEW_UNSPECIFIED=0 SPACE_VIEW_UNSPECIFIED value
58630
+ * @property {number} SPACE_VIEW_RESOURCE_NAME_ONLY=3 SPACE_VIEW_RESOURCE_NAME_ONLY value
58631
+ * @property {number} SPACE_VIEW_EXPANDED=4 SPACE_VIEW_EXPANDED value
58632
+ */
58633
+ v1.SpaceView = (function() {
58634
+ var valuesById = {}, values = Object.create(valuesById);
58635
+ values[valuesById[0] = "SPACE_VIEW_UNSPECIFIED"] = 0;
58636
+ values[valuesById[3] = "SPACE_VIEW_RESOURCE_NAME_ONLY"] = 3;
58637
+ values[valuesById[4] = "SPACE_VIEW_EXPANDED"] = 4;
58638
+ return values;
58639
+ })();
58640
+
57730
58641
  /**
57731
58642
  * HistoryState enum.
57732
58643
  * @name google.chat.v1.HistoryState