@google-apps/chat 0.1.0 → 0.3.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.
- package/CHANGELOG.md +14 -0
- package/README.md +1 -0
- package/build/protos/google/apps/card/v1/card.proto +242 -160
- package/build/protos/google/chat/v1/action_status.proto +4 -4
- package/build/protos/google/chat/v1/annotation.proto +46 -4
- package/build/protos/google/chat/v1/attachment.proto +12 -3
- package/build/protos/google/chat/v1/chat_service.proto +95 -83
- package/build/protos/google/chat/v1/contextual_addon.proto +4 -4
- package/build/protos/google/chat/v1/deletion_metadata.proto +3 -3
- package/build/protos/google/chat/v1/group.proto +3 -3
- package/build/protos/google/chat/v1/history_state.proto +3 -3
- package/build/protos/google/chat/v1/matched_url.proto +3 -3
- package/build/protos/google/chat/v1/membership.proto +36 -14
- package/build/protos/google/chat/v1/message.proto +88 -57
- package/build/protos/google/chat/v1/reaction.proto +7 -5
- package/build/protos/google/chat/v1/slash_command.proto +6 -5
- package/build/protos/google/chat/v1/space.proto +31 -20
- package/build/protos/google/chat/v1/space_setup.proto +4 -3
- package/build/protos/google/chat/v1/user.proto +6 -5
- package/build/protos/google/chat/v1/widgets.proto +7 -7
- package/build/protos/protos.d.ts +724 -142
- package/build/protos/protos.js +2007 -576
- package/build/protos/protos.json +179 -47
- package/build/src/v1/chat_service_client.d.ts +174 -135
- package/build/src/v1/chat_service_client.js +58 -31
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/build/src/v1/chat_service_client_config.json +5 -0
- package/package.json +1 -1
package/build/protos/protos.js
CHANGED
|
@@ -14141,6 +14141,225 @@
|
|
|
14141
14141
|
return Duration;
|
|
14142
14142
|
})();
|
|
14143
14143
|
|
|
14144
|
+
protobuf.FieldMask = (function() {
|
|
14145
|
+
|
|
14146
|
+
/**
|
|
14147
|
+
* Properties of a FieldMask.
|
|
14148
|
+
* @memberof google.protobuf
|
|
14149
|
+
* @interface IFieldMask
|
|
14150
|
+
* @property {Array.<string>|null} [paths] FieldMask paths
|
|
14151
|
+
*/
|
|
14152
|
+
|
|
14153
|
+
/**
|
|
14154
|
+
* Constructs a new FieldMask.
|
|
14155
|
+
* @memberof google.protobuf
|
|
14156
|
+
* @classdesc Represents a FieldMask.
|
|
14157
|
+
* @implements IFieldMask
|
|
14158
|
+
* @constructor
|
|
14159
|
+
* @param {google.protobuf.IFieldMask=} [properties] Properties to set
|
|
14160
|
+
*/
|
|
14161
|
+
function FieldMask(properties) {
|
|
14162
|
+
this.paths = [];
|
|
14163
|
+
if (properties)
|
|
14164
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
14165
|
+
if (properties[keys[i]] != null)
|
|
14166
|
+
this[keys[i]] = properties[keys[i]];
|
|
14167
|
+
}
|
|
14168
|
+
|
|
14169
|
+
/**
|
|
14170
|
+
* FieldMask paths.
|
|
14171
|
+
* @member {Array.<string>} paths
|
|
14172
|
+
* @memberof google.protobuf.FieldMask
|
|
14173
|
+
* @instance
|
|
14174
|
+
*/
|
|
14175
|
+
FieldMask.prototype.paths = $util.emptyArray;
|
|
14176
|
+
|
|
14177
|
+
/**
|
|
14178
|
+
* Creates a new FieldMask instance using the specified properties.
|
|
14179
|
+
* @function create
|
|
14180
|
+
* @memberof google.protobuf.FieldMask
|
|
14181
|
+
* @static
|
|
14182
|
+
* @param {google.protobuf.IFieldMask=} [properties] Properties to set
|
|
14183
|
+
* @returns {google.protobuf.FieldMask} FieldMask instance
|
|
14184
|
+
*/
|
|
14185
|
+
FieldMask.create = function create(properties) {
|
|
14186
|
+
return new FieldMask(properties);
|
|
14187
|
+
};
|
|
14188
|
+
|
|
14189
|
+
/**
|
|
14190
|
+
* Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages.
|
|
14191
|
+
* @function encode
|
|
14192
|
+
* @memberof google.protobuf.FieldMask
|
|
14193
|
+
* @static
|
|
14194
|
+
* @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode
|
|
14195
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
14196
|
+
* @returns {$protobuf.Writer} Writer
|
|
14197
|
+
*/
|
|
14198
|
+
FieldMask.encode = function encode(message, writer) {
|
|
14199
|
+
if (!writer)
|
|
14200
|
+
writer = $Writer.create();
|
|
14201
|
+
if (message.paths != null && message.paths.length)
|
|
14202
|
+
for (var i = 0; i < message.paths.length; ++i)
|
|
14203
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]);
|
|
14204
|
+
return writer;
|
|
14205
|
+
};
|
|
14206
|
+
|
|
14207
|
+
/**
|
|
14208
|
+
* Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages.
|
|
14209
|
+
* @function encodeDelimited
|
|
14210
|
+
* @memberof google.protobuf.FieldMask
|
|
14211
|
+
* @static
|
|
14212
|
+
* @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode
|
|
14213
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
14214
|
+
* @returns {$protobuf.Writer} Writer
|
|
14215
|
+
*/
|
|
14216
|
+
FieldMask.encodeDelimited = function encodeDelimited(message, writer) {
|
|
14217
|
+
return this.encode(message, writer).ldelim();
|
|
14218
|
+
};
|
|
14219
|
+
|
|
14220
|
+
/**
|
|
14221
|
+
* Decodes a FieldMask message from the specified reader or buffer.
|
|
14222
|
+
* @function decode
|
|
14223
|
+
* @memberof google.protobuf.FieldMask
|
|
14224
|
+
* @static
|
|
14225
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
14226
|
+
* @param {number} [length] Message length if known beforehand
|
|
14227
|
+
* @returns {google.protobuf.FieldMask} FieldMask
|
|
14228
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
14229
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
14230
|
+
*/
|
|
14231
|
+
FieldMask.decode = function decode(reader, length) {
|
|
14232
|
+
if (!(reader instanceof $Reader))
|
|
14233
|
+
reader = $Reader.create(reader);
|
|
14234
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask();
|
|
14235
|
+
while (reader.pos < end) {
|
|
14236
|
+
var tag = reader.uint32();
|
|
14237
|
+
switch (tag >>> 3) {
|
|
14238
|
+
case 1: {
|
|
14239
|
+
if (!(message.paths && message.paths.length))
|
|
14240
|
+
message.paths = [];
|
|
14241
|
+
message.paths.push(reader.string());
|
|
14242
|
+
break;
|
|
14243
|
+
}
|
|
14244
|
+
default:
|
|
14245
|
+
reader.skipType(tag & 7);
|
|
14246
|
+
break;
|
|
14247
|
+
}
|
|
14248
|
+
}
|
|
14249
|
+
return message;
|
|
14250
|
+
};
|
|
14251
|
+
|
|
14252
|
+
/**
|
|
14253
|
+
* Decodes a FieldMask message from the specified reader or buffer, length delimited.
|
|
14254
|
+
* @function decodeDelimited
|
|
14255
|
+
* @memberof google.protobuf.FieldMask
|
|
14256
|
+
* @static
|
|
14257
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
14258
|
+
* @returns {google.protobuf.FieldMask} FieldMask
|
|
14259
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
14260
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
14261
|
+
*/
|
|
14262
|
+
FieldMask.decodeDelimited = function decodeDelimited(reader) {
|
|
14263
|
+
if (!(reader instanceof $Reader))
|
|
14264
|
+
reader = new $Reader(reader);
|
|
14265
|
+
return this.decode(reader, reader.uint32());
|
|
14266
|
+
};
|
|
14267
|
+
|
|
14268
|
+
/**
|
|
14269
|
+
* Verifies a FieldMask message.
|
|
14270
|
+
* @function verify
|
|
14271
|
+
* @memberof google.protobuf.FieldMask
|
|
14272
|
+
* @static
|
|
14273
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
14274
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
14275
|
+
*/
|
|
14276
|
+
FieldMask.verify = function verify(message) {
|
|
14277
|
+
if (typeof message !== "object" || message === null)
|
|
14278
|
+
return "object expected";
|
|
14279
|
+
if (message.paths != null && message.hasOwnProperty("paths")) {
|
|
14280
|
+
if (!Array.isArray(message.paths))
|
|
14281
|
+
return "paths: array expected";
|
|
14282
|
+
for (var i = 0; i < message.paths.length; ++i)
|
|
14283
|
+
if (!$util.isString(message.paths[i]))
|
|
14284
|
+
return "paths: string[] expected";
|
|
14285
|
+
}
|
|
14286
|
+
return null;
|
|
14287
|
+
};
|
|
14288
|
+
|
|
14289
|
+
/**
|
|
14290
|
+
* Creates a FieldMask message from a plain object. Also converts values to their respective internal types.
|
|
14291
|
+
* @function fromObject
|
|
14292
|
+
* @memberof google.protobuf.FieldMask
|
|
14293
|
+
* @static
|
|
14294
|
+
* @param {Object.<string,*>} object Plain object
|
|
14295
|
+
* @returns {google.protobuf.FieldMask} FieldMask
|
|
14296
|
+
*/
|
|
14297
|
+
FieldMask.fromObject = function fromObject(object) {
|
|
14298
|
+
if (object instanceof $root.google.protobuf.FieldMask)
|
|
14299
|
+
return object;
|
|
14300
|
+
var message = new $root.google.protobuf.FieldMask();
|
|
14301
|
+
if (object.paths) {
|
|
14302
|
+
if (!Array.isArray(object.paths))
|
|
14303
|
+
throw TypeError(".google.protobuf.FieldMask.paths: array expected");
|
|
14304
|
+
message.paths = [];
|
|
14305
|
+
for (var i = 0; i < object.paths.length; ++i)
|
|
14306
|
+
message.paths[i] = String(object.paths[i]);
|
|
14307
|
+
}
|
|
14308
|
+
return message;
|
|
14309
|
+
};
|
|
14310
|
+
|
|
14311
|
+
/**
|
|
14312
|
+
* Creates a plain object from a FieldMask message. Also converts values to other types if specified.
|
|
14313
|
+
* @function toObject
|
|
14314
|
+
* @memberof google.protobuf.FieldMask
|
|
14315
|
+
* @static
|
|
14316
|
+
* @param {google.protobuf.FieldMask} message FieldMask
|
|
14317
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
14318
|
+
* @returns {Object.<string,*>} Plain object
|
|
14319
|
+
*/
|
|
14320
|
+
FieldMask.toObject = function toObject(message, options) {
|
|
14321
|
+
if (!options)
|
|
14322
|
+
options = {};
|
|
14323
|
+
var object = {};
|
|
14324
|
+
if (options.arrays || options.defaults)
|
|
14325
|
+
object.paths = [];
|
|
14326
|
+
if (message.paths && message.paths.length) {
|
|
14327
|
+
object.paths = [];
|
|
14328
|
+
for (var j = 0; j < message.paths.length; ++j)
|
|
14329
|
+
object.paths[j] = message.paths[j];
|
|
14330
|
+
}
|
|
14331
|
+
return object;
|
|
14332
|
+
};
|
|
14333
|
+
|
|
14334
|
+
/**
|
|
14335
|
+
* Converts this FieldMask to JSON.
|
|
14336
|
+
* @function toJSON
|
|
14337
|
+
* @memberof google.protobuf.FieldMask
|
|
14338
|
+
* @instance
|
|
14339
|
+
* @returns {Object.<string,*>} JSON object
|
|
14340
|
+
*/
|
|
14341
|
+
FieldMask.prototype.toJSON = function toJSON() {
|
|
14342
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
14343
|
+
};
|
|
14344
|
+
|
|
14345
|
+
/**
|
|
14346
|
+
* Gets the default type url for FieldMask
|
|
14347
|
+
* @function getTypeUrl
|
|
14348
|
+
* @memberof google.protobuf.FieldMask
|
|
14349
|
+
* @static
|
|
14350
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
14351
|
+
* @returns {string} The default type url
|
|
14352
|
+
*/
|
|
14353
|
+
FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
14354
|
+
if (typeUrlPrefix === undefined) {
|
|
14355
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
14356
|
+
}
|
|
14357
|
+
return typeUrlPrefix + "/google.protobuf.FieldMask";
|
|
14358
|
+
};
|
|
14359
|
+
|
|
14360
|
+
return FieldMask;
|
|
14361
|
+
})();
|
|
14362
|
+
|
|
14144
14363
|
protobuf.Timestamp = (function() {
|
|
14145
14364
|
|
|
14146
14365
|
/**
|
|
@@ -14382,25 +14601,23 @@
|
|
|
14382
14601
|
return Timestamp;
|
|
14383
14602
|
})();
|
|
14384
14603
|
|
|
14385
|
-
protobuf.
|
|
14604
|
+
protobuf.Empty = (function() {
|
|
14386
14605
|
|
|
14387
14606
|
/**
|
|
14388
|
-
* Properties of
|
|
14607
|
+
* Properties of an Empty.
|
|
14389
14608
|
* @memberof google.protobuf
|
|
14390
|
-
* @interface
|
|
14391
|
-
* @property {Array.<string>|null} [paths] FieldMask paths
|
|
14609
|
+
* @interface IEmpty
|
|
14392
14610
|
*/
|
|
14393
14611
|
|
|
14394
14612
|
/**
|
|
14395
|
-
* Constructs a new
|
|
14613
|
+
* Constructs a new Empty.
|
|
14396
14614
|
* @memberof google.protobuf
|
|
14397
|
-
* @classdesc Represents
|
|
14398
|
-
* @implements
|
|
14615
|
+
* @classdesc Represents an Empty.
|
|
14616
|
+
* @implements IEmpty
|
|
14399
14617
|
* @constructor
|
|
14400
|
-
* @param {google.protobuf.
|
|
14618
|
+
* @param {google.protobuf.IEmpty=} [properties] Properties to set
|
|
14401
14619
|
*/
|
|
14402
|
-
function
|
|
14403
|
-
this.paths = [];
|
|
14620
|
+
function Empty(properties) {
|
|
14404
14621
|
if (properties)
|
|
14405
14622
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
14406
14623
|
if (properties[keys[i]] != null)
|
|
@@ -14408,229 +14625,12 @@
|
|
|
14408
14625
|
}
|
|
14409
14626
|
|
|
14410
14627
|
/**
|
|
14411
|
-
*
|
|
14412
|
-
* @member {Array.<string>} paths
|
|
14413
|
-
* @memberof google.protobuf.FieldMask
|
|
14414
|
-
* @instance
|
|
14415
|
-
*/
|
|
14416
|
-
FieldMask.prototype.paths = $util.emptyArray;
|
|
14417
|
-
|
|
14418
|
-
/**
|
|
14419
|
-
* Creates a new FieldMask instance using the specified properties.
|
|
14628
|
+
* Creates a new Empty instance using the specified properties.
|
|
14420
14629
|
* @function create
|
|
14421
|
-
* @memberof google.protobuf.
|
|
14630
|
+
* @memberof google.protobuf.Empty
|
|
14422
14631
|
* @static
|
|
14423
|
-
* @param {google.protobuf.
|
|
14424
|
-
* @returns {google.protobuf.
|
|
14425
|
-
*/
|
|
14426
|
-
FieldMask.create = function create(properties) {
|
|
14427
|
-
return new FieldMask(properties);
|
|
14428
|
-
};
|
|
14429
|
-
|
|
14430
|
-
/**
|
|
14431
|
-
* Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages.
|
|
14432
|
-
* @function encode
|
|
14433
|
-
* @memberof google.protobuf.FieldMask
|
|
14434
|
-
* @static
|
|
14435
|
-
* @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode
|
|
14436
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
14437
|
-
* @returns {$protobuf.Writer} Writer
|
|
14438
|
-
*/
|
|
14439
|
-
FieldMask.encode = function encode(message, writer) {
|
|
14440
|
-
if (!writer)
|
|
14441
|
-
writer = $Writer.create();
|
|
14442
|
-
if (message.paths != null && message.paths.length)
|
|
14443
|
-
for (var i = 0; i < message.paths.length; ++i)
|
|
14444
|
-
writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]);
|
|
14445
|
-
return writer;
|
|
14446
|
-
};
|
|
14447
|
-
|
|
14448
|
-
/**
|
|
14449
|
-
* Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages.
|
|
14450
|
-
* @function encodeDelimited
|
|
14451
|
-
* @memberof google.protobuf.FieldMask
|
|
14452
|
-
* @static
|
|
14453
|
-
* @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode
|
|
14454
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
14455
|
-
* @returns {$protobuf.Writer} Writer
|
|
14456
|
-
*/
|
|
14457
|
-
FieldMask.encodeDelimited = function encodeDelimited(message, writer) {
|
|
14458
|
-
return this.encode(message, writer).ldelim();
|
|
14459
|
-
};
|
|
14460
|
-
|
|
14461
|
-
/**
|
|
14462
|
-
* Decodes a FieldMask message from the specified reader or buffer.
|
|
14463
|
-
* @function decode
|
|
14464
|
-
* @memberof google.protobuf.FieldMask
|
|
14465
|
-
* @static
|
|
14466
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
14467
|
-
* @param {number} [length] Message length if known beforehand
|
|
14468
|
-
* @returns {google.protobuf.FieldMask} FieldMask
|
|
14469
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
14470
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
14471
|
-
*/
|
|
14472
|
-
FieldMask.decode = function decode(reader, length) {
|
|
14473
|
-
if (!(reader instanceof $Reader))
|
|
14474
|
-
reader = $Reader.create(reader);
|
|
14475
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask();
|
|
14476
|
-
while (reader.pos < end) {
|
|
14477
|
-
var tag = reader.uint32();
|
|
14478
|
-
switch (tag >>> 3) {
|
|
14479
|
-
case 1: {
|
|
14480
|
-
if (!(message.paths && message.paths.length))
|
|
14481
|
-
message.paths = [];
|
|
14482
|
-
message.paths.push(reader.string());
|
|
14483
|
-
break;
|
|
14484
|
-
}
|
|
14485
|
-
default:
|
|
14486
|
-
reader.skipType(tag & 7);
|
|
14487
|
-
break;
|
|
14488
|
-
}
|
|
14489
|
-
}
|
|
14490
|
-
return message;
|
|
14491
|
-
};
|
|
14492
|
-
|
|
14493
|
-
/**
|
|
14494
|
-
* Decodes a FieldMask message from the specified reader or buffer, length delimited.
|
|
14495
|
-
* @function decodeDelimited
|
|
14496
|
-
* @memberof google.protobuf.FieldMask
|
|
14497
|
-
* @static
|
|
14498
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
14499
|
-
* @returns {google.protobuf.FieldMask} FieldMask
|
|
14500
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
14501
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
14502
|
-
*/
|
|
14503
|
-
FieldMask.decodeDelimited = function decodeDelimited(reader) {
|
|
14504
|
-
if (!(reader instanceof $Reader))
|
|
14505
|
-
reader = new $Reader(reader);
|
|
14506
|
-
return this.decode(reader, reader.uint32());
|
|
14507
|
-
};
|
|
14508
|
-
|
|
14509
|
-
/**
|
|
14510
|
-
* Verifies a FieldMask message.
|
|
14511
|
-
* @function verify
|
|
14512
|
-
* @memberof google.protobuf.FieldMask
|
|
14513
|
-
* @static
|
|
14514
|
-
* @param {Object.<string,*>} message Plain object to verify
|
|
14515
|
-
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
14516
|
-
*/
|
|
14517
|
-
FieldMask.verify = function verify(message) {
|
|
14518
|
-
if (typeof message !== "object" || message === null)
|
|
14519
|
-
return "object expected";
|
|
14520
|
-
if (message.paths != null && message.hasOwnProperty("paths")) {
|
|
14521
|
-
if (!Array.isArray(message.paths))
|
|
14522
|
-
return "paths: array expected";
|
|
14523
|
-
for (var i = 0; i < message.paths.length; ++i)
|
|
14524
|
-
if (!$util.isString(message.paths[i]))
|
|
14525
|
-
return "paths: string[] expected";
|
|
14526
|
-
}
|
|
14527
|
-
return null;
|
|
14528
|
-
};
|
|
14529
|
-
|
|
14530
|
-
/**
|
|
14531
|
-
* Creates a FieldMask message from a plain object. Also converts values to their respective internal types.
|
|
14532
|
-
* @function fromObject
|
|
14533
|
-
* @memberof google.protobuf.FieldMask
|
|
14534
|
-
* @static
|
|
14535
|
-
* @param {Object.<string,*>} object Plain object
|
|
14536
|
-
* @returns {google.protobuf.FieldMask} FieldMask
|
|
14537
|
-
*/
|
|
14538
|
-
FieldMask.fromObject = function fromObject(object) {
|
|
14539
|
-
if (object instanceof $root.google.protobuf.FieldMask)
|
|
14540
|
-
return object;
|
|
14541
|
-
var message = new $root.google.protobuf.FieldMask();
|
|
14542
|
-
if (object.paths) {
|
|
14543
|
-
if (!Array.isArray(object.paths))
|
|
14544
|
-
throw TypeError(".google.protobuf.FieldMask.paths: array expected");
|
|
14545
|
-
message.paths = [];
|
|
14546
|
-
for (var i = 0; i < object.paths.length; ++i)
|
|
14547
|
-
message.paths[i] = String(object.paths[i]);
|
|
14548
|
-
}
|
|
14549
|
-
return message;
|
|
14550
|
-
};
|
|
14551
|
-
|
|
14552
|
-
/**
|
|
14553
|
-
* Creates a plain object from a FieldMask message. Also converts values to other types if specified.
|
|
14554
|
-
* @function toObject
|
|
14555
|
-
* @memberof google.protobuf.FieldMask
|
|
14556
|
-
* @static
|
|
14557
|
-
* @param {google.protobuf.FieldMask} message FieldMask
|
|
14558
|
-
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
14559
|
-
* @returns {Object.<string,*>} Plain object
|
|
14560
|
-
*/
|
|
14561
|
-
FieldMask.toObject = function toObject(message, options) {
|
|
14562
|
-
if (!options)
|
|
14563
|
-
options = {};
|
|
14564
|
-
var object = {};
|
|
14565
|
-
if (options.arrays || options.defaults)
|
|
14566
|
-
object.paths = [];
|
|
14567
|
-
if (message.paths && message.paths.length) {
|
|
14568
|
-
object.paths = [];
|
|
14569
|
-
for (var j = 0; j < message.paths.length; ++j)
|
|
14570
|
-
object.paths[j] = message.paths[j];
|
|
14571
|
-
}
|
|
14572
|
-
return object;
|
|
14573
|
-
};
|
|
14574
|
-
|
|
14575
|
-
/**
|
|
14576
|
-
* Converts this FieldMask to JSON.
|
|
14577
|
-
* @function toJSON
|
|
14578
|
-
* @memberof google.protobuf.FieldMask
|
|
14579
|
-
* @instance
|
|
14580
|
-
* @returns {Object.<string,*>} JSON object
|
|
14581
|
-
*/
|
|
14582
|
-
FieldMask.prototype.toJSON = function toJSON() {
|
|
14583
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
14584
|
-
};
|
|
14585
|
-
|
|
14586
|
-
/**
|
|
14587
|
-
* Gets the default type url for FieldMask
|
|
14588
|
-
* @function getTypeUrl
|
|
14589
|
-
* @memberof google.protobuf.FieldMask
|
|
14590
|
-
* @static
|
|
14591
|
-
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
14592
|
-
* @returns {string} The default type url
|
|
14593
|
-
*/
|
|
14594
|
-
FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
14595
|
-
if (typeUrlPrefix === undefined) {
|
|
14596
|
-
typeUrlPrefix = "type.googleapis.com";
|
|
14597
|
-
}
|
|
14598
|
-
return typeUrlPrefix + "/google.protobuf.FieldMask";
|
|
14599
|
-
};
|
|
14600
|
-
|
|
14601
|
-
return FieldMask;
|
|
14602
|
-
})();
|
|
14603
|
-
|
|
14604
|
-
protobuf.Empty = (function() {
|
|
14605
|
-
|
|
14606
|
-
/**
|
|
14607
|
-
* Properties of an Empty.
|
|
14608
|
-
* @memberof google.protobuf
|
|
14609
|
-
* @interface IEmpty
|
|
14610
|
-
*/
|
|
14611
|
-
|
|
14612
|
-
/**
|
|
14613
|
-
* Constructs a new Empty.
|
|
14614
|
-
* @memberof google.protobuf
|
|
14615
|
-
* @classdesc Represents an Empty.
|
|
14616
|
-
* @implements IEmpty
|
|
14617
|
-
* @constructor
|
|
14618
|
-
* @param {google.protobuf.IEmpty=} [properties] Properties to set
|
|
14619
|
-
*/
|
|
14620
|
-
function Empty(properties) {
|
|
14621
|
-
if (properties)
|
|
14622
|
-
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
14623
|
-
if (properties[keys[i]] != null)
|
|
14624
|
-
this[keys[i]] = properties[keys[i]];
|
|
14625
|
-
}
|
|
14626
|
-
|
|
14627
|
-
/**
|
|
14628
|
-
* Creates a new Empty instance using the specified properties.
|
|
14629
|
-
* @function create
|
|
14630
|
-
* @memberof google.protobuf.Empty
|
|
14631
|
-
* @static
|
|
14632
|
-
* @param {google.protobuf.IEmpty=} [properties] Properties to set
|
|
14633
|
-
* @returns {google.protobuf.Empty} Empty instance
|
|
14632
|
+
* @param {google.protobuf.IEmpty=} [properties] Properties to set
|
|
14633
|
+
* @returns {google.protobuf.Empty} Empty instance
|
|
14634
14634
|
*/
|
|
14635
14635
|
Empty.create = function create(properties) {
|
|
14636
14636
|
return new Empty(properties);
|
|
@@ -21346,6 +21346,7 @@
|
|
|
21346
21346
|
* @interface IIcon
|
|
21347
21347
|
* @property {string|null} [knownIcon] Icon knownIcon
|
|
21348
21348
|
* @property {string|null} [iconUrl] Icon iconUrl
|
|
21349
|
+
* @property {google.apps.card.v1.IMaterialIcon|null} [materialIcon] Icon materialIcon
|
|
21349
21350
|
* @property {string|null} [altText] Icon altText
|
|
21350
21351
|
* @property {google.apps.card.v1.Widget.ImageType|null} [imageType] Icon imageType
|
|
21351
21352
|
*/
|
|
@@ -21381,6 +21382,14 @@
|
|
|
21381
21382
|
*/
|
|
21382
21383
|
Icon.prototype.iconUrl = null;
|
|
21383
21384
|
|
|
21385
|
+
/**
|
|
21386
|
+
* Icon materialIcon.
|
|
21387
|
+
* @member {google.apps.card.v1.IMaterialIcon|null|undefined} materialIcon
|
|
21388
|
+
* @memberof google.apps.card.v1.Icon
|
|
21389
|
+
* @instance
|
|
21390
|
+
*/
|
|
21391
|
+
Icon.prototype.materialIcon = null;
|
|
21392
|
+
|
|
21384
21393
|
/**
|
|
21385
21394
|
* Icon altText.
|
|
21386
21395
|
* @member {string} altText
|
|
@@ -21402,12 +21411,12 @@
|
|
|
21402
21411
|
|
|
21403
21412
|
/**
|
|
21404
21413
|
* Icon icons.
|
|
21405
|
-
* @member {"knownIcon"|"iconUrl"|undefined} icons
|
|
21414
|
+
* @member {"knownIcon"|"iconUrl"|"materialIcon"|undefined} icons
|
|
21406
21415
|
* @memberof google.apps.card.v1.Icon
|
|
21407
21416
|
* @instance
|
|
21408
21417
|
*/
|
|
21409
21418
|
Object.defineProperty(Icon.prototype, "icons", {
|
|
21410
|
-
get: $util.oneOfGetter($oneOfFields = ["knownIcon", "iconUrl"]),
|
|
21419
|
+
get: $util.oneOfGetter($oneOfFields = ["knownIcon", "iconUrl", "materialIcon"]),
|
|
21411
21420
|
set: $util.oneOfSetter($oneOfFields)
|
|
21412
21421
|
});
|
|
21413
21422
|
|
|
@@ -21443,6 +21452,8 @@
|
|
|
21443
21452
|
writer.uint32(/* id 3, wireType 2 =*/26).string(message.altText);
|
|
21444
21453
|
if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType"))
|
|
21445
21454
|
writer.uint32(/* id 4, wireType 0 =*/32).int32(message.imageType);
|
|
21455
|
+
if (message.materialIcon != null && Object.hasOwnProperty.call(message, "materialIcon"))
|
|
21456
|
+
$root.google.apps.card.v1.MaterialIcon.encode(message.materialIcon, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
21446
21457
|
return writer;
|
|
21447
21458
|
};
|
|
21448
21459
|
|
|
@@ -21485,6 +21496,10 @@
|
|
|
21485
21496
|
message.iconUrl = reader.string();
|
|
21486
21497
|
break;
|
|
21487
21498
|
}
|
|
21499
|
+
case 5: {
|
|
21500
|
+
message.materialIcon = $root.google.apps.card.v1.MaterialIcon.decode(reader, reader.uint32());
|
|
21501
|
+
break;
|
|
21502
|
+
}
|
|
21488
21503
|
case 3: {
|
|
21489
21504
|
message.altText = reader.string();
|
|
21490
21505
|
break;
|
|
@@ -21541,6 +21556,16 @@
|
|
|
21541
21556
|
if (!$util.isString(message.iconUrl))
|
|
21542
21557
|
return "iconUrl: string expected";
|
|
21543
21558
|
}
|
|
21559
|
+
if (message.materialIcon != null && message.hasOwnProperty("materialIcon")) {
|
|
21560
|
+
if (properties.icons === 1)
|
|
21561
|
+
return "icons: multiple values";
|
|
21562
|
+
properties.icons = 1;
|
|
21563
|
+
{
|
|
21564
|
+
var error = $root.google.apps.card.v1.MaterialIcon.verify(message.materialIcon);
|
|
21565
|
+
if (error)
|
|
21566
|
+
return "materialIcon." + error;
|
|
21567
|
+
}
|
|
21568
|
+
}
|
|
21544
21569
|
if (message.altText != null && message.hasOwnProperty("altText"))
|
|
21545
21570
|
if (!$util.isString(message.altText))
|
|
21546
21571
|
return "altText: string expected";
|
|
@@ -21571,6 +21596,11 @@
|
|
|
21571
21596
|
message.knownIcon = String(object.knownIcon);
|
|
21572
21597
|
if (object.iconUrl != null)
|
|
21573
21598
|
message.iconUrl = String(object.iconUrl);
|
|
21599
|
+
if (object.materialIcon != null) {
|
|
21600
|
+
if (typeof object.materialIcon !== "object")
|
|
21601
|
+
throw TypeError(".google.apps.card.v1.Icon.materialIcon: object expected");
|
|
21602
|
+
message.materialIcon = $root.google.apps.card.v1.MaterialIcon.fromObject(object.materialIcon);
|
|
21603
|
+
}
|
|
21574
21604
|
if (object.altText != null)
|
|
21575
21605
|
message.altText = String(object.altText);
|
|
21576
21606
|
switch (object.imageType) {
|
|
@@ -21623,6 +21653,11 @@
|
|
|
21623
21653
|
object.altText = message.altText;
|
|
21624
21654
|
if (message.imageType != null && message.hasOwnProperty("imageType"))
|
|
21625
21655
|
object.imageType = options.enums === String ? $root.google.apps.card.v1.Widget.ImageType[message.imageType] === undefined ? message.imageType : $root.google.apps.card.v1.Widget.ImageType[message.imageType] : message.imageType;
|
|
21656
|
+
if (message.materialIcon != null && message.hasOwnProperty("materialIcon")) {
|
|
21657
|
+
object.materialIcon = $root.google.apps.card.v1.MaterialIcon.toObject(message.materialIcon, options);
|
|
21658
|
+
if (options.oneofs)
|
|
21659
|
+
object.icons = "materialIcon";
|
|
21660
|
+
}
|
|
21626
21661
|
return object;
|
|
21627
21662
|
};
|
|
21628
21663
|
|
|
@@ -21655,25 +21690,27 @@
|
|
|
21655
21690
|
return Icon;
|
|
21656
21691
|
})();
|
|
21657
21692
|
|
|
21658
|
-
v1.
|
|
21693
|
+
v1.MaterialIcon = (function() {
|
|
21659
21694
|
|
|
21660
21695
|
/**
|
|
21661
|
-
* Properties of
|
|
21696
|
+
* Properties of a MaterialIcon.
|
|
21662
21697
|
* @memberof google.apps.card.v1
|
|
21663
|
-
* @interface
|
|
21664
|
-
* @property {
|
|
21665
|
-
* @property {
|
|
21698
|
+
* @interface IMaterialIcon
|
|
21699
|
+
* @property {string|null} [name] MaterialIcon name
|
|
21700
|
+
* @property {boolean|null} [fill] MaterialIcon fill
|
|
21701
|
+
* @property {number|null} [weight] MaterialIcon weight
|
|
21702
|
+
* @property {number|null} [grade] MaterialIcon grade
|
|
21666
21703
|
*/
|
|
21667
21704
|
|
|
21668
21705
|
/**
|
|
21669
|
-
* Constructs a new
|
|
21706
|
+
* Constructs a new MaterialIcon.
|
|
21670
21707
|
* @memberof google.apps.card.v1
|
|
21671
|
-
* @classdesc Represents
|
|
21672
|
-
* @implements
|
|
21708
|
+
* @classdesc Represents a MaterialIcon.
|
|
21709
|
+
* @implements IMaterialIcon
|
|
21673
21710
|
* @constructor
|
|
21674
|
-
* @param {google.apps.card.v1.
|
|
21711
|
+
* @param {google.apps.card.v1.IMaterialIcon=} [properties] Properties to set
|
|
21675
21712
|
*/
|
|
21676
|
-
function
|
|
21713
|
+
function MaterialIcon(properties) {
|
|
21677
21714
|
if (properties)
|
|
21678
21715
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
21679
21716
|
if (properties[keys[i]] != null)
|
|
@@ -21681,37 +21718,308 @@
|
|
|
21681
21718
|
}
|
|
21682
21719
|
|
|
21683
21720
|
/**
|
|
21684
|
-
*
|
|
21685
|
-
* @member {
|
|
21686
|
-
* @memberof google.apps.card.v1.
|
|
21721
|
+
* MaterialIcon name.
|
|
21722
|
+
* @member {string} name
|
|
21723
|
+
* @memberof google.apps.card.v1.MaterialIcon
|
|
21687
21724
|
* @instance
|
|
21688
21725
|
*/
|
|
21689
|
-
|
|
21726
|
+
MaterialIcon.prototype.name = "";
|
|
21690
21727
|
|
|
21691
21728
|
/**
|
|
21692
|
-
*
|
|
21693
|
-
* @member {
|
|
21694
|
-
* @memberof google.apps.card.v1.
|
|
21729
|
+
* MaterialIcon fill.
|
|
21730
|
+
* @member {boolean} fill
|
|
21731
|
+
* @memberof google.apps.card.v1.MaterialIcon
|
|
21695
21732
|
* @instance
|
|
21696
21733
|
*/
|
|
21697
|
-
|
|
21734
|
+
MaterialIcon.prototype.fill = false;
|
|
21698
21735
|
|
|
21699
21736
|
/**
|
|
21700
|
-
*
|
|
21701
|
-
* @
|
|
21702
|
-
* @memberof google.apps.card.v1.
|
|
21703
|
-
* @
|
|
21704
|
-
* @param {google.apps.card.v1.IImageCropStyle=} [properties] Properties to set
|
|
21705
|
-
* @returns {google.apps.card.v1.ImageCropStyle} ImageCropStyle instance
|
|
21737
|
+
* MaterialIcon weight.
|
|
21738
|
+
* @member {number} weight
|
|
21739
|
+
* @memberof google.apps.card.v1.MaterialIcon
|
|
21740
|
+
* @instance
|
|
21706
21741
|
*/
|
|
21707
|
-
|
|
21708
|
-
return new ImageCropStyle(properties);
|
|
21709
|
-
};
|
|
21742
|
+
MaterialIcon.prototype.weight = 0;
|
|
21710
21743
|
|
|
21711
21744
|
/**
|
|
21712
|
-
*
|
|
21713
|
-
* @
|
|
21714
|
-
* @memberof google.apps.card.v1.
|
|
21745
|
+
* MaterialIcon grade.
|
|
21746
|
+
* @member {number} grade
|
|
21747
|
+
* @memberof google.apps.card.v1.MaterialIcon
|
|
21748
|
+
* @instance
|
|
21749
|
+
*/
|
|
21750
|
+
MaterialIcon.prototype.grade = 0;
|
|
21751
|
+
|
|
21752
|
+
/**
|
|
21753
|
+
* Creates a new MaterialIcon instance using the specified properties.
|
|
21754
|
+
* @function create
|
|
21755
|
+
* @memberof google.apps.card.v1.MaterialIcon
|
|
21756
|
+
* @static
|
|
21757
|
+
* @param {google.apps.card.v1.IMaterialIcon=} [properties] Properties to set
|
|
21758
|
+
* @returns {google.apps.card.v1.MaterialIcon} MaterialIcon instance
|
|
21759
|
+
*/
|
|
21760
|
+
MaterialIcon.create = function create(properties) {
|
|
21761
|
+
return new MaterialIcon(properties);
|
|
21762
|
+
};
|
|
21763
|
+
|
|
21764
|
+
/**
|
|
21765
|
+
* Encodes the specified MaterialIcon message. Does not implicitly {@link google.apps.card.v1.MaterialIcon.verify|verify} messages.
|
|
21766
|
+
* @function encode
|
|
21767
|
+
* @memberof google.apps.card.v1.MaterialIcon
|
|
21768
|
+
* @static
|
|
21769
|
+
* @param {google.apps.card.v1.IMaterialIcon} message MaterialIcon message or plain object to encode
|
|
21770
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
21771
|
+
* @returns {$protobuf.Writer} Writer
|
|
21772
|
+
*/
|
|
21773
|
+
MaterialIcon.encode = function encode(message, writer) {
|
|
21774
|
+
if (!writer)
|
|
21775
|
+
writer = $Writer.create();
|
|
21776
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
21777
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
21778
|
+
if (message.fill != null && Object.hasOwnProperty.call(message, "fill"))
|
|
21779
|
+
writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fill);
|
|
21780
|
+
if (message.weight != null && Object.hasOwnProperty.call(message, "weight"))
|
|
21781
|
+
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.weight);
|
|
21782
|
+
if (message.grade != null && Object.hasOwnProperty.call(message, "grade"))
|
|
21783
|
+
writer.uint32(/* id 4, wireType 0 =*/32).int32(message.grade);
|
|
21784
|
+
return writer;
|
|
21785
|
+
};
|
|
21786
|
+
|
|
21787
|
+
/**
|
|
21788
|
+
* Encodes the specified MaterialIcon message, length delimited. Does not implicitly {@link google.apps.card.v1.MaterialIcon.verify|verify} messages.
|
|
21789
|
+
* @function encodeDelimited
|
|
21790
|
+
* @memberof google.apps.card.v1.MaterialIcon
|
|
21791
|
+
* @static
|
|
21792
|
+
* @param {google.apps.card.v1.IMaterialIcon} message MaterialIcon message or plain object to encode
|
|
21793
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
21794
|
+
* @returns {$protobuf.Writer} Writer
|
|
21795
|
+
*/
|
|
21796
|
+
MaterialIcon.encodeDelimited = function encodeDelimited(message, writer) {
|
|
21797
|
+
return this.encode(message, writer).ldelim();
|
|
21798
|
+
};
|
|
21799
|
+
|
|
21800
|
+
/**
|
|
21801
|
+
* Decodes a MaterialIcon message from the specified reader or buffer.
|
|
21802
|
+
* @function decode
|
|
21803
|
+
* @memberof google.apps.card.v1.MaterialIcon
|
|
21804
|
+
* @static
|
|
21805
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
21806
|
+
* @param {number} [length] Message length if known beforehand
|
|
21807
|
+
* @returns {google.apps.card.v1.MaterialIcon} MaterialIcon
|
|
21808
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
21809
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
21810
|
+
*/
|
|
21811
|
+
MaterialIcon.decode = function decode(reader, length) {
|
|
21812
|
+
if (!(reader instanceof $Reader))
|
|
21813
|
+
reader = $Reader.create(reader);
|
|
21814
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.apps.card.v1.MaterialIcon();
|
|
21815
|
+
while (reader.pos < end) {
|
|
21816
|
+
var tag = reader.uint32();
|
|
21817
|
+
switch (tag >>> 3) {
|
|
21818
|
+
case 1: {
|
|
21819
|
+
message.name = reader.string();
|
|
21820
|
+
break;
|
|
21821
|
+
}
|
|
21822
|
+
case 2: {
|
|
21823
|
+
message.fill = reader.bool();
|
|
21824
|
+
break;
|
|
21825
|
+
}
|
|
21826
|
+
case 3: {
|
|
21827
|
+
message.weight = reader.int32();
|
|
21828
|
+
break;
|
|
21829
|
+
}
|
|
21830
|
+
case 4: {
|
|
21831
|
+
message.grade = reader.int32();
|
|
21832
|
+
break;
|
|
21833
|
+
}
|
|
21834
|
+
default:
|
|
21835
|
+
reader.skipType(tag & 7);
|
|
21836
|
+
break;
|
|
21837
|
+
}
|
|
21838
|
+
}
|
|
21839
|
+
return message;
|
|
21840
|
+
};
|
|
21841
|
+
|
|
21842
|
+
/**
|
|
21843
|
+
* Decodes a MaterialIcon message from the specified reader or buffer, length delimited.
|
|
21844
|
+
* @function decodeDelimited
|
|
21845
|
+
* @memberof google.apps.card.v1.MaterialIcon
|
|
21846
|
+
* @static
|
|
21847
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
21848
|
+
* @returns {google.apps.card.v1.MaterialIcon} MaterialIcon
|
|
21849
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
21850
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
21851
|
+
*/
|
|
21852
|
+
MaterialIcon.decodeDelimited = function decodeDelimited(reader) {
|
|
21853
|
+
if (!(reader instanceof $Reader))
|
|
21854
|
+
reader = new $Reader(reader);
|
|
21855
|
+
return this.decode(reader, reader.uint32());
|
|
21856
|
+
};
|
|
21857
|
+
|
|
21858
|
+
/**
|
|
21859
|
+
* Verifies a MaterialIcon message.
|
|
21860
|
+
* @function verify
|
|
21861
|
+
* @memberof google.apps.card.v1.MaterialIcon
|
|
21862
|
+
* @static
|
|
21863
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
21864
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
21865
|
+
*/
|
|
21866
|
+
MaterialIcon.verify = function verify(message) {
|
|
21867
|
+
if (typeof message !== "object" || message === null)
|
|
21868
|
+
return "object expected";
|
|
21869
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
21870
|
+
if (!$util.isString(message.name))
|
|
21871
|
+
return "name: string expected";
|
|
21872
|
+
if (message.fill != null && message.hasOwnProperty("fill"))
|
|
21873
|
+
if (typeof message.fill !== "boolean")
|
|
21874
|
+
return "fill: boolean expected";
|
|
21875
|
+
if (message.weight != null && message.hasOwnProperty("weight"))
|
|
21876
|
+
if (!$util.isInteger(message.weight))
|
|
21877
|
+
return "weight: integer expected";
|
|
21878
|
+
if (message.grade != null && message.hasOwnProperty("grade"))
|
|
21879
|
+
if (!$util.isInteger(message.grade))
|
|
21880
|
+
return "grade: integer expected";
|
|
21881
|
+
return null;
|
|
21882
|
+
};
|
|
21883
|
+
|
|
21884
|
+
/**
|
|
21885
|
+
* Creates a MaterialIcon message from a plain object. Also converts values to their respective internal types.
|
|
21886
|
+
* @function fromObject
|
|
21887
|
+
* @memberof google.apps.card.v1.MaterialIcon
|
|
21888
|
+
* @static
|
|
21889
|
+
* @param {Object.<string,*>} object Plain object
|
|
21890
|
+
* @returns {google.apps.card.v1.MaterialIcon} MaterialIcon
|
|
21891
|
+
*/
|
|
21892
|
+
MaterialIcon.fromObject = function fromObject(object) {
|
|
21893
|
+
if (object instanceof $root.google.apps.card.v1.MaterialIcon)
|
|
21894
|
+
return object;
|
|
21895
|
+
var message = new $root.google.apps.card.v1.MaterialIcon();
|
|
21896
|
+
if (object.name != null)
|
|
21897
|
+
message.name = String(object.name);
|
|
21898
|
+
if (object.fill != null)
|
|
21899
|
+
message.fill = Boolean(object.fill);
|
|
21900
|
+
if (object.weight != null)
|
|
21901
|
+
message.weight = object.weight | 0;
|
|
21902
|
+
if (object.grade != null)
|
|
21903
|
+
message.grade = object.grade | 0;
|
|
21904
|
+
return message;
|
|
21905
|
+
};
|
|
21906
|
+
|
|
21907
|
+
/**
|
|
21908
|
+
* Creates a plain object from a MaterialIcon message. Also converts values to other types if specified.
|
|
21909
|
+
* @function toObject
|
|
21910
|
+
* @memberof google.apps.card.v1.MaterialIcon
|
|
21911
|
+
* @static
|
|
21912
|
+
* @param {google.apps.card.v1.MaterialIcon} message MaterialIcon
|
|
21913
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
21914
|
+
* @returns {Object.<string,*>} Plain object
|
|
21915
|
+
*/
|
|
21916
|
+
MaterialIcon.toObject = function toObject(message, options) {
|
|
21917
|
+
if (!options)
|
|
21918
|
+
options = {};
|
|
21919
|
+
var object = {};
|
|
21920
|
+
if (options.defaults) {
|
|
21921
|
+
object.name = "";
|
|
21922
|
+
object.fill = false;
|
|
21923
|
+
object.weight = 0;
|
|
21924
|
+
object.grade = 0;
|
|
21925
|
+
}
|
|
21926
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
21927
|
+
object.name = message.name;
|
|
21928
|
+
if (message.fill != null && message.hasOwnProperty("fill"))
|
|
21929
|
+
object.fill = message.fill;
|
|
21930
|
+
if (message.weight != null && message.hasOwnProperty("weight"))
|
|
21931
|
+
object.weight = message.weight;
|
|
21932
|
+
if (message.grade != null && message.hasOwnProperty("grade"))
|
|
21933
|
+
object.grade = message.grade;
|
|
21934
|
+
return object;
|
|
21935
|
+
};
|
|
21936
|
+
|
|
21937
|
+
/**
|
|
21938
|
+
* Converts this MaterialIcon to JSON.
|
|
21939
|
+
* @function toJSON
|
|
21940
|
+
* @memberof google.apps.card.v1.MaterialIcon
|
|
21941
|
+
* @instance
|
|
21942
|
+
* @returns {Object.<string,*>} JSON object
|
|
21943
|
+
*/
|
|
21944
|
+
MaterialIcon.prototype.toJSON = function toJSON() {
|
|
21945
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
21946
|
+
};
|
|
21947
|
+
|
|
21948
|
+
/**
|
|
21949
|
+
* Gets the default type url for MaterialIcon
|
|
21950
|
+
* @function getTypeUrl
|
|
21951
|
+
* @memberof google.apps.card.v1.MaterialIcon
|
|
21952
|
+
* @static
|
|
21953
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
21954
|
+
* @returns {string} The default type url
|
|
21955
|
+
*/
|
|
21956
|
+
MaterialIcon.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
21957
|
+
if (typeUrlPrefix === undefined) {
|
|
21958
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
21959
|
+
}
|
|
21960
|
+
return typeUrlPrefix + "/google.apps.card.v1.MaterialIcon";
|
|
21961
|
+
};
|
|
21962
|
+
|
|
21963
|
+
return MaterialIcon;
|
|
21964
|
+
})();
|
|
21965
|
+
|
|
21966
|
+
v1.ImageCropStyle = (function() {
|
|
21967
|
+
|
|
21968
|
+
/**
|
|
21969
|
+
* Properties of an ImageCropStyle.
|
|
21970
|
+
* @memberof google.apps.card.v1
|
|
21971
|
+
* @interface IImageCropStyle
|
|
21972
|
+
* @property {google.apps.card.v1.ImageCropStyle.ImageCropType|null} [type] ImageCropStyle type
|
|
21973
|
+
* @property {number|null} [aspectRatio] ImageCropStyle aspectRatio
|
|
21974
|
+
*/
|
|
21975
|
+
|
|
21976
|
+
/**
|
|
21977
|
+
* Constructs a new ImageCropStyle.
|
|
21978
|
+
* @memberof google.apps.card.v1
|
|
21979
|
+
* @classdesc Represents an ImageCropStyle.
|
|
21980
|
+
* @implements IImageCropStyle
|
|
21981
|
+
* @constructor
|
|
21982
|
+
* @param {google.apps.card.v1.IImageCropStyle=} [properties] Properties to set
|
|
21983
|
+
*/
|
|
21984
|
+
function ImageCropStyle(properties) {
|
|
21985
|
+
if (properties)
|
|
21986
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
21987
|
+
if (properties[keys[i]] != null)
|
|
21988
|
+
this[keys[i]] = properties[keys[i]];
|
|
21989
|
+
}
|
|
21990
|
+
|
|
21991
|
+
/**
|
|
21992
|
+
* ImageCropStyle type.
|
|
21993
|
+
* @member {google.apps.card.v1.ImageCropStyle.ImageCropType} type
|
|
21994
|
+
* @memberof google.apps.card.v1.ImageCropStyle
|
|
21995
|
+
* @instance
|
|
21996
|
+
*/
|
|
21997
|
+
ImageCropStyle.prototype.type = 0;
|
|
21998
|
+
|
|
21999
|
+
/**
|
|
22000
|
+
* ImageCropStyle aspectRatio.
|
|
22001
|
+
* @member {number} aspectRatio
|
|
22002
|
+
* @memberof google.apps.card.v1.ImageCropStyle
|
|
22003
|
+
* @instance
|
|
22004
|
+
*/
|
|
22005
|
+
ImageCropStyle.prototype.aspectRatio = 0;
|
|
22006
|
+
|
|
22007
|
+
/**
|
|
22008
|
+
* Creates a new ImageCropStyle instance using the specified properties.
|
|
22009
|
+
* @function create
|
|
22010
|
+
* @memberof google.apps.card.v1.ImageCropStyle
|
|
22011
|
+
* @static
|
|
22012
|
+
* @param {google.apps.card.v1.IImageCropStyle=} [properties] Properties to set
|
|
22013
|
+
* @returns {google.apps.card.v1.ImageCropStyle} ImageCropStyle instance
|
|
22014
|
+
*/
|
|
22015
|
+
ImageCropStyle.create = function create(properties) {
|
|
22016
|
+
return new ImageCropStyle(properties);
|
|
22017
|
+
};
|
|
22018
|
+
|
|
22019
|
+
/**
|
|
22020
|
+
* Encodes the specified ImageCropStyle message. Does not implicitly {@link google.apps.card.v1.ImageCropStyle.verify|verify} messages.
|
|
22021
|
+
* @function encode
|
|
22022
|
+
* @memberof google.apps.card.v1.ImageCropStyle
|
|
21715
22023
|
* @static
|
|
21716
22024
|
* @param {google.apps.card.v1.IImageCropStyle} message ImageCropStyle message or plain object to encode
|
|
21717
22025
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
@@ -26163,6 +26471,7 @@
|
|
|
26163
26471
|
* @property {number|null} [length] Annotation length
|
|
26164
26472
|
* @property {google.chat.v1.IUserMentionMetadata|null} [userMention] Annotation userMention
|
|
26165
26473
|
* @property {google.chat.v1.ISlashCommandMetadata|null} [slashCommand] Annotation slashCommand
|
|
26474
|
+
* @property {google.chat.v1.IRichLinkMetadata|null} [richLinkMetadata] Annotation richLinkMetadata
|
|
26166
26475
|
*/
|
|
26167
26476
|
|
|
26168
26477
|
/**
|
|
@@ -26220,6 +26529,14 @@
|
|
|
26220
26529
|
*/
|
|
26221
26530
|
Annotation.prototype.slashCommand = null;
|
|
26222
26531
|
|
|
26532
|
+
/**
|
|
26533
|
+
* Annotation richLinkMetadata.
|
|
26534
|
+
* @member {google.chat.v1.IRichLinkMetadata|null|undefined} richLinkMetadata
|
|
26535
|
+
* @memberof google.chat.v1.Annotation
|
|
26536
|
+
* @instance
|
|
26537
|
+
*/
|
|
26538
|
+
Annotation.prototype.richLinkMetadata = null;
|
|
26539
|
+
|
|
26223
26540
|
// OneOf field names bound to virtual getters and setters
|
|
26224
26541
|
var $oneOfFields;
|
|
26225
26542
|
|
|
@@ -26236,12 +26553,12 @@
|
|
|
26236
26553
|
|
|
26237
26554
|
/**
|
|
26238
26555
|
* Annotation metadata.
|
|
26239
|
-
* @member {"userMention"|"slashCommand"|undefined} metadata
|
|
26556
|
+
* @member {"userMention"|"slashCommand"|"richLinkMetadata"|undefined} metadata
|
|
26240
26557
|
* @memberof google.chat.v1.Annotation
|
|
26241
26558
|
* @instance
|
|
26242
26559
|
*/
|
|
26243
26560
|
Object.defineProperty(Annotation.prototype, "metadata", {
|
|
26244
|
-
get: $util.oneOfGetter($oneOfFields = ["userMention", "slashCommand"]),
|
|
26561
|
+
get: $util.oneOfGetter($oneOfFields = ["userMention", "slashCommand", "richLinkMetadata"]),
|
|
26245
26562
|
set: $util.oneOfSetter($oneOfFields)
|
|
26246
26563
|
});
|
|
26247
26564
|
|
|
@@ -26279,6 +26596,8 @@
|
|
|
26279
26596
|
$root.google.chat.v1.UserMentionMetadata.encode(message.userMention, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
26280
26597
|
if (message.slashCommand != null && Object.hasOwnProperty.call(message, "slashCommand"))
|
|
26281
26598
|
$root.google.chat.v1.SlashCommandMetadata.encode(message.slashCommand, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
26599
|
+
if (message.richLinkMetadata != null && Object.hasOwnProperty.call(message, "richLinkMetadata"))
|
|
26600
|
+
$root.google.chat.v1.RichLinkMetadata.encode(message.richLinkMetadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
26282
26601
|
return writer;
|
|
26283
26602
|
};
|
|
26284
26603
|
|
|
@@ -26333,6 +26652,10 @@
|
|
|
26333
26652
|
message.slashCommand = $root.google.chat.v1.SlashCommandMetadata.decode(reader, reader.uint32());
|
|
26334
26653
|
break;
|
|
26335
26654
|
}
|
|
26655
|
+
case 6: {
|
|
26656
|
+
message.richLinkMetadata = $root.google.chat.v1.RichLinkMetadata.decode(reader, reader.uint32());
|
|
26657
|
+
break;
|
|
26658
|
+
}
|
|
26336
26659
|
default:
|
|
26337
26660
|
reader.skipType(tag & 7);
|
|
26338
26661
|
break;
|
|
@@ -26376,6 +26699,7 @@
|
|
|
26376
26699
|
case 0:
|
|
26377
26700
|
case 1:
|
|
26378
26701
|
case 2:
|
|
26702
|
+
case 3:
|
|
26379
26703
|
break;
|
|
26380
26704
|
}
|
|
26381
26705
|
if (message.startIndex != null && message.hasOwnProperty("startIndex")) {
|
|
@@ -26404,6 +26728,16 @@
|
|
|
26404
26728
|
return "slashCommand." + error;
|
|
26405
26729
|
}
|
|
26406
26730
|
}
|
|
26731
|
+
if (message.richLinkMetadata != null && message.hasOwnProperty("richLinkMetadata")) {
|
|
26732
|
+
if (properties.metadata === 1)
|
|
26733
|
+
return "metadata: multiple values";
|
|
26734
|
+
properties.metadata = 1;
|
|
26735
|
+
{
|
|
26736
|
+
var error = $root.google.chat.v1.RichLinkMetadata.verify(message.richLinkMetadata);
|
|
26737
|
+
if (error)
|
|
26738
|
+
return "richLinkMetadata." + error;
|
|
26739
|
+
}
|
|
26740
|
+
}
|
|
26407
26741
|
return null;
|
|
26408
26742
|
};
|
|
26409
26743
|
|
|
@@ -26438,6 +26772,10 @@
|
|
|
26438
26772
|
case 2:
|
|
26439
26773
|
message.type = 2;
|
|
26440
26774
|
break;
|
|
26775
|
+
case "RICH_LINK":
|
|
26776
|
+
case 3:
|
|
26777
|
+
message.type = 3;
|
|
26778
|
+
break;
|
|
26441
26779
|
}
|
|
26442
26780
|
if (object.startIndex != null)
|
|
26443
26781
|
message.startIndex = object.startIndex | 0;
|
|
@@ -26453,6 +26791,11 @@
|
|
|
26453
26791
|
throw TypeError(".google.chat.v1.Annotation.slashCommand: object expected");
|
|
26454
26792
|
message.slashCommand = $root.google.chat.v1.SlashCommandMetadata.fromObject(object.slashCommand);
|
|
26455
26793
|
}
|
|
26794
|
+
if (object.richLinkMetadata != null) {
|
|
26795
|
+
if (typeof object.richLinkMetadata !== "object")
|
|
26796
|
+
throw TypeError(".google.chat.v1.Annotation.richLinkMetadata: object expected");
|
|
26797
|
+
message.richLinkMetadata = $root.google.chat.v1.RichLinkMetadata.fromObject(object.richLinkMetadata);
|
|
26798
|
+
}
|
|
26456
26799
|
return message;
|
|
26457
26800
|
};
|
|
26458
26801
|
|
|
@@ -26492,6 +26835,11 @@
|
|
|
26492
26835
|
if (options.oneofs)
|
|
26493
26836
|
object.metadata = "slashCommand";
|
|
26494
26837
|
}
|
|
26838
|
+
if (message.richLinkMetadata != null && message.hasOwnProperty("richLinkMetadata")) {
|
|
26839
|
+
object.richLinkMetadata = $root.google.chat.v1.RichLinkMetadata.toObject(message.richLinkMetadata, options);
|
|
26840
|
+
if (options.oneofs)
|
|
26841
|
+
object.metadata = "richLinkMetadata";
|
|
26842
|
+
}
|
|
26495
26843
|
return object;
|
|
26496
26844
|
};
|
|
26497
26845
|
|
|
@@ -27151,44 +27499,26 @@
|
|
|
27151
27499
|
return SlashCommandMetadata;
|
|
27152
27500
|
})();
|
|
27153
27501
|
|
|
27154
|
-
|
|
27155
|
-
* AnnotationType enum.
|
|
27156
|
-
* @name google.chat.v1.AnnotationType
|
|
27157
|
-
* @enum {number}
|
|
27158
|
-
* @property {number} ANNOTATION_TYPE_UNSPECIFIED=0 ANNOTATION_TYPE_UNSPECIFIED value
|
|
27159
|
-
* @property {number} USER_MENTION=1 USER_MENTION value
|
|
27160
|
-
* @property {number} SLASH_COMMAND=2 SLASH_COMMAND value
|
|
27161
|
-
*/
|
|
27162
|
-
v1.AnnotationType = (function() {
|
|
27163
|
-
var valuesById = {}, values = Object.create(valuesById);
|
|
27164
|
-
values[valuesById[0] = "ANNOTATION_TYPE_UNSPECIFIED"] = 0;
|
|
27165
|
-
values[valuesById[1] = "USER_MENTION"] = 1;
|
|
27166
|
-
values[valuesById[2] = "SLASH_COMMAND"] = 2;
|
|
27167
|
-
return values;
|
|
27168
|
-
})();
|
|
27169
|
-
|
|
27170
|
-
v1.User = (function() {
|
|
27502
|
+
v1.RichLinkMetadata = (function() {
|
|
27171
27503
|
|
|
27172
27504
|
/**
|
|
27173
|
-
* Properties of a
|
|
27505
|
+
* Properties of a RichLinkMetadata.
|
|
27174
27506
|
* @memberof google.chat.v1
|
|
27175
|
-
* @interface
|
|
27176
|
-
* @property {string|null} [
|
|
27177
|
-
* @property {
|
|
27178
|
-
* @property {
|
|
27179
|
-
* @property {google.chat.v1.User.Type|null} [type] User type
|
|
27180
|
-
* @property {boolean|null} [isAnonymous] User isAnonymous
|
|
27507
|
+
* @interface IRichLinkMetadata
|
|
27508
|
+
* @property {string|null} [uri] RichLinkMetadata uri
|
|
27509
|
+
* @property {google.chat.v1.RichLinkMetadata.RichLinkType|null} [richLinkType] RichLinkMetadata richLinkType
|
|
27510
|
+
* @property {google.chat.v1.IDriveLinkData|null} [driveLinkData] RichLinkMetadata driveLinkData
|
|
27181
27511
|
*/
|
|
27182
27512
|
|
|
27183
27513
|
/**
|
|
27184
|
-
* Constructs a new
|
|
27514
|
+
* Constructs a new RichLinkMetadata.
|
|
27185
27515
|
* @memberof google.chat.v1
|
|
27186
|
-
* @classdesc Represents a
|
|
27187
|
-
* @implements
|
|
27516
|
+
* @classdesc Represents a RichLinkMetadata.
|
|
27517
|
+
* @implements IRichLinkMetadata
|
|
27188
27518
|
* @constructor
|
|
27189
|
-
* @param {google.chat.v1.
|
|
27519
|
+
* @param {google.chat.v1.IRichLinkMetadata=} [properties] Properties to set
|
|
27190
27520
|
*/
|
|
27191
|
-
function
|
|
27521
|
+
function RichLinkMetadata(properties) {
|
|
27192
27522
|
if (properties)
|
|
27193
27523
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
27194
27524
|
if (properties[keys[i]] != null)
|
|
@@ -27196,131 +27526,117 @@
|
|
|
27196
27526
|
}
|
|
27197
27527
|
|
|
27198
27528
|
/**
|
|
27199
|
-
*
|
|
27200
|
-
* @member {string}
|
|
27201
|
-
* @memberof google.chat.v1.
|
|
27529
|
+
* RichLinkMetadata uri.
|
|
27530
|
+
* @member {string} uri
|
|
27531
|
+
* @memberof google.chat.v1.RichLinkMetadata
|
|
27202
27532
|
* @instance
|
|
27203
27533
|
*/
|
|
27204
|
-
|
|
27534
|
+
RichLinkMetadata.prototype.uri = "";
|
|
27205
27535
|
|
|
27206
27536
|
/**
|
|
27207
|
-
*
|
|
27208
|
-
* @member {
|
|
27209
|
-
* @memberof google.chat.v1.
|
|
27537
|
+
* RichLinkMetadata richLinkType.
|
|
27538
|
+
* @member {google.chat.v1.RichLinkMetadata.RichLinkType} richLinkType
|
|
27539
|
+
* @memberof google.chat.v1.RichLinkMetadata
|
|
27210
27540
|
* @instance
|
|
27211
27541
|
*/
|
|
27212
|
-
|
|
27542
|
+
RichLinkMetadata.prototype.richLinkType = 0;
|
|
27213
27543
|
|
|
27214
27544
|
/**
|
|
27215
|
-
*
|
|
27216
|
-
* @member {
|
|
27217
|
-
* @memberof google.chat.v1.
|
|
27545
|
+
* RichLinkMetadata driveLinkData.
|
|
27546
|
+
* @member {google.chat.v1.IDriveLinkData|null|undefined} driveLinkData
|
|
27547
|
+
* @memberof google.chat.v1.RichLinkMetadata
|
|
27218
27548
|
* @instance
|
|
27219
27549
|
*/
|
|
27220
|
-
|
|
27550
|
+
RichLinkMetadata.prototype.driveLinkData = null;
|
|
27221
27551
|
|
|
27222
|
-
|
|
27223
|
-
|
|
27224
|
-
* @member {google.chat.v1.User.Type} type
|
|
27225
|
-
* @memberof google.chat.v1.User
|
|
27226
|
-
* @instance
|
|
27227
|
-
*/
|
|
27228
|
-
User.prototype.type = 0;
|
|
27552
|
+
// OneOf field names bound to virtual getters and setters
|
|
27553
|
+
var $oneOfFields;
|
|
27229
27554
|
|
|
27230
27555
|
/**
|
|
27231
|
-
*
|
|
27232
|
-
* @member {
|
|
27233
|
-
* @memberof google.chat.v1.
|
|
27556
|
+
* RichLinkMetadata data.
|
|
27557
|
+
* @member {"driveLinkData"|undefined} data
|
|
27558
|
+
* @memberof google.chat.v1.RichLinkMetadata
|
|
27234
27559
|
* @instance
|
|
27235
27560
|
*/
|
|
27236
|
-
|
|
27561
|
+
Object.defineProperty(RichLinkMetadata.prototype, "data", {
|
|
27562
|
+
get: $util.oneOfGetter($oneOfFields = ["driveLinkData"]),
|
|
27563
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
27564
|
+
});
|
|
27237
27565
|
|
|
27238
27566
|
/**
|
|
27239
|
-
* Creates a new
|
|
27567
|
+
* Creates a new RichLinkMetadata instance using the specified properties.
|
|
27240
27568
|
* @function create
|
|
27241
|
-
* @memberof google.chat.v1.
|
|
27569
|
+
* @memberof google.chat.v1.RichLinkMetadata
|
|
27242
27570
|
* @static
|
|
27243
|
-
* @param {google.chat.v1.
|
|
27244
|
-
* @returns {google.chat.v1.
|
|
27571
|
+
* @param {google.chat.v1.IRichLinkMetadata=} [properties] Properties to set
|
|
27572
|
+
* @returns {google.chat.v1.RichLinkMetadata} RichLinkMetadata instance
|
|
27245
27573
|
*/
|
|
27246
|
-
|
|
27247
|
-
return new
|
|
27574
|
+
RichLinkMetadata.create = function create(properties) {
|
|
27575
|
+
return new RichLinkMetadata(properties);
|
|
27248
27576
|
};
|
|
27249
27577
|
|
|
27250
27578
|
/**
|
|
27251
|
-
* Encodes the specified
|
|
27579
|
+
* Encodes the specified RichLinkMetadata message. Does not implicitly {@link google.chat.v1.RichLinkMetadata.verify|verify} messages.
|
|
27252
27580
|
* @function encode
|
|
27253
|
-
* @memberof google.chat.v1.
|
|
27581
|
+
* @memberof google.chat.v1.RichLinkMetadata
|
|
27254
27582
|
* @static
|
|
27255
|
-
* @param {google.chat.v1.
|
|
27583
|
+
* @param {google.chat.v1.IRichLinkMetadata} message RichLinkMetadata message or plain object to encode
|
|
27256
27584
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
27257
27585
|
* @returns {$protobuf.Writer} Writer
|
|
27258
27586
|
*/
|
|
27259
|
-
|
|
27587
|
+
RichLinkMetadata.encode = function encode(message, writer) {
|
|
27260
27588
|
if (!writer)
|
|
27261
27589
|
writer = $Writer.create();
|
|
27262
|
-
if (message.
|
|
27263
|
-
writer.uint32(/* id 1, wireType 2 =*/10).string(message.
|
|
27264
|
-
if (message.
|
|
27265
|
-
writer.uint32(/* id 2, wireType
|
|
27266
|
-
if (message.
|
|
27267
|
-
writer.uint32(/* id
|
|
27268
|
-
if (message.domainId != null && Object.hasOwnProperty.call(message, "domainId"))
|
|
27269
|
-
writer.uint32(/* id 6, wireType 2 =*/50).string(message.domainId);
|
|
27270
|
-
if (message.isAnonymous != null && Object.hasOwnProperty.call(message, "isAnonymous"))
|
|
27271
|
-
writer.uint32(/* id 7, wireType 0 =*/56).bool(message.isAnonymous);
|
|
27590
|
+
if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
|
|
27591
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri);
|
|
27592
|
+
if (message.richLinkType != null && Object.hasOwnProperty.call(message, "richLinkType"))
|
|
27593
|
+
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.richLinkType);
|
|
27594
|
+
if (message.driveLinkData != null && Object.hasOwnProperty.call(message, "driveLinkData"))
|
|
27595
|
+
$root.google.chat.v1.DriveLinkData.encode(message.driveLinkData, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
27272
27596
|
return writer;
|
|
27273
27597
|
};
|
|
27274
27598
|
|
|
27275
27599
|
/**
|
|
27276
|
-
* Encodes the specified
|
|
27600
|
+
* Encodes the specified RichLinkMetadata message, length delimited. Does not implicitly {@link google.chat.v1.RichLinkMetadata.verify|verify} messages.
|
|
27277
27601
|
* @function encodeDelimited
|
|
27278
|
-
* @memberof google.chat.v1.
|
|
27602
|
+
* @memberof google.chat.v1.RichLinkMetadata
|
|
27279
27603
|
* @static
|
|
27280
|
-
* @param {google.chat.v1.
|
|
27604
|
+
* @param {google.chat.v1.IRichLinkMetadata} message RichLinkMetadata message or plain object to encode
|
|
27281
27605
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
27282
27606
|
* @returns {$protobuf.Writer} Writer
|
|
27283
27607
|
*/
|
|
27284
|
-
|
|
27608
|
+
RichLinkMetadata.encodeDelimited = function encodeDelimited(message, writer) {
|
|
27285
27609
|
return this.encode(message, writer).ldelim();
|
|
27286
27610
|
};
|
|
27287
27611
|
|
|
27288
27612
|
/**
|
|
27289
|
-
* Decodes a
|
|
27613
|
+
* Decodes a RichLinkMetadata message from the specified reader or buffer.
|
|
27290
27614
|
* @function decode
|
|
27291
|
-
* @memberof google.chat.v1.
|
|
27615
|
+
* @memberof google.chat.v1.RichLinkMetadata
|
|
27292
27616
|
* @static
|
|
27293
27617
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
27294
27618
|
* @param {number} [length] Message length if known beforehand
|
|
27295
|
-
* @returns {google.chat.v1.
|
|
27619
|
+
* @returns {google.chat.v1.RichLinkMetadata} RichLinkMetadata
|
|
27296
27620
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
27297
27621
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
27298
27622
|
*/
|
|
27299
|
-
|
|
27623
|
+
RichLinkMetadata.decode = function decode(reader, length) {
|
|
27300
27624
|
if (!(reader instanceof $Reader))
|
|
27301
27625
|
reader = $Reader.create(reader);
|
|
27302
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.
|
|
27626
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.RichLinkMetadata();
|
|
27303
27627
|
while (reader.pos < end) {
|
|
27304
27628
|
var tag = reader.uint32();
|
|
27305
27629
|
switch (tag >>> 3) {
|
|
27306
27630
|
case 1: {
|
|
27307
|
-
message.
|
|
27631
|
+
message.uri = reader.string();
|
|
27308
27632
|
break;
|
|
27309
27633
|
}
|
|
27310
27634
|
case 2: {
|
|
27311
|
-
message.
|
|
27312
|
-
break;
|
|
27313
|
-
}
|
|
27314
|
-
case 6: {
|
|
27315
|
-
message.domainId = reader.string();
|
|
27316
|
-
break;
|
|
27317
|
-
}
|
|
27318
|
-
case 5: {
|
|
27319
|
-
message.type = reader.int32();
|
|
27635
|
+
message.richLinkType = reader.int32();
|
|
27320
27636
|
break;
|
|
27321
27637
|
}
|
|
27322
|
-
case
|
|
27323
|
-
message.
|
|
27638
|
+
case 3: {
|
|
27639
|
+
message.driveLinkData = $root.google.chat.v1.DriveLinkData.decode(reader, reader.uint32());
|
|
27324
27640
|
break;
|
|
27325
27641
|
}
|
|
27326
27642
|
default:
|
|
@@ -27332,202 +27648,184 @@
|
|
|
27332
27648
|
};
|
|
27333
27649
|
|
|
27334
27650
|
/**
|
|
27335
|
-
* Decodes a
|
|
27651
|
+
* Decodes a RichLinkMetadata message from the specified reader or buffer, length delimited.
|
|
27336
27652
|
* @function decodeDelimited
|
|
27337
|
-
* @memberof google.chat.v1.
|
|
27653
|
+
* @memberof google.chat.v1.RichLinkMetadata
|
|
27338
27654
|
* @static
|
|
27339
27655
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
27340
|
-
* @returns {google.chat.v1.
|
|
27656
|
+
* @returns {google.chat.v1.RichLinkMetadata} RichLinkMetadata
|
|
27341
27657
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
27342
27658
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
27343
27659
|
*/
|
|
27344
|
-
|
|
27660
|
+
RichLinkMetadata.decodeDelimited = function decodeDelimited(reader) {
|
|
27345
27661
|
if (!(reader instanceof $Reader))
|
|
27346
27662
|
reader = new $Reader(reader);
|
|
27347
27663
|
return this.decode(reader, reader.uint32());
|
|
27348
27664
|
};
|
|
27349
27665
|
|
|
27350
27666
|
/**
|
|
27351
|
-
* Verifies a
|
|
27667
|
+
* Verifies a RichLinkMetadata message.
|
|
27352
27668
|
* @function verify
|
|
27353
|
-
* @memberof google.chat.v1.
|
|
27669
|
+
* @memberof google.chat.v1.RichLinkMetadata
|
|
27354
27670
|
* @static
|
|
27355
27671
|
* @param {Object.<string,*>} message Plain object to verify
|
|
27356
27672
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
27357
27673
|
*/
|
|
27358
|
-
|
|
27674
|
+
RichLinkMetadata.verify = function verify(message) {
|
|
27359
27675
|
if (typeof message !== "object" || message === null)
|
|
27360
27676
|
return "object expected";
|
|
27361
|
-
|
|
27362
|
-
|
|
27363
|
-
|
|
27364
|
-
|
|
27365
|
-
|
|
27366
|
-
|
|
27367
|
-
if (message.domainId != null && message.hasOwnProperty("domainId"))
|
|
27368
|
-
if (!$util.isString(message.domainId))
|
|
27369
|
-
return "domainId: string expected";
|
|
27370
|
-
if (message.type != null && message.hasOwnProperty("type"))
|
|
27371
|
-
switch (message.type) {
|
|
27677
|
+
var properties = {};
|
|
27678
|
+
if (message.uri != null && message.hasOwnProperty("uri"))
|
|
27679
|
+
if (!$util.isString(message.uri))
|
|
27680
|
+
return "uri: string expected";
|
|
27681
|
+
if (message.richLinkType != null && message.hasOwnProperty("richLinkType"))
|
|
27682
|
+
switch (message.richLinkType) {
|
|
27372
27683
|
default:
|
|
27373
|
-
return "
|
|
27684
|
+
return "richLinkType: enum value expected";
|
|
27374
27685
|
case 0:
|
|
27375
27686
|
case 1:
|
|
27376
|
-
case 2:
|
|
27377
27687
|
break;
|
|
27378
27688
|
}
|
|
27379
|
-
if (message.
|
|
27380
|
-
|
|
27381
|
-
|
|
27689
|
+
if (message.driveLinkData != null && message.hasOwnProperty("driveLinkData")) {
|
|
27690
|
+
properties.data = 1;
|
|
27691
|
+
{
|
|
27692
|
+
var error = $root.google.chat.v1.DriveLinkData.verify(message.driveLinkData);
|
|
27693
|
+
if (error)
|
|
27694
|
+
return "driveLinkData." + error;
|
|
27695
|
+
}
|
|
27696
|
+
}
|
|
27382
27697
|
return null;
|
|
27383
27698
|
};
|
|
27384
27699
|
|
|
27385
27700
|
/**
|
|
27386
|
-
* Creates a
|
|
27701
|
+
* Creates a RichLinkMetadata message from a plain object. Also converts values to their respective internal types.
|
|
27387
27702
|
* @function fromObject
|
|
27388
|
-
* @memberof google.chat.v1.
|
|
27703
|
+
* @memberof google.chat.v1.RichLinkMetadata
|
|
27389
27704
|
* @static
|
|
27390
27705
|
* @param {Object.<string,*>} object Plain object
|
|
27391
|
-
* @returns {google.chat.v1.
|
|
27706
|
+
* @returns {google.chat.v1.RichLinkMetadata} RichLinkMetadata
|
|
27392
27707
|
*/
|
|
27393
|
-
|
|
27394
|
-
if (object instanceof $root.google.chat.v1.
|
|
27708
|
+
RichLinkMetadata.fromObject = function fromObject(object) {
|
|
27709
|
+
if (object instanceof $root.google.chat.v1.RichLinkMetadata)
|
|
27395
27710
|
return object;
|
|
27396
|
-
var message = new $root.google.chat.v1.
|
|
27397
|
-
if (object.
|
|
27398
|
-
message.
|
|
27399
|
-
|
|
27400
|
-
message.displayName = String(object.displayName);
|
|
27401
|
-
if (object.domainId != null)
|
|
27402
|
-
message.domainId = String(object.domainId);
|
|
27403
|
-
switch (object.type) {
|
|
27711
|
+
var message = new $root.google.chat.v1.RichLinkMetadata();
|
|
27712
|
+
if (object.uri != null)
|
|
27713
|
+
message.uri = String(object.uri);
|
|
27714
|
+
switch (object.richLinkType) {
|
|
27404
27715
|
default:
|
|
27405
|
-
if (typeof object.
|
|
27406
|
-
message.
|
|
27716
|
+
if (typeof object.richLinkType === "number") {
|
|
27717
|
+
message.richLinkType = object.richLinkType;
|
|
27407
27718
|
break;
|
|
27408
27719
|
}
|
|
27409
27720
|
break;
|
|
27410
|
-
case "
|
|
27721
|
+
case "RICH_LINK_TYPE_UNSPECIFIED":
|
|
27411
27722
|
case 0:
|
|
27412
|
-
message.
|
|
27723
|
+
message.richLinkType = 0;
|
|
27413
27724
|
break;
|
|
27414
|
-
case "
|
|
27725
|
+
case "DRIVE_FILE":
|
|
27415
27726
|
case 1:
|
|
27416
|
-
message.
|
|
27417
|
-
break;
|
|
27418
|
-
case "BOT":
|
|
27419
|
-
case 2:
|
|
27420
|
-
message.type = 2;
|
|
27727
|
+
message.richLinkType = 1;
|
|
27421
27728
|
break;
|
|
27422
27729
|
}
|
|
27423
|
-
if (object.
|
|
27424
|
-
|
|
27730
|
+
if (object.driveLinkData != null) {
|
|
27731
|
+
if (typeof object.driveLinkData !== "object")
|
|
27732
|
+
throw TypeError(".google.chat.v1.RichLinkMetadata.driveLinkData: object expected");
|
|
27733
|
+
message.driveLinkData = $root.google.chat.v1.DriveLinkData.fromObject(object.driveLinkData);
|
|
27734
|
+
}
|
|
27425
27735
|
return message;
|
|
27426
27736
|
};
|
|
27427
27737
|
|
|
27428
27738
|
/**
|
|
27429
|
-
* Creates a plain object from a
|
|
27739
|
+
* Creates a plain object from a RichLinkMetadata message. Also converts values to other types if specified.
|
|
27430
27740
|
* @function toObject
|
|
27431
|
-
* @memberof google.chat.v1.
|
|
27741
|
+
* @memberof google.chat.v1.RichLinkMetadata
|
|
27432
27742
|
* @static
|
|
27433
|
-
* @param {google.chat.v1.
|
|
27743
|
+
* @param {google.chat.v1.RichLinkMetadata} message RichLinkMetadata
|
|
27434
27744
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
27435
27745
|
* @returns {Object.<string,*>} Plain object
|
|
27436
27746
|
*/
|
|
27437
|
-
|
|
27747
|
+
RichLinkMetadata.toObject = function toObject(message, options) {
|
|
27438
27748
|
if (!options)
|
|
27439
27749
|
options = {};
|
|
27440
27750
|
var object = {};
|
|
27441
27751
|
if (options.defaults) {
|
|
27442
|
-
object.
|
|
27443
|
-
object.
|
|
27444
|
-
|
|
27445
|
-
|
|
27446
|
-
object.
|
|
27752
|
+
object.uri = "";
|
|
27753
|
+
object.richLinkType = options.enums === String ? "RICH_LINK_TYPE_UNSPECIFIED" : 0;
|
|
27754
|
+
}
|
|
27755
|
+
if (message.uri != null && message.hasOwnProperty("uri"))
|
|
27756
|
+
object.uri = message.uri;
|
|
27757
|
+
if (message.richLinkType != null && message.hasOwnProperty("richLinkType"))
|
|
27758
|
+
object.richLinkType = options.enums === String ? $root.google.chat.v1.RichLinkMetadata.RichLinkType[message.richLinkType] === undefined ? message.richLinkType : $root.google.chat.v1.RichLinkMetadata.RichLinkType[message.richLinkType] : message.richLinkType;
|
|
27759
|
+
if (message.driveLinkData != null && message.hasOwnProperty("driveLinkData")) {
|
|
27760
|
+
object.driveLinkData = $root.google.chat.v1.DriveLinkData.toObject(message.driveLinkData, options);
|
|
27761
|
+
if (options.oneofs)
|
|
27762
|
+
object.data = "driveLinkData";
|
|
27447
27763
|
}
|
|
27448
|
-
if (message.name != null && message.hasOwnProperty("name"))
|
|
27449
|
-
object.name = message.name;
|
|
27450
|
-
if (message.displayName != null && message.hasOwnProperty("displayName"))
|
|
27451
|
-
object.displayName = message.displayName;
|
|
27452
|
-
if (message.type != null && message.hasOwnProperty("type"))
|
|
27453
|
-
object.type = options.enums === String ? $root.google.chat.v1.User.Type[message.type] === undefined ? message.type : $root.google.chat.v1.User.Type[message.type] : message.type;
|
|
27454
|
-
if (message.domainId != null && message.hasOwnProperty("domainId"))
|
|
27455
|
-
object.domainId = message.domainId;
|
|
27456
|
-
if (message.isAnonymous != null && message.hasOwnProperty("isAnonymous"))
|
|
27457
|
-
object.isAnonymous = message.isAnonymous;
|
|
27458
27764
|
return object;
|
|
27459
27765
|
};
|
|
27460
27766
|
|
|
27461
27767
|
/**
|
|
27462
|
-
* Converts this
|
|
27768
|
+
* Converts this RichLinkMetadata to JSON.
|
|
27463
27769
|
* @function toJSON
|
|
27464
|
-
* @memberof google.chat.v1.
|
|
27770
|
+
* @memberof google.chat.v1.RichLinkMetadata
|
|
27465
27771
|
* @instance
|
|
27466
27772
|
* @returns {Object.<string,*>} JSON object
|
|
27467
27773
|
*/
|
|
27468
|
-
|
|
27774
|
+
RichLinkMetadata.prototype.toJSON = function toJSON() {
|
|
27469
27775
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
27470
27776
|
};
|
|
27471
27777
|
|
|
27472
27778
|
/**
|
|
27473
|
-
* Gets the default type url for
|
|
27779
|
+
* Gets the default type url for RichLinkMetadata
|
|
27474
27780
|
* @function getTypeUrl
|
|
27475
|
-
* @memberof google.chat.v1.
|
|
27781
|
+
* @memberof google.chat.v1.RichLinkMetadata
|
|
27476
27782
|
* @static
|
|
27477
27783
|
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
27478
27784
|
* @returns {string} The default type url
|
|
27479
27785
|
*/
|
|
27480
|
-
|
|
27786
|
+
RichLinkMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
27481
27787
|
if (typeUrlPrefix === undefined) {
|
|
27482
27788
|
typeUrlPrefix = "type.googleapis.com";
|
|
27483
27789
|
}
|
|
27484
|
-
return typeUrlPrefix + "/google.chat.v1.
|
|
27790
|
+
return typeUrlPrefix + "/google.chat.v1.RichLinkMetadata";
|
|
27485
27791
|
};
|
|
27486
27792
|
|
|
27487
27793
|
/**
|
|
27488
|
-
*
|
|
27489
|
-
* @name google.chat.v1.
|
|
27794
|
+
* RichLinkType enum.
|
|
27795
|
+
* @name google.chat.v1.RichLinkMetadata.RichLinkType
|
|
27490
27796
|
* @enum {number}
|
|
27491
|
-
* @property {number}
|
|
27492
|
-
* @property {number}
|
|
27493
|
-
* @property {number} BOT=2 BOT value
|
|
27797
|
+
* @property {number} RICH_LINK_TYPE_UNSPECIFIED=0 RICH_LINK_TYPE_UNSPECIFIED value
|
|
27798
|
+
* @property {number} DRIVE_FILE=1 DRIVE_FILE value
|
|
27494
27799
|
*/
|
|
27495
|
-
|
|
27800
|
+
RichLinkMetadata.RichLinkType = (function() {
|
|
27496
27801
|
var valuesById = {}, values = Object.create(valuesById);
|
|
27497
|
-
values[valuesById[0] = "
|
|
27498
|
-
values[valuesById[1] = "
|
|
27499
|
-
values[valuesById[2] = "BOT"] = 2;
|
|
27802
|
+
values[valuesById[0] = "RICH_LINK_TYPE_UNSPECIFIED"] = 0;
|
|
27803
|
+
values[valuesById[1] = "DRIVE_FILE"] = 1;
|
|
27500
27804
|
return values;
|
|
27501
27805
|
})();
|
|
27502
27806
|
|
|
27503
|
-
return
|
|
27807
|
+
return RichLinkMetadata;
|
|
27504
27808
|
})();
|
|
27505
27809
|
|
|
27506
|
-
v1.
|
|
27810
|
+
v1.DriveLinkData = (function() {
|
|
27507
27811
|
|
|
27508
27812
|
/**
|
|
27509
|
-
* Properties of
|
|
27813
|
+
* Properties of a DriveLinkData.
|
|
27510
27814
|
* @memberof google.chat.v1
|
|
27511
|
-
* @interface
|
|
27512
|
-
* @property {
|
|
27513
|
-
* @property {string|null} [
|
|
27514
|
-
* @property {string|null} [contentType] Attachment contentType
|
|
27515
|
-
* @property {google.chat.v1.IAttachmentDataRef|null} [attachmentDataRef] Attachment attachmentDataRef
|
|
27516
|
-
* @property {google.chat.v1.IDriveDataRef|null} [driveDataRef] Attachment driveDataRef
|
|
27517
|
-
* @property {string|null} [thumbnailUri] Attachment thumbnailUri
|
|
27518
|
-
* @property {string|null} [downloadUri] Attachment downloadUri
|
|
27519
|
-
* @property {google.chat.v1.Attachment.Source|null} [source] Attachment source
|
|
27815
|
+
* @interface IDriveLinkData
|
|
27816
|
+
* @property {google.chat.v1.IDriveDataRef|null} [driveDataRef] DriveLinkData driveDataRef
|
|
27817
|
+
* @property {string|null} [mimeType] DriveLinkData mimeType
|
|
27520
27818
|
*/
|
|
27521
27819
|
|
|
27522
27820
|
/**
|
|
27523
|
-
* Constructs a new
|
|
27821
|
+
* Constructs a new DriveLinkData.
|
|
27524
27822
|
* @memberof google.chat.v1
|
|
27525
|
-
* @classdesc Represents
|
|
27526
|
-
* @implements
|
|
27823
|
+
* @classdesc Represents a DriveLinkData.
|
|
27824
|
+
* @implements IDriveLinkData
|
|
27527
27825
|
* @constructor
|
|
27528
|
-
* @param {google.chat.v1.
|
|
27826
|
+
* @param {google.chat.v1.IDriveLinkData=} [properties] Properties to set
|
|
27529
27827
|
*/
|
|
27530
|
-
function
|
|
27828
|
+
function DriveLinkData(properties) {
|
|
27531
27829
|
if (properties)
|
|
27532
27830
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
27533
27831
|
if (properties[keys[i]] != null)
|
|
@@ -27535,70 +27833,326 @@
|
|
|
27535
27833
|
}
|
|
27536
27834
|
|
|
27537
27835
|
/**
|
|
27538
|
-
*
|
|
27539
|
-
* @member {
|
|
27540
|
-
* @memberof google.chat.v1.
|
|
27541
|
-
* @instance
|
|
27542
|
-
*/
|
|
27543
|
-
Attachment.prototype.name = "";
|
|
27544
|
-
|
|
27545
|
-
/**
|
|
27546
|
-
* Attachment contentName.
|
|
27547
|
-
* @member {string} contentName
|
|
27548
|
-
* @memberof google.chat.v1.Attachment
|
|
27549
|
-
* @instance
|
|
27550
|
-
*/
|
|
27551
|
-
Attachment.prototype.contentName = "";
|
|
27552
|
-
|
|
27553
|
-
/**
|
|
27554
|
-
* Attachment contentType.
|
|
27555
|
-
* @member {string} contentType
|
|
27556
|
-
* @memberof google.chat.v1.Attachment
|
|
27836
|
+
* DriveLinkData driveDataRef.
|
|
27837
|
+
* @member {google.chat.v1.IDriveDataRef|null|undefined} driveDataRef
|
|
27838
|
+
* @memberof google.chat.v1.DriveLinkData
|
|
27557
27839
|
* @instance
|
|
27558
27840
|
*/
|
|
27559
|
-
|
|
27841
|
+
DriveLinkData.prototype.driveDataRef = null;
|
|
27560
27842
|
|
|
27561
27843
|
/**
|
|
27562
|
-
*
|
|
27563
|
-
* @member {
|
|
27564
|
-
* @memberof google.chat.v1.
|
|
27844
|
+
* DriveLinkData mimeType.
|
|
27845
|
+
* @member {string} mimeType
|
|
27846
|
+
* @memberof google.chat.v1.DriveLinkData
|
|
27565
27847
|
* @instance
|
|
27566
27848
|
*/
|
|
27567
|
-
|
|
27849
|
+
DriveLinkData.prototype.mimeType = "";
|
|
27568
27850
|
|
|
27569
27851
|
/**
|
|
27570
|
-
*
|
|
27571
|
-
* @
|
|
27572
|
-
* @memberof google.chat.v1.
|
|
27573
|
-
* @
|
|
27852
|
+
* Creates a new DriveLinkData instance using the specified properties.
|
|
27853
|
+
* @function create
|
|
27854
|
+
* @memberof google.chat.v1.DriveLinkData
|
|
27855
|
+
* @static
|
|
27856
|
+
* @param {google.chat.v1.IDriveLinkData=} [properties] Properties to set
|
|
27857
|
+
* @returns {google.chat.v1.DriveLinkData} DriveLinkData instance
|
|
27574
27858
|
*/
|
|
27575
|
-
|
|
27859
|
+
DriveLinkData.create = function create(properties) {
|
|
27860
|
+
return new DriveLinkData(properties);
|
|
27861
|
+
};
|
|
27576
27862
|
|
|
27577
27863
|
/**
|
|
27578
|
-
*
|
|
27579
|
-
* @
|
|
27580
|
-
* @memberof google.chat.v1.
|
|
27581
|
-
* @
|
|
27864
|
+
* Encodes the specified DriveLinkData message. Does not implicitly {@link google.chat.v1.DriveLinkData.verify|verify} messages.
|
|
27865
|
+
* @function encode
|
|
27866
|
+
* @memberof google.chat.v1.DriveLinkData
|
|
27867
|
+
* @static
|
|
27868
|
+
* @param {google.chat.v1.IDriveLinkData} message DriveLinkData message or plain object to encode
|
|
27869
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
27870
|
+
* @returns {$protobuf.Writer} Writer
|
|
27582
27871
|
*/
|
|
27583
|
-
|
|
27872
|
+
DriveLinkData.encode = function encode(message, writer) {
|
|
27873
|
+
if (!writer)
|
|
27874
|
+
writer = $Writer.create();
|
|
27875
|
+
if (message.driveDataRef != null && Object.hasOwnProperty.call(message, "driveDataRef"))
|
|
27876
|
+
$root.google.chat.v1.DriveDataRef.encode(message.driveDataRef, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
27877
|
+
if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType"))
|
|
27878
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType);
|
|
27879
|
+
return writer;
|
|
27880
|
+
};
|
|
27584
27881
|
|
|
27585
27882
|
/**
|
|
27586
|
-
*
|
|
27587
|
-
* @
|
|
27588
|
-
* @memberof google.chat.v1.
|
|
27589
|
-
* @
|
|
27883
|
+
* Encodes the specified DriveLinkData message, length delimited. Does not implicitly {@link google.chat.v1.DriveLinkData.verify|verify} messages.
|
|
27884
|
+
* @function encodeDelimited
|
|
27885
|
+
* @memberof google.chat.v1.DriveLinkData
|
|
27886
|
+
* @static
|
|
27887
|
+
* @param {google.chat.v1.IDriveLinkData} message DriveLinkData message or plain object to encode
|
|
27888
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
27889
|
+
* @returns {$protobuf.Writer} Writer
|
|
27590
27890
|
*/
|
|
27591
|
-
|
|
27891
|
+
DriveLinkData.encodeDelimited = function encodeDelimited(message, writer) {
|
|
27892
|
+
return this.encode(message, writer).ldelim();
|
|
27893
|
+
};
|
|
27592
27894
|
|
|
27593
27895
|
/**
|
|
27594
|
-
*
|
|
27595
|
-
* @
|
|
27596
|
-
* @memberof google.chat.v1.
|
|
27597
|
-
* @
|
|
27896
|
+
* Decodes a DriveLinkData message from the specified reader or buffer.
|
|
27897
|
+
* @function decode
|
|
27898
|
+
* @memberof google.chat.v1.DriveLinkData
|
|
27899
|
+
* @static
|
|
27900
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
27901
|
+
* @param {number} [length] Message length if known beforehand
|
|
27902
|
+
* @returns {google.chat.v1.DriveLinkData} DriveLinkData
|
|
27903
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
27904
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
27598
27905
|
*/
|
|
27599
|
-
|
|
27600
|
-
|
|
27601
|
-
|
|
27906
|
+
DriveLinkData.decode = function decode(reader, length) {
|
|
27907
|
+
if (!(reader instanceof $Reader))
|
|
27908
|
+
reader = $Reader.create(reader);
|
|
27909
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.DriveLinkData();
|
|
27910
|
+
while (reader.pos < end) {
|
|
27911
|
+
var tag = reader.uint32();
|
|
27912
|
+
switch (tag >>> 3) {
|
|
27913
|
+
case 1: {
|
|
27914
|
+
message.driveDataRef = $root.google.chat.v1.DriveDataRef.decode(reader, reader.uint32());
|
|
27915
|
+
break;
|
|
27916
|
+
}
|
|
27917
|
+
case 2: {
|
|
27918
|
+
message.mimeType = reader.string();
|
|
27919
|
+
break;
|
|
27920
|
+
}
|
|
27921
|
+
default:
|
|
27922
|
+
reader.skipType(tag & 7);
|
|
27923
|
+
break;
|
|
27924
|
+
}
|
|
27925
|
+
}
|
|
27926
|
+
return message;
|
|
27927
|
+
};
|
|
27928
|
+
|
|
27929
|
+
/**
|
|
27930
|
+
* Decodes a DriveLinkData message from the specified reader or buffer, length delimited.
|
|
27931
|
+
* @function decodeDelimited
|
|
27932
|
+
* @memberof google.chat.v1.DriveLinkData
|
|
27933
|
+
* @static
|
|
27934
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
27935
|
+
* @returns {google.chat.v1.DriveLinkData} DriveLinkData
|
|
27936
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
27937
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
27938
|
+
*/
|
|
27939
|
+
DriveLinkData.decodeDelimited = function decodeDelimited(reader) {
|
|
27940
|
+
if (!(reader instanceof $Reader))
|
|
27941
|
+
reader = new $Reader(reader);
|
|
27942
|
+
return this.decode(reader, reader.uint32());
|
|
27943
|
+
};
|
|
27944
|
+
|
|
27945
|
+
/**
|
|
27946
|
+
* Verifies a DriveLinkData message.
|
|
27947
|
+
* @function verify
|
|
27948
|
+
* @memberof google.chat.v1.DriveLinkData
|
|
27949
|
+
* @static
|
|
27950
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
27951
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
27952
|
+
*/
|
|
27953
|
+
DriveLinkData.verify = function verify(message) {
|
|
27954
|
+
if (typeof message !== "object" || message === null)
|
|
27955
|
+
return "object expected";
|
|
27956
|
+
if (message.driveDataRef != null && message.hasOwnProperty("driveDataRef")) {
|
|
27957
|
+
var error = $root.google.chat.v1.DriveDataRef.verify(message.driveDataRef);
|
|
27958
|
+
if (error)
|
|
27959
|
+
return "driveDataRef." + error;
|
|
27960
|
+
}
|
|
27961
|
+
if (message.mimeType != null && message.hasOwnProperty("mimeType"))
|
|
27962
|
+
if (!$util.isString(message.mimeType))
|
|
27963
|
+
return "mimeType: string expected";
|
|
27964
|
+
return null;
|
|
27965
|
+
};
|
|
27966
|
+
|
|
27967
|
+
/**
|
|
27968
|
+
* Creates a DriveLinkData message from a plain object. Also converts values to their respective internal types.
|
|
27969
|
+
* @function fromObject
|
|
27970
|
+
* @memberof google.chat.v1.DriveLinkData
|
|
27971
|
+
* @static
|
|
27972
|
+
* @param {Object.<string,*>} object Plain object
|
|
27973
|
+
* @returns {google.chat.v1.DriveLinkData} DriveLinkData
|
|
27974
|
+
*/
|
|
27975
|
+
DriveLinkData.fromObject = function fromObject(object) {
|
|
27976
|
+
if (object instanceof $root.google.chat.v1.DriveLinkData)
|
|
27977
|
+
return object;
|
|
27978
|
+
var message = new $root.google.chat.v1.DriveLinkData();
|
|
27979
|
+
if (object.driveDataRef != null) {
|
|
27980
|
+
if (typeof object.driveDataRef !== "object")
|
|
27981
|
+
throw TypeError(".google.chat.v1.DriveLinkData.driveDataRef: object expected");
|
|
27982
|
+
message.driveDataRef = $root.google.chat.v1.DriveDataRef.fromObject(object.driveDataRef);
|
|
27983
|
+
}
|
|
27984
|
+
if (object.mimeType != null)
|
|
27985
|
+
message.mimeType = String(object.mimeType);
|
|
27986
|
+
return message;
|
|
27987
|
+
};
|
|
27988
|
+
|
|
27989
|
+
/**
|
|
27990
|
+
* Creates a plain object from a DriveLinkData message. Also converts values to other types if specified.
|
|
27991
|
+
* @function toObject
|
|
27992
|
+
* @memberof google.chat.v1.DriveLinkData
|
|
27993
|
+
* @static
|
|
27994
|
+
* @param {google.chat.v1.DriveLinkData} message DriveLinkData
|
|
27995
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
27996
|
+
* @returns {Object.<string,*>} Plain object
|
|
27997
|
+
*/
|
|
27998
|
+
DriveLinkData.toObject = function toObject(message, options) {
|
|
27999
|
+
if (!options)
|
|
28000
|
+
options = {};
|
|
28001
|
+
var object = {};
|
|
28002
|
+
if (options.defaults) {
|
|
28003
|
+
object.driveDataRef = null;
|
|
28004
|
+
object.mimeType = "";
|
|
28005
|
+
}
|
|
28006
|
+
if (message.driveDataRef != null && message.hasOwnProperty("driveDataRef"))
|
|
28007
|
+
object.driveDataRef = $root.google.chat.v1.DriveDataRef.toObject(message.driveDataRef, options);
|
|
28008
|
+
if (message.mimeType != null && message.hasOwnProperty("mimeType"))
|
|
28009
|
+
object.mimeType = message.mimeType;
|
|
28010
|
+
return object;
|
|
28011
|
+
};
|
|
28012
|
+
|
|
28013
|
+
/**
|
|
28014
|
+
* Converts this DriveLinkData to JSON.
|
|
28015
|
+
* @function toJSON
|
|
28016
|
+
* @memberof google.chat.v1.DriveLinkData
|
|
28017
|
+
* @instance
|
|
28018
|
+
* @returns {Object.<string,*>} JSON object
|
|
28019
|
+
*/
|
|
28020
|
+
DriveLinkData.prototype.toJSON = function toJSON() {
|
|
28021
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
28022
|
+
};
|
|
28023
|
+
|
|
28024
|
+
/**
|
|
28025
|
+
* Gets the default type url for DriveLinkData
|
|
28026
|
+
* @function getTypeUrl
|
|
28027
|
+
* @memberof google.chat.v1.DriveLinkData
|
|
28028
|
+
* @static
|
|
28029
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
28030
|
+
* @returns {string} The default type url
|
|
28031
|
+
*/
|
|
28032
|
+
DriveLinkData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
28033
|
+
if (typeUrlPrefix === undefined) {
|
|
28034
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
28035
|
+
}
|
|
28036
|
+
return typeUrlPrefix + "/google.chat.v1.DriveLinkData";
|
|
28037
|
+
};
|
|
28038
|
+
|
|
28039
|
+
return DriveLinkData;
|
|
28040
|
+
})();
|
|
28041
|
+
|
|
28042
|
+
/**
|
|
28043
|
+
* AnnotationType enum.
|
|
28044
|
+
* @name google.chat.v1.AnnotationType
|
|
28045
|
+
* @enum {number}
|
|
28046
|
+
* @property {number} ANNOTATION_TYPE_UNSPECIFIED=0 ANNOTATION_TYPE_UNSPECIFIED value
|
|
28047
|
+
* @property {number} USER_MENTION=1 USER_MENTION value
|
|
28048
|
+
* @property {number} SLASH_COMMAND=2 SLASH_COMMAND value
|
|
28049
|
+
* @property {number} RICH_LINK=3 RICH_LINK value
|
|
28050
|
+
*/
|
|
28051
|
+
v1.AnnotationType = (function() {
|
|
28052
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
28053
|
+
values[valuesById[0] = "ANNOTATION_TYPE_UNSPECIFIED"] = 0;
|
|
28054
|
+
values[valuesById[1] = "USER_MENTION"] = 1;
|
|
28055
|
+
values[valuesById[2] = "SLASH_COMMAND"] = 2;
|
|
28056
|
+
values[valuesById[3] = "RICH_LINK"] = 3;
|
|
28057
|
+
return values;
|
|
28058
|
+
})();
|
|
28059
|
+
|
|
28060
|
+
v1.Attachment = (function() {
|
|
28061
|
+
|
|
28062
|
+
/**
|
|
28063
|
+
* Properties of an Attachment.
|
|
28064
|
+
* @memberof google.chat.v1
|
|
28065
|
+
* @interface IAttachment
|
|
28066
|
+
* @property {string|null} [name] Attachment name
|
|
28067
|
+
* @property {string|null} [contentName] Attachment contentName
|
|
28068
|
+
* @property {string|null} [contentType] Attachment contentType
|
|
28069
|
+
* @property {google.chat.v1.IAttachmentDataRef|null} [attachmentDataRef] Attachment attachmentDataRef
|
|
28070
|
+
* @property {google.chat.v1.IDriveDataRef|null} [driveDataRef] Attachment driveDataRef
|
|
28071
|
+
* @property {string|null} [thumbnailUri] Attachment thumbnailUri
|
|
28072
|
+
* @property {string|null} [downloadUri] Attachment downloadUri
|
|
28073
|
+
* @property {google.chat.v1.Attachment.Source|null} [source] Attachment source
|
|
28074
|
+
*/
|
|
28075
|
+
|
|
28076
|
+
/**
|
|
28077
|
+
* Constructs a new Attachment.
|
|
28078
|
+
* @memberof google.chat.v1
|
|
28079
|
+
* @classdesc Represents an Attachment.
|
|
28080
|
+
* @implements IAttachment
|
|
28081
|
+
* @constructor
|
|
28082
|
+
* @param {google.chat.v1.IAttachment=} [properties] Properties to set
|
|
28083
|
+
*/
|
|
28084
|
+
function Attachment(properties) {
|
|
28085
|
+
if (properties)
|
|
28086
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
28087
|
+
if (properties[keys[i]] != null)
|
|
28088
|
+
this[keys[i]] = properties[keys[i]];
|
|
28089
|
+
}
|
|
28090
|
+
|
|
28091
|
+
/**
|
|
28092
|
+
* Attachment name.
|
|
28093
|
+
* @member {string} name
|
|
28094
|
+
* @memberof google.chat.v1.Attachment
|
|
28095
|
+
* @instance
|
|
28096
|
+
*/
|
|
28097
|
+
Attachment.prototype.name = "";
|
|
28098
|
+
|
|
28099
|
+
/**
|
|
28100
|
+
* Attachment contentName.
|
|
28101
|
+
* @member {string} contentName
|
|
28102
|
+
* @memberof google.chat.v1.Attachment
|
|
28103
|
+
* @instance
|
|
28104
|
+
*/
|
|
28105
|
+
Attachment.prototype.contentName = "";
|
|
28106
|
+
|
|
28107
|
+
/**
|
|
28108
|
+
* Attachment contentType.
|
|
28109
|
+
* @member {string} contentType
|
|
28110
|
+
* @memberof google.chat.v1.Attachment
|
|
28111
|
+
* @instance
|
|
28112
|
+
*/
|
|
28113
|
+
Attachment.prototype.contentType = "";
|
|
28114
|
+
|
|
28115
|
+
/**
|
|
28116
|
+
* Attachment attachmentDataRef.
|
|
28117
|
+
* @member {google.chat.v1.IAttachmentDataRef|null|undefined} attachmentDataRef
|
|
28118
|
+
* @memberof google.chat.v1.Attachment
|
|
28119
|
+
* @instance
|
|
28120
|
+
*/
|
|
28121
|
+
Attachment.prototype.attachmentDataRef = null;
|
|
28122
|
+
|
|
28123
|
+
/**
|
|
28124
|
+
* Attachment driveDataRef.
|
|
28125
|
+
* @member {google.chat.v1.IDriveDataRef|null|undefined} driveDataRef
|
|
28126
|
+
* @memberof google.chat.v1.Attachment
|
|
28127
|
+
* @instance
|
|
28128
|
+
*/
|
|
28129
|
+
Attachment.prototype.driveDataRef = null;
|
|
28130
|
+
|
|
28131
|
+
/**
|
|
28132
|
+
* Attachment thumbnailUri.
|
|
28133
|
+
* @member {string} thumbnailUri
|
|
28134
|
+
* @memberof google.chat.v1.Attachment
|
|
28135
|
+
* @instance
|
|
28136
|
+
*/
|
|
28137
|
+
Attachment.prototype.thumbnailUri = "";
|
|
28138
|
+
|
|
28139
|
+
/**
|
|
28140
|
+
* Attachment downloadUri.
|
|
28141
|
+
* @member {string} downloadUri
|
|
28142
|
+
* @memberof google.chat.v1.Attachment
|
|
28143
|
+
* @instance
|
|
28144
|
+
*/
|
|
28145
|
+
Attachment.prototype.downloadUri = "";
|
|
28146
|
+
|
|
28147
|
+
/**
|
|
28148
|
+
* Attachment source.
|
|
28149
|
+
* @member {google.chat.v1.Attachment.Source} source
|
|
28150
|
+
* @memberof google.chat.v1.Attachment
|
|
28151
|
+
* @instance
|
|
28152
|
+
*/
|
|
28153
|
+
Attachment.prototype.source = 0;
|
|
28154
|
+
|
|
28155
|
+
// OneOf field names bound to virtual getters and setters
|
|
27602
28156
|
var $oneOfFields;
|
|
27603
28157
|
|
|
27604
28158
|
/**
|
|
@@ -29010,7 +29564,343 @@
|
|
|
29010
29564
|
return typeUrlPrefix + "/google.chat.v1.UploadAttachmentResponse";
|
|
29011
29565
|
};
|
|
29012
29566
|
|
|
29013
|
-
return UploadAttachmentResponse;
|
|
29567
|
+
return UploadAttachmentResponse;
|
|
29568
|
+
})();
|
|
29569
|
+
|
|
29570
|
+
v1.User = (function() {
|
|
29571
|
+
|
|
29572
|
+
/**
|
|
29573
|
+
* Properties of a User.
|
|
29574
|
+
* @memberof google.chat.v1
|
|
29575
|
+
* @interface IUser
|
|
29576
|
+
* @property {string|null} [name] User name
|
|
29577
|
+
* @property {string|null} [displayName] User displayName
|
|
29578
|
+
* @property {string|null} [domainId] User domainId
|
|
29579
|
+
* @property {google.chat.v1.User.Type|null} [type] User type
|
|
29580
|
+
* @property {boolean|null} [isAnonymous] User isAnonymous
|
|
29581
|
+
*/
|
|
29582
|
+
|
|
29583
|
+
/**
|
|
29584
|
+
* Constructs a new User.
|
|
29585
|
+
* @memberof google.chat.v1
|
|
29586
|
+
* @classdesc Represents a User.
|
|
29587
|
+
* @implements IUser
|
|
29588
|
+
* @constructor
|
|
29589
|
+
* @param {google.chat.v1.IUser=} [properties] Properties to set
|
|
29590
|
+
*/
|
|
29591
|
+
function User(properties) {
|
|
29592
|
+
if (properties)
|
|
29593
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
29594
|
+
if (properties[keys[i]] != null)
|
|
29595
|
+
this[keys[i]] = properties[keys[i]];
|
|
29596
|
+
}
|
|
29597
|
+
|
|
29598
|
+
/**
|
|
29599
|
+
* User name.
|
|
29600
|
+
* @member {string} name
|
|
29601
|
+
* @memberof google.chat.v1.User
|
|
29602
|
+
* @instance
|
|
29603
|
+
*/
|
|
29604
|
+
User.prototype.name = "";
|
|
29605
|
+
|
|
29606
|
+
/**
|
|
29607
|
+
* User displayName.
|
|
29608
|
+
* @member {string} displayName
|
|
29609
|
+
* @memberof google.chat.v1.User
|
|
29610
|
+
* @instance
|
|
29611
|
+
*/
|
|
29612
|
+
User.prototype.displayName = "";
|
|
29613
|
+
|
|
29614
|
+
/**
|
|
29615
|
+
* User domainId.
|
|
29616
|
+
* @member {string} domainId
|
|
29617
|
+
* @memberof google.chat.v1.User
|
|
29618
|
+
* @instance
|
|
29619
|
+
*/
|
|
29620
|
+
User.prototype.domainId = "";
|
|
29621
|
+
|
|
29622
|
+
/**
|
|
29623
|
+
* User type.
|
|
29624
|
+
* @member {google.chat.v1.User.Type} type
|
|
29625
|
+
* @memberof google.chat.v1.User
|
|
29626
|
+
* @instance
|
|
29627
|
+
*/
|
|
29628
|
+
User.prototype.type = 0;
|
|
29629
|
+
|
|
29630
|
+
/**
|
|
29631
|
+
* User isAnonymous.
|
|
29632
|
+
* @member {boolean} isAnonymous
|
|
29633
|
+
* @memberof google.chat.v1.User
|
|
29634
|
+
* @instance
|
|
29635
|
+
*/
|
|
29636
|
+
User.prototype.isAnonymous = false;
|
|
29637
|
+
|
|
29638
|
+
/**
|
|
29639
|
+
* Creates a new User instance using the specified properties.
|
|
29640
|
+
* @function create
|
|
29641
|
+
* @memberof google.chat.v1.User
|
|
29642
|
+
* @static
|
|
29643
|
+
* @param {google.chat.v1.IUser=} [properties] Properties to set
|
|
29644
|
+
* @returns {google.chat.v1.User} User instance
|
|
29645
|
+
*/
|
|
29646
|
+
User.create = function create(properties) {
|
|
29647
|
+
return new User(properties);
|
|
29648
|
+
};
|
|
29649
|
+
|
|
29650
|
+
/**
|
|
29651
|
+
* Encodes the specified User message. Does not implicitly {@link google.chat.v1.User.verify|verify} messages.
|
|
29652
|
+
* @function encode
|
|
29653
|
+
* @memberof google.chat.v1.User
|
|
29654
|
+
* @static
|
|
29655
|
+
* @param {google.chat.v1.IUser} message User message or plain object to encode
|
|
29656
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
29657
|
+
* @returns {$protobuf.Writer} Writer
|
|
29658
|
+
*/
|
|
29659
|
+
User.encode = function encode(message, writer) {
|
|
29660
|
+
if (!writer)
|
|
29661
|
+
writer = $Writer.create();
|
|
29662
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
29663
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
29664
|
+
if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
|
|
29665
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName);
|
|
29666
|
+
if (message.type != null && Object.hasOwnProperty.call(message, "type"))
|
|
29667
|
+
writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type);
|
|
29668
|
+
if (message.domainId != null && Object.hasOwnProperty.call(message, "domainId"))
|
|
29669
|
+
writer.uint32(/* id 6, wireType 2 =*/50).string(message.domainId);
|
|
29670
|
+
if (message.isAnonymous != null && Object.hasOwnProperty.call(message, "isAnonymous"))
|
|
29671
|
+
writer.uint32(/* id 7, wireType 0 =*/56).bool(message.isAnonymous);
|
|
29672
|
+
return writer;
|
|
29673
|
+
};
|
|
29674
|
+
|
|
29675
|
+
/**
|
|
29676
|
+
* Encodes the specified User message, length delimited. Does not implicitly {@link google.chat.v1.User.verify|verify} messages.
|
|
29677
|
+
* @function encodeDelimited
|
|
29678
|
+
* @memberof google.chat.v1.User
|
|
29679
|
+
* @static
|
|
29680
|
+
* @param {google.chat.v1.IUser} message User message or plain object to encode
|
|
29681
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
29682
|
+
* @returns {$protobuf.Writer} Writer
|
|
29683
|
+
*/
|
|
29684
|
+
User.encodeDelimited = function encodeDelimited(message, writer) {
|
|
29685
|
+
return this.encode(message, writer).ldelim();
|
|
29686
|
+
};
|
|
29687
|
+
|
|
29688
|
+
/**
|
|
29689
|
+
* Decodes a User message from the specified reader or buffer.
|
|
29690
|
+
* @function decode
|
|
29691
|
+
* @memberof google.chat.v1.User
|
|
29692
|
+
* @static
|
|
29693
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
29694
|
+
* @param {number} [length] Message length if known beforehand
|
|
29695
|
+
* @returns {google.chat.v1.User} User
|
|
29696
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
29697
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
29698
|
+
*/
|
|
29699
|
+
User.decode = function decode(reader, length) {
|
|
29700
|
+
if (!(reader instanceof $Reader))
|
|
29701
|
+
reader = $Reader.create(reader);
|
|
29702
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.User();
|
|
29703
|
+
while (reader.pos < end) {
|
|
29704
|
+
var tag = reader.uint32();
|
|
29705
|
+
switch (tag >>> 3) {
|
|
29706
|
+
case 1: {
|
|
29707
|
+
message.name = reader.string();
|
|
29708
|
+
break;
|
|
29709
|
+
}
|
|
29710
|
+
case 2: {
|
|
29711
|
+
message.displayName = reader.string();
|
|
29712
|
+
break;
|
|
29713
|
+
}
|
|
29714
|
+
case 6: {
|
|
29715
|
+
message.domainId = reader.string();
|
|
29716
|
+
break;
|
|
29717
|
+
}
|
|
29718
|
+
case 5: {
|
|
29719
|
+
message.type = reader.int32();
|
|
29720
|
+
break;
|
|
29721
|
+
}
|
|
29722
|
+
case 7: {
|
|
29723
|
+
message.isAnonymous = reader.bool();
|
|
29724
|
+
break;
|
|
29725
|
+
}
|
|
29726
|
+
default:
|
|
29727
|
+
reader.skipType(tag & 7);
|
|
29728
|
+
break;
|
|
29729
|
+
}
|
|
29730
|
+
}
|
|
29731
|
+
return message;
|
|
29732
|
+
};
|
|
29733
|
+
|
|
29734
|
+
/**
|
|
29735
|
+
* Decodes a User message from the specified reader or buffer, length delimited.
|
|
29736
|
+
* @function decodeDelimited
|
|
29737
|
+
* @memberof google.chat.v1.User
|
|
29738
|
+
* @static
|
|
29739
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
29740
|
+
* @returns {google.chat.v1.User} User
|
|
29741
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
29742
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
29743
|
+
*/
|
|
29744
|
+
User.decodeDelimited = function decodeDelimited(reader) {
|
|
29745
|
+
if (!(reader instanceof $Reader))
|
|
29746
|
+
reader = new $Reader(reader);
|
|
29747
|
+
return this.decode(reader, reader.uint32());
|
|
29748
|
+
};
|
|
29749
|
+
|
|
29750
|
+
/**
|
|
29751
|
+
* Verifies a User message.
|
|
29752
|
+
* @function verify
|
|
29753
|
+
* @memberof google.chat.v1.User
|
|
29754
|
+
* @static
|
|
29755
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
29756
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
29757
|
+
*/
|
|
29758
|
+
User.verify = function verify(message) {
|
|
29759
|
+
if (typeof message !== "object" || message === null)
|
|
29760
|
+
return "object expected";
|
|
29761
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
29762
|
+
if (!$util.isString(message.name))
|
|
29763
|
+
return "name: string expected";
|
|
29764
|
+
if (message.displayName != null && message.hasOwnProperty("displayName"))
|
|
29765
|
+
if (!$util.isString(message.displayName))
|
|
29766
|
+
return "displayName: string expected";
|
|
29767
|
+
if (message.domainId != null && message.hasOwnProperty("domainId"))
|
|
29768
|
+
if (!$util.isString(message.domainId))
|
|
29769
|
+
return "domainId: string expected";
|
|
29770
|
+
if (message.type != null && message.hasOwnProperty("type"))
|
|
29771
|
+
switch (message.type) {
|
|
29772
|
+
default:
|
|
29773
|
+
return "type: enum value expected";
|
|
29774
|
+
case 0:
|
|
29775
|
+
case 1:
|
|
29776
|
+
case 2:
|
|
29777
|
+
break;
|
|
29778
|
+
}
|
|
29779
|
+
if (message.isAnonymous != null && message.hasOwnProperty("isAnonymous"))
|
|
29780
|
+
if (typeof message.isAnonymous !== "boolean")
|
|
29781
|
+
return "isAnonymous: boolean expected";
|
|
29782
|
+
return null;
|
|
29783
|
+
};
|
|
29784
|
+
|
|
29785
|
+
/**
|
|
29786
|
+
* Creates a User message from a plain object. Also converts values to their respective internal types.
|
|
29787
|
+
* @function fromObject
|
|
29788
|
+
* @memberof google.chat.v1.User
|
|
29789
|
+
* @static
|
|
29790
|
+
* @param {Object.<string,*>} object Plain object
|
|
29791
|
+
* @returns {google.chat.v1.User} User
|
|
29792
|
+
*/
|
|
29793
|
+
User.fromObject = function fromObject(object) {
|
|
29794
|
+
if (object instanceof $root.google.chat.v1.User)
|
|
29795
|
+
return object;
|
|
29796
|
+
var message = new $root.google.chat.v1.User();
|
|
29797
|
+
if (object.name != null)
|
|
29798
|
+
message.name = String(object.name);
|
|
29799
|
+
if (object.displayName != null)
|
|
29800
|
+
message.displayName = String(object.displayName);
|
|
29801
|
+
if (object.domainId != null)
|
|
29802
|
+
message.domainId = String(object.domainId);
|
|
29803
|
+
switch (object.type) {
|
|
29804
|
+
default:
|
|
29805
|
+
if (typeof object.type === "number") {
|
|
29806
|
+
message.type = object.type;
|
|
29807
|
+
break;
|
|
29808
|
+
}
|
|
29809
|
+
break;
|
|
29810
|
+
case "TYPE_UNSPECIFIED":
|
|
29811
|
+
case 0:
|
|
29812
|
+
message.type = 0;
|
|
29813
|
+
break;
|
|
29814
|
+
case "HUMAN":
|
|
29815
|
+
case 1:
|
|
29816
|
+
message.type = 1;
|
|
29817
|
+
break;
|
|
29818
|
+
case "BOT":
|
|
29819
|
+
case 2:
|
|
29820
|
+
message.type = 2;
|
|
29821
|
+
break;
|
|
29822
|
+
}
|
|
29823
|
+
if (object.isAnonymous != null)
|
|
29824
|
+
message.isAnonymous = Boolean(object.isAnonymous);
|
|
29825
|
+
return message;
|
|
29826
|
+
};
|
|
29827
|
+
|
|
29828
|
+
/**
|
|
29829
|
+
* Creates a plain object from a User message. Also converts values to other types if specified.
|
|
29830
|
+
* @function toObject
|
|
29831
|
+
* @memberof google.chat.v1.User
|
|
29832
|
+
* @static
|
|
29833
|
+
* @param {google.chat.v1.User} message User
|
|
29834
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
29835
|
+
* @returns {Object.<string,*>} Plain object
|
|
29836
|
+
*/
|
|
29837
|
+
User.toObject = function toObject(message, options) {
|
|
29838
|
+
if (!options)
|
|
29839
|
+
options = {};
|
|
29840
|
+
var object = {};
|
|
29841
|
+
if (options.defaults) {
|
|
29842
|
+
object.name = "";
|
|
29843
|
+
object.displayName = "";
|
|
29844
|
+
object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0;
|
|
29845
|
+
object.domainId = "";
|
|
29846
|
+
object.isAnonymous = false;
|
|
29847
|
+
}
|
|
29848
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
29849
|
+
object.name = message.name;
|
|
29850
|
+
if (message.displayName != null && message.hasOwnProperty("displayName"))
|
|
29851
|
+
object.displayName = message.displayName;
|
|
29852
|
+
if (message.type != null && message.hasOwnProperty("type"))
|
|
29853
|
+
object.type = options.enums === String ? $root.google.chat.v1.User.Type[message.type] === undefined ? message.type : $root.google.chat.v1.User.Type[message.type] : message.type;
|
|
29854
|
+
if (message.domainId != null && message.hasOwnProperty("domainId"))
|
|
29855
|
+
object.domainId = message.domainId;
|
|
29856
|
+
if (message.isAnonymous != null && message.hasOwnProperty("isAnonymous"))
|
|
29857
|
+
object.isAnonymous = message.isAnonymous;
|
|
29858
|
+
return object;
|
|
29859
|
+
};
|
|
29860
|
+
|
|
29861
|
+
/**
|
|
29862
|
+
* Converts this User to JSON.
|
|
29863
|
+
* @function toJSON
|
|
29864
|
+
* @memberof google.chat.v1.User
|
|
29865
|
+
* @instance
|
|
29866
|
+
* @returns {Object.<string,*>} JSON object
|
|
29867
|
+
*/
|
|
29868
|
+
User.prototype.toJSON = function toJSON() {
|
|
29869
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
29870
|
+
};
|
|
29871
|
+
|
|
29872
|
+
/**
|
|
29873
|
+
* Gets the default type url for User
|
|
29874
|
+
* @function getTypeUrl
|
|
29875
|
+
* @memberof google.chat.v1.User
|
|
29876
|
+
* @static
|
|
29877
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
29878
|
+
* @returns {string} The default type url
|
|
29879
|
+
*/
|
|
29880
|
+
User.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
29881
|
+
if (typeUrlPrefix === undefined) {
|
|
29882
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
29883
|
+
}
|
|
29884
|
+
return typeUrlPrefix + "/google.chat.v1.User";
|
|
29885
|
+
};
|
|
29886
|
+
|
|
29887
|
+
/**
|
|
29888
|
+
* Type enum.
|
|
29889
|
+
* @name google.chat.v1.User.Type
|
|
29890
|
+
* @enum {number}
|
|
29891
|
+
* @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value
|
|
29892
|
+
* @property {number} HUMAN=1 HUMAN value
|
|
29893
|
+
* @property {number} BOT=2 BOT value
|
|
29894
|
+
*/
|
|
29895
|
+
User.Type = (function() {
|
|
29896
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
29897
|
+
values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0;
|
|
29898
|
+
values[valuesById[1] = "HUMAN"] = 1;
|
|
29899
|
+
values[valuesById[2] = "BOT"] = 2;
|
|
29900
|
+
return values;
|
|
29901
|
+
})();
|
|
29902
|
+
|
|
29903
|
+
return User;
|
|
29014
29904
|
})();
|
|
29015
29905
|
|
|
29016
29906
|
v1.ChatService = (function() {
|
|
@@ -29639,6 +30529,39 @@
|
|
|
29639
30529
|
* @variation 2
|
|
29640
30530
|
*/
|
|
29641
30531
|
|
|
30532
|
+
/**
|
|
30533
|
+
* Callback as used by {@link google.chat.v1.ChatService|updateMembership}.
|
|
30534
|
+
* @memberof google.chat.v1.ChatService
|
|
30535
|
+
* @typedef UpdateMembershipCallback
|
|
30536
|
+
* @type {function}
|
|
30537
|
+
* @param {Error|null} error Error, if any
|
|
30538
|
+
* @param {google.chat.v1.Membership} [response] Membership
|
|
30539
|
+
*/
|
|
30540
|
+
|
|
30541
|
+
/**
|
|
30542
|
+
* Calls UpdateMembership.
|
|
30543
|
+
* @function updateMembership
|
|
30544
|
+
* @memberof google.chat.v1.ChatService
|
|
30545
|
+
* @instance
|
|
30546
|
+
* @param {google.chat.v1.IUpdateMembershipRequest} request UpdateMembershipRequest message or plain object
|
|
30547
|
+
* @param {google.chat.v1.ChatService.UpdateMembershipCallback} callback Node-style callback called with the error, if any, and Membership
|
|
30548
|
+
* @returns {undefined}
|
|
30549
|
+
* @variation 1
|
|
30550
|
+
*/
|
|
30551
|
+
Object.defineProperty(ChatService.prototype.updateMembership = function updateMembership(request, callback) {
|
|
30552
|
+
return this.rpcCall(updateMembership, $root.google.chat.v1.UpdateMembershipRequest, $root.google.chat.v1.Membership, request, callback);
|
|
30553
|
+
}, "name", { value: "UpdateMembership" });
|
|
30554
|
+
|
|
30555
|
+
/**
|
|
30556
|
+
* Calls UpdateMembership.
|
|
30557
|
+
* @function updateMembership
|
|
30558
|
+
* @memberof google.chat.v1.ChatService
|
|
30559
|
+
* @instance
|
|
30560
|
+
* @param {google.chat.v1.IUpdateMembershipRequest} request UpdateMembershipRequest message or plain object
|
|
30561
|
+
* @returns {Promise<google.chat.v1.Membership>} Promise
|
|
30562
|
+
* @variation 2
|
|
30563
|
+
*/
|
|
30564
|
+
|
|
29642
30565
|
/**
|
|
29643
30566
|
* Callback as used by {@link google.chat.v1.ChatService|deleteMembership}.
|
|
29644
30567
|
* @memberof google.chat.v1.ChatService
|
|
@@ -30261,14 +31184,246 @@
|
|
|
30261
31184
|
*/
|
|
30262
31185
|
|
|
30263
31186
|
/**
|
|
30264
|
-
* Constructs a new CreateMembershipRequest.
|
|
31187
|
+
* Constructs a new CreateMembershipRequest.
|
|
31188
|
+
* @memberof google.chat.v1
|
|
31189
|
+
* @classdesc Represents a CreateMembershipRequest.
|
|
31190
|
+
* @implements ICreateMembershipRequest
|
|
31191
|
+
* @constructor
|
|
31192
|
+
* @param {google.chat.v1.ICreateMembershipRequest=} [properties] Properties to set
|
|
31193
|
+
*/
|
|
31194
|
+
function CreateMembershipRequest(properties) {
|
|
31195
|
+
if (properties)
|
|
31196
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
31197
|
+
if (properties[keys[i]] != null)
|
|
31198
|
+
this[keys[i]] = properties[keys[i]];
|
|
31199
|
+
}
|
|
31200
|
+
|
|
31201
|
+
/**
|
|
31202
|
+
* CreateMembershipRequest parent.
|
|
31203
|
+
* @member {string} parent
|
|
31204
|
+
* @memberof google.chat.v1.CreateMembershipRequest
|
|
31205
|
+
* @instance
|
|
31206
|
+
*/
|
|
31207
|
+
CreateMembershipRequest.prototype.parent = "";
|
|
31208
|
+
|
|
31209
|
+
/**
|
|
31210
|
+
* CreateMembershipRequest membership.
|
|
31211
|
+
* @member {google.chat.v1.IMembership|null|undefined} membership
|
|
31212
|
+
* @memberof google.chat.v1.CreateMembershipRequest
|
|
31213
|
+
* @instance
|
|
31214
|
+
*/
|
|
31215
|
+
CreateMembershipRequest.prototype.membership = null;
|
|
31216
|
+
|
|
31217
|
+
/**
|
|
31218
|
+
* Creates a new CreateMembershipRequest instance using the specified properties.
|
|
31219
|
+
* @function create
|
|
31220
|
+
* @memberof google.chat.v1.CreateMembershipRequest
|
|
31221
|
+
* @static
|
|
31222
|
+
* @param {google.chat.v1.ICreateMembershipRequest=} [properties] Properties to set
|
|
31223
|
+
* @returns {google.chat.v1.CreateMembershipRequest} CreateMembershipRequest instance
|
|
31224
|
+
*/
|
|
31225
|
+
CreateMembershipRequest.create = function create(properties) {
|
|
31226
|
+
return new CreateMembershipRequest(properties);
|
|
31227
|
+
};
|
|
31228
|
+
|
|
31229
|
+
/**
|
|
31230
|
+
* Encodes the specified CreateMembershipRequest message. Does not implicitly {@link google.chat.v1.CreateMembershipRequest.verify|verify} messages.
|
|
31231
|
+
* @function encode
|
|
31232
|
+
* @memberof google.chat.v1.CreateMembershipRequest
|
|
31233
|
+
* @static
|
|
31234
|
+
* @param {google.chat.v1.ICreateMembershipRequest} message CreateMembershipRequest message or plain object to encode
|
|
31235
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
31236
|
+
* @returns {$protobuf.Writer} Writer
|
|
31237
|
+
*/
|
|
31238
|
+
CreateMembershipRequest.encode = function encode(message, writer) {
|
|
31239
|
+
if (!writer)
|
|
31240
|
+
writer = $Writer.create();
|
|
31241
|
+
if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
|
|
31242
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
|
|
31243
|
+
if (message.membership != null && Object.hasOwnProperty.call(message, "membership"))
|
|
31244
|
+
$root.google.chat.v1.Membership.encode(message.membership, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
31245
|
+
return writer;
|
|
31246
|
+
};
|
|
31247
|
+
|
|
31248
|
+
/**
|
|
31249
|
+
* Encodes the specified CreateMembershipRequest message, length delimited. Does not implicitly {@link google.chat.v1.CreateMembershipRequest.verify|verify} messages.
|
|
31250
|
+
* @function encodeDelimited
|
|
31251
|
+
* @memberof google.chat.v1.CreateMembershipRequest
|
|
31252
|
+
* @static
|
|
31253
|
+
* @param {google.chat.v1.ICreateMembershipRequest} message CreateMembershipRequest message or plain object to encode
|
|
31254
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
31255
|
+
* @returns {$protobuf.Writer} Writer
|
|
31256
|
+
*/
|
|
31257
|
+
CreateMembershipRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
31258
|
+
return this.encode(message, writer).ldelim();
|
|
31259
|
+
};
|
|
31260
|
+
|
|
31261
|
+
/**
|
|
31262
|
+
* Decodes a CreateMembershipRequest message from the specified reader or buffer.
|
|
31263
|
+
* @function decode
|
|
31264
|
+
* @memberof google.chat.v1.CreateMembershipRequest
|
|
31265
|
+
* @static
|
|
31266
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
31267
|
+
* @param {number} [length] Message length if known beforehand
|
|
31268
|
+
* @returns {google.chat.v1.CreateMembershipRequest} CreateMembershipRequest
|
|
31269
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
31270
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
31271
|
+
*/
|
|
31272
|
+
CreateMembershipRequest.decode = function decode(reader, length) {
|
|
31273
|
+
if (!(reader instanceof $Reader))
|
|
31274
|
+
reader = $Reader.create(reader);
|
|
31275
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.CreateMembershipRequest();
|
|
31276
|
+
while (reader.pos < end) {
|
|
31277
|
+
var tag = reader.uint32();
|
|
31278
|
+
switch (tag >>> 3) {
|
|
31279
|
+
case 1: {
|
|
31280
|
+
message.parent = reader.string();
|
|
31281
|
+
break;
|
|
31282
|
+
}
|
|
31283
|
+
case 2: {
|
|
31284
|
+
message.membership = $root.google.chat.v1.Membership.decode(reader, reader.uint32());
|
|
31285
|
+
break;
|
|
31286
|
+
}
|
|
31287
|
+
default:
|
|
31288
|
+
reader.skipType(tag & 7);
|
|
31289
|
+
break;
|
|
31290
|
+
}
|
|
31291
|
+
}
|
|
31292
|
+
return message;
|
|
31293
|
+
};
|
|
31294
|
+
|
|
31295
|
+
/**
|
|
31296
|
+
* Decodes a CreateMembershipRequest message from the specified reader or buffer, length delimited.
|
|
31297
|
+
* @function decodeDelimited
|
|
31298
|
+
* @memberof google.chat.v1.CreateMembershipRequest
|
|
31299
|
+
* @static
|
|
31300
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
31301
|
+
* @returns {google.chat.v1.CreateMembershipRequest} CreateMembershipRequest
|
|
31302
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
31303
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
31304
|
+
*/
|
|
31305
|
+
CreateMembershipRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
31306
|
+
if (!(reader instanceof $Reader))
|
|
31307
|
+
reader = new $Reader(reader);
|
|
31308
|
+
return this.decode(reader, reader.uint32());
|
|
31309
|
+
};
|
|
31310
|
+
|
|
31311
|
+
/**
|
|
31312
|
+
* Verifies a CreateMembershipRequest message.
|
|
31313
|
+
* @function verify
|
|
31314
|
+
* @memberof google.chat.v1.CreateMembershipRequest
|
|
31315
|
+
* @static
|
|
31316
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
31317
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
31318
|
+
*/
|
|
31319
|
+
CreateMembershipRequest.verify = function verify(message) {
|
|
31320
|
+
if (typeof message !== "object" || message === null)
|
|
31321
|
+
return "object expected";
|
|
31322
|
+
if (message.parent != null && message.hasOwnProperty("parent"))
|
|
31323
|
+
if (!$util.isString(message.parent))
|
|
31324
|
+
return "parent: string expected";
|
|
31325
|
+
if (message.membership != null && message.hasOwnProperty("membership")) {
|
|
31326
|
+
var error = $root.google.chat.v1.Membership.verify(message.membership);
|
|
31327
|
+
if (error)
|
|
31328
|
+
return "membership." + error;
|
|
31329
|
+
}
|
|
31330
|
+
return null;
|
|
31331
|
+
};
|
|
31332
|
+
|
|
31333
|
+
/**
|
|
31334
|
+
* Creates a CreateMembershipRequest message from a plain object. Also converts values to their respective internal types.
|
|
31335
|
+
* @function fromObject
|
|
31336
|
+
* @memberof google.chat.v1.CreateMembershipRequest
|
|
31337
|
+
* @static
|
|
31338
|
+
* @param {Object.<string,*>} object Plain object
|
|
31339
|
+
* @returns {google.chat.v1.CreateMembershipRequest} CreateMembershipRequest
|
|
31340
|
+
*/
|
|
31341
|
+
CreateMembershipRequest.fromObject = function fromObject(object) {
|
|
31342
|
+
if (object instanceof $root.google.chat.v1.CreateMembershipRequest)
|
|
31343
|
+
return object;
|
|
31344
|
+
var message = new $root.google.chat.v1.CreateMembershipRequest();
|
|
31345
|
+
if (object.parent != null)
|
|
31346
|
+
message.parent = String(object.parent);
|
|
31347
|
+
if (object.membership != null) {
|
|
31348
|
+
if (typeof object.membership !== "object")
|
|
31349
|
+
throw TypeError(".google.chat.v1.CreateMembershipRequest.membership: object expected");
|
|
31350
|
+
message.membership = $root.google.chat.v1.Membership.fromObject(object.membership);
|
|
31351
|
+
}
|
|
31352
|
+
return message;
|
|
31353
|
+
};
|
|
31354
|
+
|
|
31355
|
+
/**
|
|
31356
|
+
* Creates a plain object from a CreateMembershipRequest message. Also converts values to other types if specified.
|
|
31357
|
+
* @function toObject
|
|
31358
|
+
* @memberof google.chat.v1.CreateMembershipRequest
|
|
31359
|
+
* @static
|
|
31360
|
+
* @param {google.chat.v1.CreateMembershipRequest} message CreateMembershipRequest
|
|
31361
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
31362
|
+
* @returns {Object.<string,*>} Plain object
|
|
31363
|
+
*/
|
|
31364
|
+
CreateMembershipRequest.toObject = function toObject(message, options) {
|
|
31365
|
+
if (!options)
|
|
31366
|
+
options = {};
|
|
31367
|
+
var object = {};
|
|
31368
|
+
if (options.defaults) {
|
|
31369
|
+
object.parent = "";
|
|
31370
|
+
object.membership = null;
|
|
31371
|
+
}
|
|
31372
|
+
if (message.parent != null && message.hasOwnProperty("parent"))
|
|
31373
|
+
object.parent = message.parent;
|
|
31374
|
+
if (message.membership != null && message.hasOwnProperty("membership"))
|
|
31375
|
+
object.membership = $root.google.chat.v1.Membership.toObject(message.membership, options);
|
|
31376
|
+
return object;
|
|
31377
|
+
};
|
|
31378
|
+
|
|
31379
|
+
/**
|
|
31380
|
+
* Converts this CreateMembershipRequest to JSON.
|
|
31381
|
+
* @function toJSON
|
|
31382
|
+
* @memberof google.chat.v1.CreateMembershipRequest
|
|
31383
|
+
* @instance
|
|
31384
|
+
* @returns {Object.<string,*>} JSON object
|
|
31385
|
+
*/
|
|
31386
|
+
CreateMembershipRequest.prototype.toJSON = function toJSON() {
|
|
31387
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
31388
|
+
};
|
|
31389
|
+
|
|
31390
|
+
/**
|
|
31391
|
+
* Gets the default type url for CreateMembershipRequest
|
|
31392
|
+
* @function getTypeUrl
|
|
31393
|
+
* @memberof google.chat.v1.CreateMembershipRequest
|
|
31394
|
+
* @static
|
|
31395
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
31396
|
+
* @returns {string} The default type url
|
|
31397
|
+
*/
|
|
31398
|
+
CreateMembershipRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
31399
|
+
if (typeUrlPrefix === undefined) {
|
|
31400
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
31401
|
+
}
|
|
31402
|
+
return typeUrlPrefix + "/google.chat.v1.CreateMembershipRequest";
|
|
31403
|
+
};
|
|
31404
|
+
|
|
31405
|
+
return CreateMembershipRequest;
|
|
31406
|
+
})();
|
|
31407
|
+
|
|
31408
|
+
v1.UpdateMembershipRequest = (function() {
|
|
31409
|
+
|
|
31410
|
+
/**
|
|
31411
|
+
* Properties of an UpdateMembershipRequest.
|
|
31412
|
+
* @memberof google.chat.v1
|
|
31413
|
+
* @interface IUpdateMembershipRequest
|
|
31414
|
+
* @property {google.chat.v1.IMembership|null} [membership] UpdateMembershipRequest membership
|
|
31415
|
+
* @property {google.protobuf.IFieldMask|null} [updateMask] UpdateMembershipRequest updateMask
|
|
31416
|
+
*/
|
|
31417
|
+
|
|
31418
|
+
/**
|
|
31419
|
+
* Constructs a new UpdateMembershipRequest.
|
|
30265
31420
|
* @memberof google.chat.v1
|
|
30266
|
-
* @classdesc Represents
|
|
30267
|
-
* @implements
|
|
31421
|
+
* @classdesc Represents an UpdateMembershipRequest.
|
|
31422
|
+
* @implements IUpdateMembershipRequest
|
|
30268
31423
|
* @constructor
|
|
30269
|
-
* @param {google.chat.v1.
|
|
31424
|
+
* @param {google.chat.v1.IUpdateMembershipRequest=} [properties] Properties to set
|
|
30270
31425
|
*/
|
|
30271
|
-
function
|
|
31426
|
+
function UpdateMembershipRequest(properties) {
|
|
30272
31427
|
if (properties)
|
|
30273
31428
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
30274
31429
|
if (properties[keys[i]] != null)
|
|
@@ -30276,89 +31431,89 @@
|
|
|
30276
31431
|
}
|
|
30277
31432
|
|
|
30278
31433
|
/**
|
|
30279
|
-
*
|
|
30280
|
-
* @member {
|
|
30281
|
-
* @memberof google.chat.v1.
|
|
31434
|
+
* UpdateMembershipRequest membership.
|
|
31435
|
+
* @member {google.chat.v1.IMembership|null|undefined} membership
|
|
31436
|
+
* @memberof google.chat.v1.UpdateMembershipRequest
|
|
30282
31437
|
* @instance
|
|
30283
31438
|
*/
|
|
30284
|
-
|
|
31439
|
+
UpdateMembershipRequest.prototype.membership = null;
|
|
30285
31440
|
|
|
30286
31441
|
/**
|
|
30287
|
-
*
|
|
30288
|
-
* @member {google.
|
|
30289
|
-
* @memberof google.chat.v1.
|
|
31442
|
+
* UpdateMembershipRequest updateMask.
|
|
31443
|
+
* @member {google.protobuf.IFieldMask|null|undefined} updateMask
|
|
31444
|
+
* @memberof google.chat.v1.UpdateMembershipRequest
|
|
30290
31445
|
* @instance
|
|
30291
31446
|
*/
|
|
30292
|
-
|
|
31447
|
+
UpdateMembershipRequest.prototype.updateMask = null;
|
|
30293
31448
|
|
|
30294
31449
|
/**
|
|
30295
|
-
* Creates a new
|
|
31450
|
+
* Creates a new UpdateMembershipRequest instance using the specified properties.
|
|
30296
31451
|
* @function create
|
|
30297
|
-
* @memberof google.chat.v1.
|
|
31452
|
+
* @memberof google.chat.v1.UpdateMembershipRequest
|
|
30298
31453
|
* @static
|
|
30299
|
-
* @param {google.chat.v1.
|
|
30300
|
-
* @returns {google.chat.v1.
|
|
31454
|
+
* @param {google.chat.v1.IUpdateMembershipRequest=} [properties] Properties to set
|
|
31455
|
+
* @returns {google.chat.v1.UpdateMembershipRequest} UpdateMembershipRequest instance
|
|
30301
31456
|
*/
|
|
30302
|
-
|
|
30303
|
-
return new
|
|
31457
|
+
UpdateMembershipRequest.create = function create(properties) {
|
|
31458
|
+
return new UpdateMembershipRequest(properties);
|
|
30304
31459
|
};
|
|
30305
31460
|
|
|
30306
31461
|
/**
|
|
30307
|
-
* Encodes the specified
|
|
31462
|
+
* Encodes the specified UpdateMembershipRequest message. Does not implicitly {@link google.chat.v1.UpdateMembershipRequest.verify|verify} messages.
|
|
30308
31463
|
* @function encode
|
|
30309
|
-
* @memberof google.chat.v1.
|
|
31464
|
+
* @memberof google.chat.v1.UpdateMembershipRequest
|
|
30310
31465
|
* @static
|
|
30311
|
-
* @param {google.chat.v1.
|
|
31466
|
+
* @param {google.chat.v1.IUpdateMembershipRequest} message UpdateMembershipRequest message or plain object to encode
|
|
30312
31467
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
30313
31468
|
* @returns {$protobuf.Writer} Writer
|
|
30314
31469
|
*/
|
|
30315
|
-
|
|
31470
|
+
UpdateMembershipRequest.encode = function encode(message, writer) {
|
|
30316
31471
|
if (!writer)
|
|
30317
31472
|
writer = $Writer.create();
|
|
30318
|
-
if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
|
|
30319
|
-
writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
|
|
30320
31473
|
if (message.membership != null && Object.hasOwnProperty.call(message, "membership"))
|
|
30321
|
-
$root.google.chat.v1.Membership.encode(message.membership, writer.uint32(/* id
|
|
31474
|
+
$root.google.chat.v1.Membership.encode(message.membership, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
31475
|
+
if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask"))
|
|
31476
|
+
$root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
30322
31477
|
return writer;
|
|
30323
31478
|
};
|
|
30324
31479
|
|
|
30325
31480
|
/**
|
|
30326
|
-
* Encodes the specified
|
|
31481
|
+
* Encodes the specified UpdateMembershipRequest message, length delimited. Does not implicitly {@link google.chat.v1.UpdateMembershipRequest.verify|verify} messages.
|
|
30327
31482
|
* @function encodeDelimited
|
|
30328
|
-
* @memberof google.chat.v1.
|
|
31483
|
+
* @memberof google.chat.v1.UpdateMembershipRequest
|
|
30329
31484
|
* @static
|
|
30330
|
-
* @param {google.chat.v1.
|
|
31485
|
+
* @param {google.chat.v1.IUpdateMembershipRequest} message UpdateMembershipRequest message or plain object to encode
|
|
30331
31486
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
30332
31487
|
* @returns {$protobuf.Writer} Writer
|
|
30333
31488
|
*/
|
|
30334
|
-
|
|
31489
|
+
UpdateMembershipRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
30335
31490
|
return this.encode(message, writer).ldelim();
|
|
30336
31491
|
};
|
|
30337
31492
|
|
|
30338
31493
|
/**
|
|
30339
|
-
* Decodes
|
|
31494
|
+
* Decodes an UpdateMembershipRequest message from the specified reader or buffer.
|
|
30340
31495
|
* @function decode
|
|
30341
|
-
* @memberof google.chat.v1.
|
|
31496
|
+
* @memberof google.chat.v1.UpdateMembershipRequest
|
|
30342
31497
|
* @static
|
|
30343
31498
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
30344
31499
|
* @param {number} [length] Message length if known beforehand
|
|
30345
|
-
* @returns {google.chat.v1.
|
|
31500
|
+
* @returns {google.chat.v1.UpdateMembershipRequest} UpdateMembershipRequest
|
|
30346
31501
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
30347
31502
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
30348
31503
|
*/
|
|
30349
|
-
|
|
31504
|
+
UpdateMembershipRequest.decode = function decode(reader, length) {
|
|
30350
31505
|
if (!(reader instanceof $Reader))
|
|
30351
31506
|
reader = $Reader.create(reader);
|
|
30352
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.
|
|
31507
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.UpdateMembershipRequest();
|
|
30353
31508
|
while (reader.pos < end) {
|
|
30354
31509
|
var tag = reader.uint32();
|
|
30355
31510
|
switch (tag >>> 3) {
|
|
30356
31511
|
case 1: {
|
|
30357
|
-
message.
|
|
31512
|
+
message.membership = $root.google.chat.v1.Membership.decode(reader, reader.uint32());
|
|
30358
31513
|
break;
|
|
30359
31514
|
}
|
|
30360
31515
|
case 2: {
|
|
30361
|
-
message.
|
|
31516
|
+
message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
|
|
30362
31517
|
break;
|
|
30363
31518
|
}
|
|
30364
31519
|
default:
|
|
@@ -30370,116 +31525,121 @@
|
|
|
30370
31525
|
};
|
|
30371
31526
|
|
|
30372
31527
|
/**
|
|
30373
|
-
* Decodes
|
|
31528
|
+
* Decodes an UpdateMembershipRequest message from the specified reader or buffer, length delimited.
|
|
30374
31529
|
* @function decodeDelimited
|
|
30375
|
-
* @memberof google.chat.v1.
|
|
31530
|
+
* @memberof google.chat.v1.UpdateMembershipRequest
|
|
30376
31531
|
* @static
|
|
30377
31532
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
30378
|
-
* @returns {google.chat.v1.
|
|
31533
|
+
* @returns {google.chat.v1.UpdateMembershipRequest} UpdateMembershipRequest
|
|
30379
31534
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
30380
31535
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
30381
31536
|
*/
|
|
30382
|
-
|
|
31537
|
+
UpdateMembershipRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
30383
31538
|
if (!(reader instanceof $Reader))
|
|
30384
31539
|
reader = new $Reader(reader);
|
|
30385
31540
|
return this.decode(reader, reader.uint32());
|
|
30386
31541
|
};
|
|
30387
31542
|
|
|
30388
31543
|
/**
|
|
30389
|
-
* Verifies
|
|
31544
|
+
* Verifies an UpdateMembershipRequest message.
|
|
30390
31545
|
* @function verify
|
|
30391
|
-
* @memberof google.chat.v1.
|
|
31546
|
+
* @memberof google.chat.v1.UpdateMembershipRequest
|
|
30392
31547
|
* @static
|
|
30393
31548
|
* @param {Object.<string,*>} message Plain object to verify
|
|
30394
31549
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
30395
31550
|
*/
|
|
30396
|
-
|
|
31551
|
+
UpdateMembershipRequest.verify = function verify(message) {
|
|
30397
31552
|
if (typeof message !== "object" || message === null)
|
|
30398
31553
|
return "object expected";
|
|
30399
|
-
if (message.parent != null && message.hasOwnProperty("parent"))
|
|
30400
|
-
if (!$util.isString(message.parent))
|
|
30401
|
-
return "parent: string expected";
|
|
30402
31554
|
if (message.membership != null && message.hasOwnProperty("membership")) {
|
|
30403
31555
|
var error = $root.google.chat.v1.Membership.verify(message.membership);
|
|
30404
31556
|
if (error)
|
|
30405
31557
|
return "membership." + error;
|
|
30406
31558
|
}
|
|
31559
|
+
if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
|
|
31560
|
+
var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
|
|
31561
|
+
if (error)
|
|
31562
|
+
return "updateMask." + error;
|
|
31563
|
+
}
|
|
30407
31564
|
return null;
|
|
30408
31565
|
};
|
|
30409
31566
|
|
|
30410
31567
|
/**
|
|
30411
|
-
* Creates
|
|
31568
|
+
* Creates an UpdateMembershipRequest message from a plain object. Also converts values to their respective internal types.
|
|
30412
31569
|
* @function fromObject
|
|
30413
|
-
* @memberof google.chat.v1.
|
|
31570
|
+
* @memberof google.chat.v1.UpdateMembershipRequest
|
|
30414
31571
|
* @static
|
|
30415
31572
|
* @param {Object.<string,*>} object Plain object
|
|
30416
|
-
* @returns {google.chat.v1.
|
|
31573
|
+
* @returns {google.chat.v1.UpdateMembershipRequest} UpdateMembershipRequest
|
|
30417
31574
|
*/
|
|
30418
|
-
|
|
30419
|
-
if (object instanceof $root.google.chat.v1.
|
|
31575
|
+
UpdateMembershipRequest.fromObject = function fromObject(object) {
|
|
31576
|
+
if (object instanceof $root.google.chat.v1.UpdateMembershipRequest)
|
|
30420
31577
|
return object;
|
|
30421
|
-
var message = new $root.google.chat.v1.
|
|
30422
|
-
if (object.parent != null)
|
|
30423
|
-
message.parent = String(object.parent);
|
|
31578
|
+
var message = new $root.google.chat.v1.UpdateMembershipRequest();
|
|
30424
31579
|
if (object.membership != null) {
|
|
30425
31580
|
if (typeof object.membership !== "object")
|
|
30426
|
-
throw TypeError(".google.chat.v1.
|
|
31581
|
+
throw TypeError(".google.chat.v1.UpdateMembershipRequest.membership: object expected");
|
|
30427
31582
|
message.membership = $root.google.chat.v1.Membership.fromObject(object.membership);
|
|
30428
31583
|
}
|
|
31584
|
+
if (object.updateMask != null) {
|
|
31585
|
+
if (typeof object.updateMask !== "object")
|
|
31586
|
+
throw TypeError(".google.chat.v1.UpdateMembershipRequest.updateMask: object expected");
|
|
31587
|
+
message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
|
|
31588
|
+
}
|
|
30429
31589
|
return message;
|
|
30430
31590
|
};
|
|
30431
31591
|
|
|
30432
31592
|
/**
|
|
30433
|
-
* Creates a plain object from
|
|
31593
|
+
* Creates a plain object from an UpdateMembershipRequest message. Also converts values to other types if specified.
|
|
30434
31594
|
* @function toObject
|
|
30435
|
-
* @memberof google.chat.v1.
|
|
31595
|
+
* @memberof google.chat.v1.UpdateMembershipRequest
|
|
30436
31596
|
* @static
|
|
30437
|
-
* @param {google.chat.v1.
|
|
31597
|
+
* @param {google.chat.v1.UpdateMembershipRequest} message UpdateMembershipRequest
|
|
30438
31598
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
30439
31599
|
* @returns {Object.<string,*>} Plain object
|
|
30440
31600
|
*/
|
|
30441
|
-
|
|
31601
|
+
UpdateMembershipRequest.toObject = function toObject(message, options) {
|
|
30442
31602
|
if (!options)
|
|
30443
31603
|
options = {};
|
|
30444
31604
|
var object = {};
|
|
30445
31605
|
if (options.defaults) {
|
|
30446
|
-
object.parent = "";
|
|
30447
31606
|
object.membership = null;
|
|
31607
|
+
object.updateMask = null;
|
|
30448
31608
|
}
|
|
30449
|
-
if (message.parent != null && message.hasOwnProperty("parent"))
|
|
30450
|
-
object.parent = message.parent;
|
|
30451
31609
|
if (message.membership != null && message.hasOwnProperty("membership"))
|
|
30452
31610
|
object.membership = $root.google.chat.v1.Membership.toObject(message.membership, options);
|
|
31611
|
+
if (message.updateMask != null && message.hasOwnProperty("updateMask"))
|
|
31612
|
+
object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
|
|
30453
31613
|
return object;
|
|
30454
31614
|
};
|
|
30455
31615
|
|
|
30456
31616
|
/**
|
|
30457
|
-
* Converts this
|
|
31617
|
+
* Converts this UpdateMembershipRequest to JSON.
|
|
30458
31618
|
* @function toJSON
|
|
30459
|
-
* @memberof google.chat.v1.
|
|
31619
|
+
* @memberof google.chat.v1.UpdateMembershipRequest
|
|
30460
31620
|
* @instance
|
|
30461
31621
|
* @returns {Object.<string,*>} JSON object
|
|
30462
31622
|
*/
|
|
30463
|
-
|
|
31623
|
+
UpdateMembershipRequest.prototype.toJSON = function toJSON() {
|
|
30464
31624
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
30465
31625
|
};
|
|
30466
31626
|
|
|
30467
31627
|
/**
|
|
30468
|
-
* Gets the default type url for
|
|
31628
|
+
* Gets the default type url for UpdateMembershipRequest
|
|
30469
31629
|
* @function getTypeUrl
|
|
30470
|
-
* @memberof google.chat.v1.
|
|
31630
|
+
* @memberof google.chat.v1.UpdateMembershipRequest
|
|
30471
31631
|
* @static
|
|
30472
31632
|
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
30473
31633
|
* @returns {string} The default type url
|
|
30474
31634
|
*/
|
|
30475
|
-
|
|
31635
|
+
UpdateMembershipRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
30476
31636
|
if (typeUrlPrefix === undefined) {
|
|
30477
31637
|
typeUrlPrefix = "type.googleapis.com";
|
|
30478
31638
|
}
|
|
30479
|
-
return typeUrlPrefix + "/google.chat.v1.
|
|
31639
|
+
return typeUrlPrefix + "/google.chat.v1.UpdateMembershipRequest";
|
|
30480
31640
|
};
|
|
30481
31641
|
|
|
30482
|
-
return
|
|
31642
|
+
return UpdateMembershipRequest;
|
|
30483
31643
|
})();
|
|
30484
31644
|
|
|
30485
31645
|
v1.ListMembershipsRequest = (function() {
|
|
@@ -31689,6 +32849,7 @@
|
|
|
31689
32849
|
* @property {google.chat.v1.IDeletionMetadata|null} [deletionMetadata] Message deletionMetadata
|
|
31690
32850
|
* @property {google.chat.v1.IQuotedMessageMetadata|null} [quotedMessageMetadata] Message quotedMessageMetadata
|
|
31691
32851
|
* @property {Array.<google.chat.v1.IAttachedGif>|null} [attachedGifs] Message attachedGifs
|
|
32852
|
+
* @property {Array.<google.chat.v1.IAccessoryWidget>|null} [accessoryWidgets] Message accessoryWidgets
|
|
31692
32853
|
*/
|
|
31693
32854
|
|
|
31694
32855
|
/**
|
|
@@ -31706,6 +32867,7 @@
|
|
|
31706
32867
|
this.attachment = [];
|
|
31707
32868
|
this.emojiReactionSummaries = [];
|
|
31708
32869
|
this.attachedGifs = [];
|
|
32870
|
+
this.accessoryWidgets = [];
|
|
31709
32871
|
if (properties)
|
|
31710
32872
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
31711
32873
|
if (properties[keys[i]] != null)
|
|
@@ -31912,6 +33074,14 @@
|
|
|
31912
33074
|
*/
|
|
31913
33075
|
Message.prototype.attachedGifs = $util.emptyArray;
|
|
31914
33076
|
|
|
33077
|
+
/**
|
|
33078
|
+
* Message accessoryWidgets.
|
|
33079
|
+
* @member {Array.<google.chat.v1.IAccessoryWidget>} accessoryWidgets
|
|
33080
|
+
* @memberof google.chat.v1.Message
|
|
33081
|
+
* @instance
|
|
33082
|
+
*/
|
|
33083
|
+
Message.prototype.accessoryWidgets = $util.emptyArray;
|
|
33084
|
+
|
|
31915
33085
|
/**
|
|
31916
33086
|
* Creates a new Message instance using the specified properties.
|
|
31917
33087
|
* @function create
|
|
@@ -31992,6 +33162,9 @@
|
|
|
31992
33162
|
$root.google.chat.v1.AttachedGif.encode(message.attachedGifs[i], writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim();
|
|
31993
33163
|
if (message.formattedText != null && Object.hasOwnProperty.call(message, "formattedText"))
|
|
31994
33164
|
writer.uint32(/* id 43, wireType 2 =*/346).string(message.formattedText);
|
|
33165
|
+
if (message.accessoryWidgets != null && message.accessoryWidgets.length)
|
|
33166
|
+
for (var i = 0; i < message.accessoryWidgets.length; ++i)
|
|
33167
|
+
$root.google.chat.v1.AccessoryWidget.encode(message.accessoryWidgets[i], writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim();
|
|
31995
33168
|
return writer;
|
|
31996
33169
|
};
|
|
31997
33170
|
|
|
@@ -32138,6 +33311,12 @@
|
|
|
32138
33311
|
message.attachedGifs.push($root.google.chat.v1.AttachedGif.decode(reader, reader.uint32()));
|
|
32139
33312
|
break;
|
|
32140
33313
|
}
|
|
33314
|
+
case 44: {
|
|
33315
|
+
if (!(message.accessoryWidgets && message.accessoryWidgets.length))
|
|
33316
|
+
message.accessoryWidgets = [];
|
|
33317
|
+
message.accessoryWidgets.push($root.google.chat.v1.AccessoryWidget.decode(reader, reader.uint32()));
|
|
33318
|
+
break;
|
|
33319
|
+
}
|
|
32141
33320
|
default:
|
|
32142
33321
|
reader.skipType(tag & 7);
|
|
32143
33322
|
break;
|
|
@@ -32308,6 +33487,15 @@
|
|
|
32308
33487
|
return "attachedGifs." + error;
|
|
32309
33488
|
}
|
|
32310
33489
|
}
|
|
33490
|
+
if (message.accessoryWidgets != null && message.hasOwnProperty("accessoryWidgets")) {
|
|
33491
|
+
if (!Array.isArray(message.accessoryWidgets))
|
|
33492
|
+
return "accessoryWidgets: array expected";
|
|
33493
|
+
for (var i = 0; i < message.accessoryWidgets.length; ++i) {
|
|
33494
|
+
var error = $root.google.chat.v1.AccessoryWidget.verify(message.accessoryWidgets[i]);
|
|
33495
|
+
if (error)
|
|
33496
|
+
return "accessoryWidgets." + error;
|
|
33497
|
+
}
|
|
33498
|
+
}
|
|
32311
33499
|
return null;
|
|
32312
33500
|
};
|
|
32313
33501
|
|
|
@@ -32457,6 +33645,16 @@
|
|
|
32457
33645
|
message.attachedGifs[i] = $root.google.chat.v1.AttachedGif.fromObject(object.attachedGifs[i]);
|
|
32458
33646
|
}
|
|
32459
33647
|
}
|
|
33648
|
+
if (object.accessoryWidgets) {
|
|
33649
|
+
if (!Array.isArray(object.accessoryWidgets))
|
|
33650
|
+
throw TypeError(".google.chat.v1.Message.accessoryWidgets: array expected");
|
|
33651
|
+
message.accessoryWidgets = [];
|
|
33652
|
+
for (var i = 0; i < object.accessoryWidgets.length; ++i) {
|
|
33653
|
+
if (typeof object.accessoryWidgets[i] !== "object")
|
|
33654
|
+
throw TypeError(".google.chat.v1.Message.accessoryWidgets: object expected");
|
|
33655
|
+
message.accessoryWidgets[i] = $root.google.chat.v1.AccessoryWidget.fromObject(object.accessoryWidgets[i]);
|
|
33656
|
+
}
|
|
33657
|
+
}
|
|
32460
33658
|
return message;
|
|
32461
33659
|
};
|
|
32462
33660
|
|
|
@@ -32480,6 +33678,7 @@
|
|
|
32480
33678
|
object.cardsV2 = [];
|
|
32481
33679
|
object.emojiReactionSummaries = [];
|
|
32482
33680
|
object.attachedGifs = [];
|
|
33681
|
+
object.accessoryWidgets = [];
|
|
32483
33682
|
}
|
|
32484
33683
|
if (options.defaults) {
|
|
32485
33684
|
object.name = "";
|
|
@@ -32570,6 +33769,11 @@
|
|
|
32570
33769
|
}
|
|
32571
33770
|
if (message.formattedText != null && message.hasOwnProperty("formattedText"))
|
|
32572
33771
|
object.formattedText = message.formattedText;
|
|
33772
|
+
if (message.accessoryWidgets && message.accessoryWidgets.length) {
|
|
33773
|
+
object.accessoryWidgets = [];
|
|
33774
|
+
for (var j = 0; j < message.accessoryWidgets.length; ++j)
|
|
33775
|
+
object.accessoryWidgets[j] = $root.google.chat.v1.AccessoryWidget.toObject(message.accessoryWidgets[j], options);
|
|
33776
|
+
}
|
|
32573
33777
|
return object;
|
|
32574
33778
|
};
|
|
32575
33779
|
|
|
@@ -34090,6 +35294,233 @@
|
|
|
34090
35294
|
return ActionResponse;
|
|
34091
35295
|
})();
|
|
34092
35296
|
|
|
35297
|
+
v1.AccessoryWidget = (function() {
|
|
35298
|
+
|
|
35299
|
+
/**
|
|
35300
|
+
* Properties of an AccessoryWidget.
|
|
35301
|
+
* @memberof google.chat.v1
|
|
35302
|
+
* @interface IAccessoryWidget
|
|
35303
|
+
* @property {google.apps.card.v1.IButtonList|null} [buttonList] AccessoryWidget buttonList
|
|
35304
|
+
*/
|
|
35305
|
+
|
|
35306
|
+
/**
|
|
35307
|
+
* Constructs a new AccessoryWidget.
|
|
35308
|
+
* @memberof google.chat.v1
|
|
35309
|
+
* @classdesc Represents an AccessoryWidget.
|
|
35310
|
+
* @implements IAccessoryWidget
|
|
35311
|
+
* @constructor
|
|
35312
|
+
* @param {google.chat.v1.IAccessoryWidget=} [properties] Properties to set
|
|
35313
|
+
*/
|
|
35314
|
+
function AccessoryWidget(properties) {
|
|
35315
|
+
if (properties)
|
|
35316
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
35317
|
+
if (properties[keys[i]] != null)
|
|
35318
|
+
this[keys[i]] = properties[keys[i]];
|
|
35319
|
+
}
|
|
35320
|
+
|
|
35321
|
+
/**
|
|
35322
|
+
* AccessoryWidget buttonList.
|
|
35323
|
+
* @member {google.apps.card.v1.IButtonList|null|undefined} buttonList
|
|
35324
|
+
* @memberof google.chat.v1.AccessoryWidget
|
|
35325
|
+
* @instance
|
|
35326
|
+
*/
|
|
35327
|
+
AccessoryWidget.prototype.buttonList = null;
|
|
35328
|
+
|
|
35329
|
+
// OneOf field names bound to virtual getters and setters
|
|
35330
|
+
var $oneOfFields;
|
|
35331
|
+
|
|
35332
|
+
/**
|
|
35333
|
+
* AccessoryWidget action.
|
|
35334
|
+
* @member {"buttonList"|undefined} action
|
|
35335
|
+
* @memberof google.chat.v1.AccessoryWidget
|
|
35336
|
+
* @instance
|
|
35337
|
+
*/
|
|
35338
|
+
Object.defineProperty(AccessoryWidget.prototype, "action", {
|
|
35339
|
+
get: $util.oneOfGetter($oneOfFields = ["buttonList"]),
|
|
35340
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
35341
|
+
});
|
|
35342
|
+
|
|
35343
|
+
/**
|
|
35344
|
+
* Creates a new AccessoryWidget instance using the specified properties.
|
|
35345
|
+
* @function create
|
|
35346
|
+
* @memberof google.chat.v1.AccessoryWidget
|
|
35347
|
+
* @static
|
|
35348
|
+
* @param {google.chat.v1.IAccessoryWidget=} [properties] Properties to set
|
|
35349
|
+
* @returns {google.chat.v1.AccessoryWidget} AccessoryWidget instance
|
|
35350
|
+
*/
|
|
35351
|
+
AccessoryWidget.create = function create(properties) {
|
|
35352
|
+
return new AccessoryWidget(properties);
|
|
35353
|
+
};
|
|
35354
|
+
|
|
35355
|
+
/**
|
|
35356
|
+
* Encodes the specified AccessoryWidget message. Does not implicitly {@link google.chat.v1.AccessoryWidget.verify|verify} messages.
|
|
35357
|
+
* @function encode
|
|
35358
|
+
* @memberof google.chat.v1.AccessoryWidget
|
|
35359
|
+
* @static
|
|
35360
|
+
* @param {google.chat.v1.IAccessoryWidget} message AccessoryWidget message or plain object to encode
|
|
35361
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
35362
|
+
* @returns {$protobuf.Writer} Writer
|
|
35363
|
+
*/
|
|
35364
|
+
AccessoryWidget.encode = function encode(message, writer) {
|
|
35365
|
+
if (!writer)
|
|
35366
|
+
writer = $Writer.create();
|
|
35367
|
+
if (message.buttonList != null && Object.hasOwnProperty.call(message, "buttonList"))
|
|
35368
|
+
$root.google.apps.card.v1.ButtonList.encode(message.buttonList, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
35369
|
+
return writer;
|
|
35370
|
+
};
|
|
35371
|
+
|
|
35372
|
+
/**
|
|
35373
|
+
* Encodes the specified AccessoryWidget message, length delimited. Does not implicitly {@link google.chat.v1.AccessoryWidget.verify|verify} messages.
|
|
35374
|
+
* @function encodeDelimited
|
|
35375
|
+
* @memberof google.chat.v1.AccessoryWidget
|
|
35376
|
+
* @static
|
|
35377
|
+
* @param {google.chat.v1.IAccessoryWidget} message AccessoryWidget message or plain object to encode
|
|
35378
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
35379
|
+
* @returns {$protobuf.Writer} Writer
|
|
35380
|
+
*/
|
|
35381
|
+
AccessoryWidget.encodeDelimited = function encodeDelimited(message, writer) {
|
|
35382
|
+
return this.encode(message, writer).ldelim();
|
|
35383
|
+
};
|
|
35384
|
+
|
|
35385
|
+
/**
|
|
35386
|
+
* Decodes an AccessoryWidget message from the specified reader or buffer.
|
|
35387
|
+
* @function decode
|
|
35388
|
+
* @memberof google.chat.v1.AccessoryWidget
|
|
35389
|
+
* @static
|
|
35390
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
35391
|
+
* @param {number} [length] Message length if known beforehand
|
|
35392
|
+
* @returns {google.chat.v1.AccessoryWidget} AccessoryWidget
|
|
35393
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
35394
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
35395
|
+
*/
|
|
35396
|
+
AccessoryWidget.decode = function decode(reader, length) {
|
|
35397
|
+
if (!(reader instanceof $Reader))
|
|
35398
|
+
reader = $Reader.create(reader);
|
|
35399
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.AccessoryWidget();
|
|
35400
|
+
while (reader.pos < end) {
|
|
35401
|
+
var tag = reader.uint32();
|
|
35402
|
+
switch (tag >>> 3) {
|
|
35403
|
+
case 1: {
|
|
35404
|
+
message.buttonList = $root.google.apps.card.v1.ButtonList.decode(reader, reader.uint32());
|
|
35405
|
+
break;
|
|
35406
|
+
}
|
|
35407
|
+
default:
|
|
35408
|
+
reader.skipType(tag & 7);
|
|
35409
|
+
break;
|
|
35410
|
+
}
|
|
35411
|
+
}
|
|
35412
|
+
return message;
|
|
35413
|
+
};
|
|
35414
|
+
|
|
35415
|
+
/**
|
|
35416
|
+
* Decodes an AccessoryWidget message from the specified reader or buffer, length delimited.
|
|
35417
|
+
* @function decodeDelimited
|
|
35418
|
+
* @memberof google.chat.v1.AccessoryWidget
|
|
35419
|
+
* @static
|
|
35420
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
35421
|
+
* @returns {google.chat.v1.AccessoryWidget} AccessoryWidget
|
|
35422
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
35423
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
35424
|
+
*/
|
|
35425
|
+
AccessoryWidget.decodeDelimited = function decodeDelimited(reader) {
|
|
35426
|
+
if (!(reader instanceof $Reader))
|
|
35427
|
+
reader = new $Reader(reader);
|
|
35428
|
+
return this.decode(reader, reader.uint32());
|
|
35429
|
+
};
|
|
35430
|
+
|
|
35431
|
+
/**
|
|
35432
|
+
* Verifies an AccessoryWidget message.
|
|
35433
|
+
* @function verify
|
|
35434
|
+
* @memberof google.chat.v1.AccessoryWidget
|
|
35435
|
+
* @static
|
|
35436
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
35437
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
35438
|
+
*/
|
|
35439
|
+
AccessoryWidget.verify = function verify(message) {
|
|
35440
|
+
if (typeof message !== "object" || message === null)
|
|
35441
|
+
return "object expected";
|
|
35442
|
+
var properties = {};
|
|
35443
|
+
if (message.buttonList != null && message.hasOwnProperty("buttonList")) {
|
|
35444
|
+
properties.action = 1;
|
|
35445
|
+
{
|
|
35446
|
+
var error = $root.google.apps.card.v1.ButtonList.verify(message.buttonList);
|
|
35447
|
+
if (error)
|
|
35448
|
+
return "buttonList." + error;
|
|
35449
|
+
}
|
|
35450
|
+
}
|
|
35451
|
+
return null;
|
|
35452
|
+
};
|
|
35453
|
+
|
|
35454
|
+
/**
|
|
35455
|
+
* Creates an AccessoryWidget message from a plain object. Also converts values to their respective internal types.
|
|
35456
|
+
* @function fromObject
|
|
35457
|
+
* @memberof google.chat.v1.AccessoryWidget
|
|
35458
|
+
* @static
|
|
35459
|
+
* @param {Object.<string,*>} object Plain object
|
|
35460
|
+
* @returns {google.chat.v1.AccessoryWidget} AccessoryWidget
|
|
35461
|
+
*/
|
|
35462
|
+
AccessoryWidget.fromObject = function fromObject(object) {
|
|
35463
|
+
if (object instanceof $root.google.chat.v1.AccessoryWidget)
|
|
35464
|
+
return object;
|
|
35465
|
+
var message = new $root.google.chat.v1.AccessoryWidget();
|
|
35466
|
+
if (object.buttonList != null) {
|
|
35467
|
+
if (typeof object.buttonList !== "object")
|
|
35468
|
+
throw TypeError(".google.chat.v1.AccessoryWidget.buttonList: object expected");
|
|
35469
|
+
message.buttonList = $root.google.apps.card.v1.ButtonList.fromObject(object.buttonList);
|
|
35470
|
+
}
|
|
35471
|
+
return message;
|
|
35472
|
+
};
|
|
35473
|
+
|
|
35474
|
+
/**
|
|
35475
|
+
* Creates a plain object from an AccessoryWidget message. Also converts values to other types if specified.
|
|
35476
|
+
* @function toObject
|
|
35477
|
+
* @memberof google.chat.v1.AccessoryWidget
|
|
35478
|
+
* @static
|
|
35479
|
+
* @param {google.chat.v1.AccessoryWidget} message AccessoryWidget
|
|
35480
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
35481
|
+
* @returns {Object.<string,*>} Plain object
|
|
35482
|
+
*/
|
|
35483
|
+
AccessoryWidget.toObject = function toObject(message, options) {
|
|
35484
|
+
if (!options)
|
|
35485
|
+
options = {};
|
|
35486
|
+
var object = {};
|
|
35487
|
+
if (message.buttonList != null && message.hasOwnProperty("buttonList")) {
|
|
35488
|
+
object.buttonList = $root.google.apps.card.v1.ButtonList.toObject(message.buttonList, options);
|
|
35489
|
+
if (options.oneofs)
|
|
35490
|
+
object.action = "buttonList";
|
|
35491
|
+
}
|
|
35492
|
+
return object;
|
|
35493
|
+
};
|
|
35494
|
+
|
|
35495
|
+
/**
|
|
35496
|
+
* Converts this AccessoryWidget to JSON.
|
|
35497
|
+
* @function toJSON
|
|
35498
|
+
* @memberof google.chat.v1.AccessoryWidget
|
|
35499
|
+
* @instance
|
|
35500
|
+
* @returns {Object.<string,*>} JSON object
|
|
35501
|
+
*/
|
|
35502
|
+
AccessoryWidget.prototype.toJSON = function toJSON() {
|
|
35503
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
35504
|
+
};
|
|
35505
|
+
|
|
35506
|
+
/**
|
|
35507
|
+
* Gets the default type url for AccessoryWidget
|
|
35508
|
+
* @function getTypeUrl
|
|
35509
|
+
* @memberof google.chat.v1.AccessoryWidget
|
|
35510
|
+
* @static
|
|
35511
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
35512
|
+
* @returns {string} The default type url
|
|
35513
|
+
*/
|
|
35514
|
+
AccessoryWidget.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
35515
|
+
if (typeUrlPrefix === undefined) {
|
|
35516
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
35517
|
+
}
|
|
35518
|
+
return typeUrlPrefix + "/google.chat.v1.AccessoryWidget";
|
|
35519
|
+
};
|
|
35520
|
+
|
|
35521
|
+
return AccessoryWidget;
|
|
35522
|
+
})();
|
|
35523
|
+
|
|
34093
35524
|
v1.GetMessageRequest = (function() {
|
|
34094
35525
|
|
|
34095
35526
|
/**
|