@google-apps/chat 0.21.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/protos/google/apps/card/v1/card.proto +21 -1
- package/build/protos/google/chat/v1/annotation.proto +5 -0
- package/build/protos/google/chat/v1/attachment.proto +4 -3
- package/build/protos/google/chat/v1/chat_service.proto +89 -37
- package/build/protos/google/chat/v1/event_payload.proto +1 -1
- package/build/protos/google/chat/v1/message.proto +77 -3
- package/build/protos/google/chat/v1/space.proto +7 -5
- package/build/protos/protos.d.ts +253 -1
- package/build/protos/protos.js +691 -1
- package/build/protos/protos.json +92 -2
- package/build/src/v1/chat_service_client.d.ts +93 -41
- package/build/src/v1/chat_service_client.js +2 -1
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/build/src/v1/index.js +1 -1
- package/package.json +1 -1
package/build/protos/protos.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2026 Google LLC
|
|
2
2
|
//
|
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
// you may not use this file except in compliance with the License.
|
|
@@ -31108,6 +31108,7 @@
|
|
|
31108
31108
|
case 0:
|
|
31109
31109
|
case 1:
|
|
31110
31110
|
case 2:
|
|
31111
|
+
case 3:
|
|
31111
31112
|
case 4:
|
|
31112
31113
|
case 5:
|
|
31113
31114
|
break;
|
|
@@ -31186,6 +31187,10 @@
|
|
|
31186
31187
|
case 2:
|
|
31187
31188
|
message.richLinkType = 2;
|
|
31188
31189
|
break;
|
|
31190
|
+
case "GMAIL_MESSAGE":
|
|
31191
|
+
case 3:
|
|
31192
|
+
message.richLinkType = 3;
|
|
31193
|
+
break;
|
|
31189
31194
|
case "MEET_SPACE":
|
|
31190
31195
|
case 4:
|
|
31191
31196
|
message.richLinkType = 4;
|
|
@@ -31295,6 +31300,7 @@
|
|
|
31295
31300
|
* @property {number} RICH_LINK_TYPE_UNSPECIFIED=0 RICH_LINK_TYPE_UNSPECIFIED value
|
|
31296
31301
|
* @property {number} DRIVE_FILE=1 DRIVE_FILE value
|
|
31297
31302
|
* @property {number} CHAT_SPACE=2 CHAT_SPACE value
|
|
31303
|
+
* @property {number} GMAIL_MESSAGE=3 GMAIL_MESSAGE value
|
|
31298
31304
|
* @property {number} MEET_SPACE=4 MEET_SPACE value
|
|
31299
31305
|
* @property {number} CALENDAR_EVENT=5 CALENDAR_EVENT value
|
|
31300
31306
|
*/
|
|
@@ -31303,6 +31309,7 @@
|
|
|
31303
31309
|
values[valuesById[0] = "RICH_LINK_TYPE_UNSPECIFIED"] = 0;
|
|
31304
31310
|
values[valuesById[1] = "DRIVE_FILE"] = 1;
|
|
31305
31311
|
values[valuesById[2] = "CHAT_SPACE"] = 2;
|
|
31312
|
+
values[valuesById[3] = "GMAIL_MESSAGE"] = 3;
|
|
31306
31313
|
values[valuesById[4] = "MEET_SPACE"] = 4;
|
|
31307
31314
|
values[valuesById[5] = "CALENDAR_EVENT"] = 5;
|
|
31308
31315
|
return values;
|
|
@@ -42503,6 +42510,9 @@
|
|
|
42503
42510
|
* @interface IQuotedMessageMetadata
|
|
42504
42511
|
* @property {string|null} [name] QuotedMessageMetadata name
|
|
42505
42512
|
* @property {google.protobuf.ITimestamp|null} [lastUpdateTime] QuotedMessageMetadata lastUpdateTime
|
|
42513
|
+
* @property {google.chat.v1.QuotedMessageMetadata.QuoteType|null} [quoteType] QuotedMessageMetadata quoteType
|
|
42514
|
+
* @property {google.chat.v1.IQuotedMessageSnapshot|null} [quotedMessageSnapshot] QuotedMessageMetadata quotedMessageSnapshot
|
|
42515
|
+
* @property {google.chat.v1.IForwardedMetadata|null} [forwardedMetadata] QuotedMessageMetadata forwardedMetadata
|
|
42506
42516
|
*/
|
|
42507
42517
|
|
|
42508
42518
|
/**
|
|
@@ -42536,6 +42546,30 @@
|
|
|
42536
42546
|
*/
|
|
42537
42547
|
QuotedMessageMetadata.prototype.lastUpdateTime = null;
|
|
42538
42548
|
|
|
42549
|
+
/**
|
|
42550
|
+
* QuotedMessageMetadata quoteType.
|
|
42551
|
+
* @member {google.chat.v1.QuotedMessageMetadata.QuoteType} quoteType
|
|
42552
|
+
* @memberof google.chat.v1.QuotedMessageMetadata
|
|
42553
|
+
* @instance
|
|
42554
|
+
*/
|
|
42555
|
+
QuotedMessageMetadata.prototype.quoteType = 0;
|
|
42556
|
+
|
|
42557
|
+
/**
|
|
42558
|
+
* QuotedMessageMetadata quotedMessageSnapshot.
|
|
42559
|
+
* @member {google.chat.v1.IQuotedMessageSnapshot|null|undefined} quotedMessageSnapshot
|
|
42560
|
+
* @memberof google.chat.v1.QuotedMessageMetadata
|
|
42561
|
+
* @instance
|
|
42562
|
+
*/
|
|
42563
|
+
QuotedMessageMetadata.prototype.quotedMessageSnapshot = null;
|
|
42564
|
+
|
|
42565
|
+
/**
|
|
42566
|
+
* QuotedMessageMetadata forwardedMetadata.
|
|
42567
|
+
* @member {google.chat.v1.IForwardedMetadata|null|undefined} forwardedMetadata
|
|
42568
|
+
* @memberof google.chat.v1.QuotedMessageMetadata
|
|
42569
|
+
* @instance
|
|
42570
|
+
*/
|
|
42571
|
+
QuotedMessageMetadata.prototype.forwardedMetadata = null;
|
|
42572
|
+
|
|
42539
42573
|
/**
|
|
42540
42574
|
* Creates a new QuotedMessageMetadata instance using the specified properties.
|
|
42541
42575
|
* @function create
|
|
@@ -42564,6 +42598,12 @@
|
|
|
42564
42598
|
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
42565
42599
|
if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime"))
|
|
42566
42600
|
$root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
42601
|
+
if (message.quoteType != null && Object.hasOwnProperty.call(message, "quoteType"))
|
|
42602
|
+
writer.uint32(/* id 4, wireType 0 =*/32).int32(message.quoteType);
|
|
42603
|
+
if (message.quotedMessageSnapshot != null && Object.hasOwnProperty.call(message, "quotedMessageSnapshot"))
|
|
42604
|
+
$root.google.chat.v1.QuotedMessageSnapshot.encode(message.quotedMessageSnapshot, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
42605
|
+
if (message.forwardedMetadata != null && Object.hasOwnProperty.call(message, "forwardedMetadata"))
|
|
42606
|
+
$root.google.chat.v1.ForwardedMetadata.encode(message.forwardedMetadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
42567
42607
|
return writer;
|
|
42568
42608
|
};
|
|
42569
42609
|
|
|
@@ -42608,6 +42648,18 @@
|
|
|
42608
42648
|
message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
|
42609
42649
|
break;
|
|
42610
42650
|
}
|
|
42651
|
+
case 4: {
|
|
42652
|
+
message.quoteType = reader.int32();
|
|
42653
|
+
break;
|
|
42654
|
+
}
|
|
42655
|
+
case 5: {
|
|
42656
|
+
message.quotedMessageSnapshot = $root.google.chat.v1.QuotedMessageSnapshot.decode(reader, reader.uint32());
|
|
42657
|
+
break;
|
|
42658
|
+
}
|
|
42659
|
+
case 6: {
|
|
42660
|
+
message.forwardedMetadata = $root.google.chat.v1.ForwardedMetadata.decode(reader, reader.uint32());
|
|
42661
|
+
break;
|
|
42662
|
+
}
|
|
42611
42663
|
default:
|
|
42612
42664
|
reader.skipType(tag & 7);
|
|
42613
42665
|
break;
|
|
@@ -42651,6 +42703,24 @@
|
|
|
42651
42703
|
if (error)
|
|
42652
42704
|
return "lastUpdateTime." + error;
|
|
42653
42705
|
}
|
|
42706
|
+
if (message.quoteType != null && message.hasOwnProperty("quoteType"))
|
|
42707
|
+
switch (message.quoteType) {
|
|
42708
|
+
default:
|
|
42709
|
+
return "quoteType: enum value expected";
|
|
42710
|
+
case 0:
|
|
42711
|
+
case 1:
|
|
42712
|
+
break;
|
|
42713
|
+
}
|
|
42714
|
+
if (message.quotedMessageSnapshot != null && message.hasOwnProperty("quotedMessageSnapshot")) {
|
|
42715
|
+
var error = $root.google.chat.v1.QuotedMessageSnapshot.verify(message.quotedMessageSnapshot);
|
|
42716
|
+
if (error)
|
|
42717
|
+
return "quotedMessageSnapshot." + error;
|
|
42718
|
+
}
|
|
42719
|
+
if (message.forwardedMetadata != null && message.hasOwnProperty("forwardedMetadata")) {
|
|
42720
|
+
var error = $root.google.chat.v1.ForwardedMetadata.verify(message.forwardedMetadata);
|
|
42721
|
+
if (error)
|
|
42722
|
+
return "forwardedMetadata." + error;
|
|
42723
|
+
}
|
|
42654
42724
|
return null;
|
|
42655
42725
|
};
|
|
42656
42726
|
|
|
@@ -42673,6 +42743,32 @@
|
|
|
42673
42743
|
throw TypeError(".google.chat.v1.QuotedMessageMetadata.lastUpdateTime: object expected");
|
|
42674
42744
|
message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime);
|
|
42675
42745
|
}
|
|
42746
|
+
switch (object.quoteType) {
|
|
42747
|
+
default:
|
|
42748
|
+
if (typeof object.quoteType === "number") {
|
|
42749
|
+
message.quoteType = object.quoteType;
|
|
42750
|
+
break;
|
|
42751
|
+
}
|
|
42752
|
+
break;
|
|
42753
|
+
case "QUOTE_TYPE_UNSPECIFIED":
|
|
42754
|
+
case 0:
|
|
42755
|
+
message.quoteType = 0;
|
|
42756
|
+
break;
|
|
42757
|
+
case "REPLY":
|
|
42758
|
+
case 1:
|
|
42759
|
+
message.quoteType = 1;
|
|
42760
|
+
break;
|
|
42761
|
+
}
|
|
42762
|
+
if (object.quotedMessageSnapshot != null) {
|
|
42763
|
+
if (typeof object.quotedMessageSnapshot !== "object")
|
|
42764
|
+
throw TypeError(".google.chat.v1.QuotedMessageMetadata.quotedMessageSnapshot: object expected");
|
|
42765
|
+
message.quotedMessageSnapshot = $root.google.chat.v1.QuotedMessageSnapshot.fromObject(object.quotedMessageSnapshot);
|
|
42766
|
+
}
|
|
42767
|
+
if (object.forwardedMetadata != null) {
|
|
42768
|
+
if (typeof object.forwardedMetadata !== "object")
|
|
42769
|
+
throw TypeError(".google.chat.v1.QuotedMessageMetadata.forwardedMetadata: object expected");
|
|
42770
|
+
message.forwardedMetadata = $root.google.chat.v1.ForwardedMetadata.fromObject(object.forwardedMetadata);
|
|
42771
|
+
}
|
|
42676
42772
|
return message;
|
|
42677
42773
|
};
|
|
42678
42774
|
|
|
@@ -42692,11 +42788,20 @@
|
|
|
42692
42788
|
if (options.defaults) {
|
|
42693
42789
|
object.name = "";
|
|
42694
42790
|
object.lastUpdateTime = null;
|
|
42791
|
+
object.quoteType = options.enums === String ? "QUOTE_TYPE_UNSPECIFIED" : 0;
|
|
42792
|
+
object.quotedMessageSnapshot = null;
|
|
42793
|
+
object.forwardedMetadata = null;
|
|
42695
42794
|
}
|
|
42696
42795
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
42697
42796
|
object.name = message.name;
|
|
42698
42797
|
if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime"))
|
|
42699
42798
|
object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options);
|
|
42799
|
+
if (message.quoteType != null && message.hasOwnProperty("quoteType"))
|
|
42800
|
+
object.quoteType = options.enums === String ? $root.google.chat.v1.QuotedMessageMetadata.QuoteType[message.quoteType] === undefined ? message.quoteType : $root.google.chat.v1.QuotedMessageMetadata.QuoteType[message.quoteType] : message.quoteType;
|
|
42801
|
+
if (message.quotedMessageSnapshot != null && message.hasOwnProperty("quotedMessageSnapshot"))
|
|
42802
|
+
object.quotedMessageSnapshot = $root.google.chat.v1.QuotedMessageSnapshot.toObject(message.quotedMessageSnapshot, options);
|
|
42803
|
+
if (message.forwardedMetadata != null && message.hasOwnProperty("forwardedMetadata"))
|
|
42804
|
+
object.forwardedMetadata = $root.google.chat.v1.ForwardedMetadata.toObject(message.forwardedMetadata, options);
|
|
42700
42805
|
return object;
|
|
42701
42806
|
};
|
|
42702
42807
|
|
|
@@ -42726,9 +42831,594 @@
|
|
|
42726
42831
|
return typeUrlPrefix + "/google.chat.v1.QuotedMessageMetadata";
|
|
42727
42832
|
};
|
|
42728
42833
|
|
|
42834
|
+
/**
|
|
42835
|
+
* QuoteType enum.
|
|
42836
|
+
* @name google.chat.v1.QuotedMessageMetadata.QuoteType
|
|
42837
|
+
* @enum {number}
|
|
42838
|
+
* @property {number} QUOTE_TYPE_UNSPECIFIED=0 QUOTE_TYPE_UNSPECIFIED value
|
|
42839
|
+
* @property {number} REPLY=1 REPLY value
|
|
42840
|
+
*/
|
|
42841
|
+
QuotedMessageMetadata.QuoteType = (function() {
|
|
42842
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
42843
|
+
values[valuesById[0] = "QUOTE_TYPE_UNSPECIFIED"] = 0;
|
|
42844
|
+
values[valuesById[1] = "REPLY"] = 1;
|
|
42845
|
+
return values;
|
|
42846
|
+
})();
|
|
42847
|
+
|
|
42729
42848
|
return QuotedMessageMetadata;
|
|
42730
42849
|
})();
|
|
42731
42850
|
|
|
42851
|
+
v1.QuotedMessageSnapshot = (function() {
|
|
42852
|
+
|
|
42853
|
+
/**
|
|
42854
|
+
* Properties of a QuotedMessageSnapshot.
|
|
42855
|
+
* @memberof google.chat.v1
|
|
42856
|
+
* @interface IQuotedMessageSnapshot
|
|
42857
|
+
* @property {string|null} [sender] QuotedMessageSnapshot sender
|
|
42858
|
+
* @property {string|null} [text] QuotedMessageSnapshot text
|
|
42859
|
+
* @property {string|null} [formattedText] QuotedMessageSnapshot formattedText
|
|
42860
|
+
* @property {Array.<google.chat.v1.IAnnotation>|null} [annotations] QuotedMessageSnapshot annotations
|
|
42861
|
+
* @property {Array.<google.chat.v1.IAttachment>|null} [attachments] QuotedMessageSnapshot attachments
|
|
42862
|
+
*/
|
|
42863
|
+
|
|
42864
|
+
/**
|
|
42865
|
+
* Constructs a new QuotedMessageSnapshot.
|
|
42866
|
+
* @memberof google.chat.v1
|
|
42867
|
+
* @classdesc Represents a QuotedMessageSnapshot.
|
|
42868
|
+
* @implements IQuotedMessageSnapshot
|
|
42869
|
+
* @constructor
|
|
42870
|
+
* @param {google.chat.v1.IQuotedMessageSnapshot=} [properties] Properties to set
|
|
42871
|
+
*/
|
|
42872
|
+
function QuotedMessageSnapshot(properties) {
|
|
42873
|
+
this.annotations = [];
|
|
42874
|
+
this.attachments = [];
|
|
42875
|
+
if (properties)
|
|
42876
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
42877
|
+
if (properties[keys[i]] != null)
|
|
42878
|
+
this[keys[i]] = properties[keys[i]];
|
|
42879
|
+
}
|
|
42880
|
+
|
|
42881
|
+
/**
|
|
42882
|
+
* QuotedMessageSnapshot sender.
|
|
42883
|
+
* @member {string} sender
|
|
42884
|
+
* @memberof google.chat.v1.QuotedMessageSnapshot
|
|
42885
|
+
* @instance
|
|
42886
|
+
*/
|
|
42887
|
+
QuotedMessageSnapshot.prototype.sender = "";
|
|
42888
|
+
|
|
42889
|
+
/**
|
|
42890
|
+
* QuotedMessageSnapshot text.
|
|
42891
|
+
* @member {string} text
|
|
42892
|
+
* @memberof google.chat.v1.QuotedMessageSnapshot
|
|
42893
|
+
* @instance
|
|
42894
|
+
*/
|
|
42895
|
+
QuotedMessageSnapshot.prototype.text = "";
|
|
42896
|
+
|
|
42897
|
+
/**
|
|
42898
|
+
* QuotedMessageSnapshot formattedText.
|
|
42899
|
+
* @member {string} formattedText
|
|
42900
|
+
* @memberof google.chat.v1.QuotedMessageSnapshot
|
|
42901
|
+
* @instance
|
|
42902
|
+
*/
|
|
42903
|
+
QuotedMessageSnapshot.prototype.formattedText = "";
|
|
42904
|
+
|
|
42905
|
+
/**
|
|
42906
|
+
* QuotedMessageSnapshot annotations.
|
|
42907
|
+
* @member {Array.<google.chat.v1.IAnnotation>} annotations
|
|
42908
|
+
* @memberof google.chat.v1.QuotedMessageSnapshot
|
|
42909
|
+
* @instance
|
|
42910
|
+
*/
|
|
42911
|
+
QuotedMessageSnapshot.prototype.annotations = $util.emptyArray;
|
|
42912
|
+
|
|
42913
|
+
/**
|
|
42914
|
+
* QuotedMessageSnapshot attachments.
|
|
42915
|
+
* @member {Array.<google.chat.v1.IAttachment>} attachments
|
|
42916
|
+
* @memberof google.chat.v1.QuotedMessageSnapshot
|
|
42917
|
+
* @instance
|
|
42918
|
+
*/
|
|
42919
|
+
QuotedMessageSnapshot.prototype.attachments = $util.emptyArray;
|
|
42920
|
+
|
|
42921
|
+
/**
|
|
42922
|
+
* Creates a new QuotedMessageSnapshot instance using the specified properties.
|
|
42923
|
+
* @function create
|
|
42924
|
+
* @memberof google.chat.v1.QuotedMessageSnapshot
|
|
42925
|
+
* @static
|
|
42926
|
+
* @param {google.chat.v1.IQuotedMessageSnapshot=} [properties] Properties to set
|
|
42927
|
+
* @returns {google.chat.v1.QuotedMessageSnapshot} QuotedMessageSnapshot instance
|
|
42928
|
+
*/
|
|
42929
|
+
QuotedMessageSnapshot.create = function create(properties) {
|
|
42930
|
+
return new QuotedMessageSnapshot(properties);
|
|
42931
|
+
};
|
|
42932
|
+
|
|
42933
|
+
/**
|
|
42934
|
+
* Encodes the specified QuotedMessageSnapshot message. Does not implicitly {@link google.chat.v1.QuotedMessageSnapshot.verify|verify} messages.
|
|
42935
|
+
* @function encode
|
|
42936
|
+
* @memberof google.chat.v1.QuotedMessageSnapshot
|
|
42937
|
+
* @static
|
|
42938
|
+
* @param {google.chat.v1.IQuotedMessageSnapshot} message QuotedMessageSnapshot message or plain object to encode
|
|
42939
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
42940
|
+
* @returns {$protobuf.Writer} Writer
|
|
42941
|
+
*/
|
|
42942
|
+
QuotedMessageSnapshot.encode = function encode(message, writer) {
|
|
42943
|
+
if (!writer)
|
|
42944
|
+
writer = $Writer.create();
|
|
42945
|
+
if (message.sender != null && Object.hasOwnProperty.call(message, "sender"))
|
|
42946
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.sender);
|
|
42947
|
+
if (message.text != null && Object.hasOwnProperty.call(message, "text"))
|
|
42948
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.text);
|
|
42949
|
+
if (message.formattedText != null && Object.hasOwnProperty.call(message, "formattedText"))
|
|
42950
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.formattedText);
|
|
42951
|
+
if (message.annotations != null && message.annotations.length)
|
|
42952
|
+
for (var i = 0; i < message.annotations.length; ++i)
|
|
42953
|
+
$root.google.chat.v1.Annotation.encode(message.annotations[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
42954
|
+
if (message.attachments != null && message.attachments.length)
|
|
42955
|
+
for (var i = 0; i < message.attachments.length; ++i)
|
|
42956
|
+
$root.google.chat.v1.Attachment.encode(message.attachments[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
42957
|
+
return writer;
|
|
42958
|
+
};
|
|
42959
|
+
|
|
42960
|
+
/**
|
|
42961
|
+
* Encodes the specified QuotedMessageSnapshot message, length delimited. Does not implicitly {@link google.chat.v1.QuotedMessageSnapshot.verify|verify} messages.
|
|
42962
|
+
* @function encodeDelimited
|
|
42963
|
+
* @memberof google.chat.v1.QuotedMessageSnapshot
|
|
42964
|
+
* @static
|
|
42965
|
+
* @param {google.chat.v1.IQuotedMessageSnapshot} message QuotedMessageSnapshot message or plain object to encode
|
|
42966
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
42967
|
+
* @returns {$protobuf.Writer} Writer
|
|
42968
|
+
*/
|
|
42969
|
+
QuotedMessageSnapshot.encodeDelimited = function encodeDelimited(message, writer) {
|
|
42970
|
+
return this.encode(message, writer).ldelim();
|
|
42971
|
+
};
|
|
42972
|
+
|
|
42973
|
+
/**
|
|
42974
|
+
* Decodes a QuotedMessageSnapshot message from the specified reader or buffer.
|
|
42975
|
+
* @function decode
|
|
42976
|
+
* @memberof google.chat.v1.QuotedMessageSnapshot
|
|
42977
|
+
* @static
|
|
42978
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
42979
|
+
* @param {number} [length] Message length if known beforehand
|
|
42980
|
+
* @returns {google.chat.v1.QuotedMessageSnapshot} QuotedMessageSnapshot
|
|
42981
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
42982
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
42983
|
+
*/
|
|
42984
|
+
QuotedMessageSnapshot.decode = function decode(reader, length, error) {
|
|
42985
|
+
if (!(reader instanceof $Reader))
|
|
42986
|
+
reader = $Reader.create(reader);
|
|
42987
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.QuotedMessageSnapshot();
|
|
42988
|
+
while (reader.pos < end) {
|
|
42989
|
+
var tag = reader.uint32();
|
|
42990
|
+
if (tag === error)
|
|
42991
|
+
break;
|
|
42992
|
+
switch (tag >>> 3) {
|
|
42993
|
+
case 1: {
|
|
42994
|
+
message.sender = reader.string();
|
|
42995
|
+
break;
|
|
42996
|
+
}
|
|
42997
|
+
case 2: {
|
|
42998
|
+
message.text = reader.string();
|
|
42999
|
+
break;
|
|
43000
|
+
}
|
|
43001
|
+
case 3: {
|
|
43002
|
+
message.formattedText = reader.string();
|
|
43003
|
+
break;
|
|
43004
|
+
}
|
|
43005
|
+
case 4: {
|
|
43006
|
+
if (!(message.annotations && message.annotations.length))
|
|
43007
|
+
message.annotations = [];
|
|
43008
|
+
message.annotations.push($root.google.chat.v1.Annotation.decode(reader, reader.uint32()));
|
|
43009
|
+
break;
|
|
43010
|
+
}
|
|
43011
|
+
case 5: {
|
|
43012
|
+
if (!(message.attachments && message.attachments.length))
|
|
43013
|
+
message.attachments = [];
|
|
43014
|
+
message.attachments.push($root.google.chat.v1.Attachment.decode(reader, reader.uint32()));
|
|
43015
|
+
break;
|
|
43016
|
+
}
|
|
43017
|
+
default:
|
|
43018
|
+
reader.skipType(tag & 7);
|
|
43019
|
+
break;
|
|
43020
|
+
}
|
|
43021
|
+
}
|
|
43022
|
+
return message;
|
|
43023
|
+
};
|
|
43024
|
+
|
|
43025
|
+
/**
|
|
43026
|
+
* Decodes a QuotedMessageSnapshot message from the specified reader or buffer, length delimited.
|
|
43027
|
+
* @function decodeDelimited
|
|
43028
|
+
* @memberof google.chat.v1.QuotedMessageSnapshot
|
|
43029
|
+
* @static
|
|
43030
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
43031
|
+
* @returns {google.chat.v1.QuotedMessageSnapshot} QuotedMessageSnapshot
|
|
43032
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
43033
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
43034
|
+
*/
|
|
43035
|
+
QuotedMessageSnapshot.decodeDelimited = function decodeDelimited(reader) {
|
|
43036
|
+
if (!(reader instanceof $Reader))
|
|
43037
|
+
reader = new $Reader(reader);
|
|
43038
|
+
return this.decode(reader, reader.uint32());
|
|
43039
|
+
};
|
|
43040
|
+
|
|
43041
|
+
/**
|
|
43042
|
+
* Verifies a QuotedMessageSnapshot message.
|
|
43043
|
+
* @function verify
|
|
43044
|
+
* @memberof google.chat.v1.QuotedMessageSnapshot
|
|
43045
|
+
* @static
|
|
43046
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
43047
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
43048
|
+
*/
|
|
43049
|
+
QuotedMessageSnapshot.verify = function verify(message) {
|
|
43050
|
+
if (typeof message !== "object" || message === null)
|
|
43051
|
+
return "object expected";
|
|
43052
|
+
if (message.sender != null && message.hasOwnProperty("sender"))
|
|
43053
|
+
if (!$util.isString(message.sender))
|
|
43054
|
+
return "sender: string expected";
|
|
43055
|
+
if (message.text != null && message.hasOwnProperty("text"))
|
|
43056
|
+
if (!$util.isString(message.text))
|
|
43057
|
+
return "text: string expected";
|
|
43058
|
+
if (message.formattedText != null && message.hasOwnProperty("formattedText"))
|
|
43059
|
+
if (!$util.isString(message.formattedText))
|
|
43060
|
+
return "formattedText: string expected";
|
|
43061
|
+
if (message.annotations != null && message.hasOwnProperty("annotations")) {
|
|
43062
|
+
if (!Array.isArray(message.annotations))
|
|
43063
|
+
return "annotations: array expected";
|
|
43064
|
+
for (var i = 0; i < message.annotations.length; ++i) {
|
|
43065
|
+
var error = $root.google.chat.v1.Annotation.verify(message.annotations[i]);
|
|
43066
|
+
if (error)
|
|
43067
|
+
return "annotations." + error;
|
|
43068
|
+
}
|
|
43069
|
+
}
|
|
43070
|
+
if (message.attachments != null && message.hasOwnProperty("attachments")) {
|
|
43071
|
+
if (!Array.isArray(message.attachments))
|
|
43072
|
+
return "attachments: array expected";
|
|
43073
|
+
for (var i = 0; i < message.attachments.length; ++i) {
|
|
43074
|
+
var error = $root.google.chat.v1.Attachment.verify(message.attachments[i]);
|
|
43075
|
+
if (error)
|
|
43076
|
+
return "attachments." + error;
|
|
43077
|
+
}
|
|
43078
|
+
}
|
|
43079
|
+
return null;
|
|
43080
|
+
};
|
|
43081
|
+
|
|
43082
|
+
/**
|
|
43083
|
+
* Creates a QuotedMessageSnapshot message from a plain object. Also converts values to their respective internal types.
|
|
43084
|
+
* @function fromObject
|
|
43085
|
+
* @memberof google.chat.v1.QuotedMessageSnapshot
|
|
43086
|
+
* @static
|
|
43087
|
+
* @param {Object.<string,*>} object Plain object
|
|
43088
|
+
* @returns {google.chat.v1.QuotedMessageSnapshot} QuotedMessageSnapshot
|
|
43089
|
+
*/
|
|
43090
|
+
QuotedMessageSnapshot.fromObject = function fromObject(object) {
|
|
43091
|
+
if (object instanceof $root.google.chat.v1.QuotedMessageSnapshot)
|
|
43092
|
+
return object;
|
|
43093
|
+
var message = new $root.google.chat.v1.QuotedMessageSnapshot();
|
|
43094
|
+
if (object.sender != null)
|
|
43095
|
+
message.sender = String(object.sender);
|
|
43096
|
+
if (object.text != null)
|
|
43097
|
+
message.text = String(object.text);
|
|
43098
|
+
if (object.formattedText != null)
|
|
43099
|
+
message.formattedText = String(object.formattedText);
|
|
43100
|
+
if (object.annotations) {
|
|
43101
|
+
if (!Array.isArray(object.annotations))
|
|
43102
|
+
throw TypeError(".google.chat.v1.QuotedMessageSnapshot.annotations: array expected");
|
|
43103
|
+
message.annotations = [];
|
|
43104
|
+
for (var i = 0; i < object.annotations.length; ++i) {
|
|
43105
|
+
if (typeof object.annotations[i] !== "object")
|
|
43106
|
+
throw TypeError(".google.chat.v1.QuotedMessageSnapshot.annotations: object expected");
|
|
43107
|
+
message.annotations[i] = $root.google.chat.v1.Annotation.fromObject(object.annotations[i]);
|
|
43108
|
+
}
|
|
43109
|
+
}
|
|
43110
|
+
if (object.attachments) {
|
|
43111
|
+
if (!Array.isArray(object.attachments))
|
|
43112
|
+
throw TypeError(".google.chat.v1.QuotedMessageSnapshot.attachments: array expected");
|
|
43113
|
+
message.attachments = [];
|
|
43114
|
+
for (var i = 0; i < object.attachments.length; ++i) {
|
|
43115
|
+
if (typeof object.attachments[i] !== "object")
|
|
43116
|
+
throw TypeError(".google.chat.v1.QuotedMessageSnapshot.attachments: object expected");
|
|
43117
|
+
message.attachments[i] = $root.google.chat.v1.Attachment.fromObject(object.attachments[i]);
|
|
43118
|
+
}
|
|
43119
|
+
}
|
|
43120
|
+
return message;
|
|
43121
|
+
};
|
|
43122
|
+
|
|
43123
|
+
/**
|
|
43124
|
+
* Creates a plain object from a QuotedMessageSnapshot message. Also converts values to other types if specified.
|
|
43125
|
+
* @function toObject
|
|
43126
|
+
* @memberof google.chat.v1.QuotedMessageSnapshot
|
|
43127
|
+
* @static
|
|
43128
|
+
* @param {google.chat.v1.QuotedMessageSnapshot} message QuotedMessageSnapshot
|
|
43129
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
43130
|
+
* @returns {Object.<string,*>} Plain object
|
|
43131
|
+
*/
|
|
43132
|
+
QuotedMessageSnapshot.toObject = function toObject(message, options) {
|
|
43133
|
+
if (!options)
|
|
43134
|
+
options = {};
|
|
43135
|
+
var object = {};
|
|
43136
|
+
if (options.arrays || options.defaults) {
|
|
43137
|
+
object.annotations = [];
|
|
43138
|
+
object.attachments = [];
|
|
43139
|
+
}
|
|
43140
|
+
if (options.defaults) {
|
|
43141
|
+
object.sender = "";
|
|
43142
|
+
object.text = "";
|
|
43143
|
+
object.formattedText = "";
|
|
43144
|
+
}
|
|
43145
|
+
if (message.sender != null && message.hasOwnProperty("sender"))
|
|
43146
|
+
object.sender = message.sender;
|
|
43147
|
+
if (message.text != null && message.hasOwnProperty("text"))
|
|
43148
|
+
object.text = message.text;
|
|
43149
|
+
if (message.formattedText != null && message.hasOwnProperty("formattedText"))
|
|
43150
|
+
object.formattedText = message.formattedText;
|
|
43151
|
+
if (message.annotations && message.annotations.length) {
|
|
43152
|
+
object.annotations = [];
|
|
43153
|
+
for (var j = 0; j < message.annotations.length; ++j)
|
|
43154
|
+
object.annotations[j] = $root.google.chat.v1.Annotation.toObject(message.annotations[j], options);
|
|
43155
|
+
}
|
|
43156
|
+
if (message.attachments && message.attachments.length) {
|
|
43157
|
+
object.attachments = [];
|
|
43158
|
+
for (var j = 0; j < message.attachments.length; ++j)
|
|
43159
|
+
object.attachments[j] = $root.google.chat.v1.Attachment.toObject(message.attachments[j], options);
|
|
43160
|
+
}
|
|
43161
|
+
return object;
|
|
43162
|
+
};
|
|
43163
|
+
|
|
43164
|
+
/**
|
|
43165
|
+
* Converts this QuotedMessageSnapshot to JSON.
|
|
43166
|
+
* @function toJSON
|
|
43167
|
+
* @memberof google.chat.v1.QuotedMessageSnapshot
|
|
43168
|
+
* @instance
|
|
43169
|
+
* @returns {Object.<string,*>} JSON object
|
|
43170
|
+
*/
|
|
43171
|
+
QuotedMessageSnapshot.prototype.toJSON = function toJSON() {
|
|
43172
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
43173
|
+
};
|
|
43174
|
+
|
|
43175
|
+
/**
|
|
43176
|
+
* Gets the default type url for QuotedMessageSnapshot
|
|
43177
|
+
* @function getTypeUrl
|
|
43178
|
+
* @memberof google.chat.v1.QuotedMessageSnapshot
|
|
43179
|
+
* @static
|
|
43180
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
43181
|
+
* @returns {string} The default type url
|
|
43182
|
+
*/
|
|
43183
|
+
QuotedMessageSnapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
43184
|
+
if (typeUrlPrefix === undefined) {
|
|
43185
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
43186
|
+
}
|
|
43187
|
+
return typeUrlPrefix + "/google.chat.v1.QuotedMessageSnapshot";
|
|
43188
|
+
};
|
|
43189
|
+
|
|
43190
|
+
return QuotedMessageSnapshot;
|
|
43191
|
+
})();
|
|
43192
|
+
|
|
43193
|
+
v1.ForwardedMetadata = (function() {
|
|
43194
|
+
|
|
43195
|
+
/**
|
|
43196
|
+
* Properties of a ForwardedMetadata.
|
|
43197
|
+
* @memberof google.chat.v1
|
|
43198
|
+
* @interface IForwardedMetadata
|
|
43199
|
+
* @property {string|null} [space] ForwardedMetadata space
|
|
43200
|
+
* @property {string|null} [spaceDisplayName] ForwardedMetadata spaceDisplayName
|
|
43201
|
+
*/
|
|
43202
|
+
|
|
43203
|
+
/**
|
|
43204
|
+
* Constructs a new ForwardedMetadata.
|
|
43205
|
+
* @memberof google.chat.v1
|
|
43206
|
+
* @classdesc Represents a ForwardedMetadata.
|
|
43207
|
+
* @implements IForwardedMetadata
|
|
43208
|
+
* @constructor
|
|
43209
|
+
* @param {google.chat.v1.IForwardedMetadata=} [properties] Properties to set
|
|
43210
|
+
*/
|
|
43211
|
+
function ForwardedMetadata(properties) {
|
|
43212
|
+
if (properties)
|
|
43213
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
43214
|
+
if (properties[keys[i]] != null)
|
|
43215
|
+
this[keys[i]] = properties[keys[i]];
|
|
43216
|
+
}
|
|
43217
|
+
|
|
43218
|
+
/**
|
|
43219
|
+
* ForwardedMetadata space.
|
|
43220
|
+
* @member {string} space
|
|
43221
|
+
* @memberof google.chat.v1.ForwardedMetadata
|
|
43222
|
+
* @instance
|
|
43223
|
+
*/
|
|
43224
|
+
ForwardedMetadata.prototype.space = "";
|
|
43225
|
+
|
|
43226
|
+
/**
|
|
43227
|
+
* ForwardedMetadata spaceDisplayName.
|
|
43228
|
+
* @member {string} spaceDisplayName
|
|
43229
|
+
* @memberof google.chat.v1.ForwardedMetadata
|
|
43230
|
+
* @instance
|
|
43231
|
+
*/
|
|
43232
|
+
ForwardedMetadata.prototype.spaceDisplayName = "";
|
|
43233
|
+
|
|
43234
|
+
/**
|
|
43235
|
+
* Creates a new ForwardedMetadata instance using the specified properties.
|
|
43236
|
+
* @function create
|
|
43237
|
+
* @memberof google.chat.v1.ForwardedMetadata
|
|
43238
|
+
* @static
|
|
43239
|
+
* @param {google.chat.v1.IForwardedMetadata=} [properties] Properties to set
|
|
43240
|
+
* @returns {google.chat.v1.ForwardedMetadata} ForwardedMetadata instance
|
|
43241
|
+
*/
|
|
43242
|
+
ForwardedMetadata.create = function create(properties) {
|
|
43243
|
+
return new ForwardedMetadata(properties);
|
|
43244
|
+
};
|
|
43245
|
+
|
|
43246
|
+
/**
|
|
43247
|
+
* Encodes the specified ForwardedMetadata message. Does not implicitly {@link google.chat.v1.ForwardedMetadata.verify|verify} messages.
|
|
43248
|
+
* @function encode
|
|
43249
|
+
* @memberof google.chat.v1.ForwardedMetadata
|
|
43250
|
+
* @static
|
|
43251
|
+
* @param {google.chat.v1.IForwardedMetadata} message ForwardedMetadata message or plain object to encode
|
|
43252
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
43253
|
+
* @returns {$protobuf.Writer} Writer
|
|
43254
|
+
*/
|
|
43255
|
+
ForwardedMetadata.encode = function encode(message, writer) {
|
|
43256
|
+
if (!writer)
|
|
43257
|
+
writer = $Writer.create();
|
|
43258
|
+
if (message.space != null && Object.hasOwnProperty.call(message, "space"))
|
|
43259
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.space);
|
|
43260
|
+
if (message.spaceDisplayName != null && Object.hasOwnProperty.call(message, "spaceDisplayName"))
|
|
43261
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.spaceDisplayName);
|
|
43262
|
+
return writer;
|
|
43263
|
+
};
|
|
43264
|
+
|
|
43265
|
+
/**
|
|
43266
|
+
* Encodes the specified ForwardedMetadata message, length delimited. Does not implicitly {@link google.chat.v1.ForwardedMetadata.verify|verify} messages.
|
|
43267
|
+
* @function encodeDelimited
|
|
43268
|
+
* @memberof google.chat.v1.ForwardedMetadata
|
|
43269
|
+
* @static
|
|
43270
|
+
* @param {google.chat.v1.IForwardedMetadata} message ForwardedMetadata message or plain object to encode
|
|
43271
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
43272
|
+
* @returns {$protobuf.Writer} Writer
|
|
43273
|
+
*/
|
|
43274
|
+
ForwardedMetadata.encodeDelimited = function encodeDelimited(message, writer) {
|
|
43275
|
+
return this.encode(message, writer).ldelim();
|
|
43276
|
+
};
|
|
43277
|
+
|
|
43278
|
+
/**
|
|
43279
|
+
* Decodes a ForwardedMetadata message from the specified reader or buffer.
|
|
43280
|
+
* @function decode
|
|
43281
|
+
* @memberof google.chat.v1.ForwardedMetadata
|
|
43282
|
+
* @static
|
|
43283
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
43284
|
+
* @param {number} [length] Message length if known beforehand
|
|
43285
|
+
* @returns {google.chat.v1.ForwardedMetadata} ForwardedMetadata
|
|
43286
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
43287
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
43288
|
+
*/
|
|
43289
|
+
ForwardedMetadata.decode = function decode(reader, length, error) {
|
|
43290
|
+
if (!(reader instanceof $Reader))
|
|
43291
|
+
reader = $Reader.create(reader);
|
|
43292
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.ForwardedMetadata();
|
|
43293
|
+
while (reader.pos < end) {
|
|
43294
|
+
var tag = reader.uint32();
|
|
43295
|
+
if (tag === error)
|
|
43296
|
+
break;
|
|
43297
|
+
switch (tag >>> 3) {
|
|
43298
|
+
case 1: {
|
|
43299
|
+
message.space = reader.string();
|
|
43300
|
+
break;
|
|
43301
|
+
}
|
|
43302
|
+
case 2: {
|
|
43303
|
+
message.spaceDisplayName = reader.string();
|
|
43304
|
+
break;
|
|
43305
|
+
}
|
|
43306
|
+
default:
|
|
43307
|
+
reader.skipType(tag & 7);
|
|
43308
|
+
break;
|
|
43309
|
+
}
|
|
43310
|
+
}
|
|
43311
|
+
return message;
|
|
43312
|
+
};
|
|
43313
|
+
|
|
43314
|
+
/**
|
|
43315
|
+
* Decodes a ForwardedMetadata message from the specified reader or buffer, length delimited.
|
|
43316
|
+
* @function decodeDelimited
|
|
43317
|
+
* @memberof google.chat.v1.ForwardedMetadata
|
|
43318
|
+
* @static
|
|
43319
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
43320
|
+
* @returns {google.chat.v1.ForwardedMetadata} ForwardedMetadata
|
|
43321
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
43322
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
43323
|
+
*/
|
|
43324
|
+
ForwardedMetadata.decodeDelimited = function decodeDelimited(reader) {
|
|
43325
|
+
if (!(reader instanceof $Reader))
|
|
43326
|
+
reader = new $Reader(reader);
|
|
43327
|
+
return this.decode(reader, reader.uint32());
|
|
43328
|
+
};
|
|
43329
|
+
|
|
43330
|
+
/**
|
|
43331
|
+
* Verifies a ForwardedMetadata message.
|
|
43332
|
+
* @function verify
|
|
43333
|
+
* @memberof google.chat.v1.ForwardedMetadata
|
|
43334
|
+
* @static
|
|
43335
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
43336
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
43337
|
+
*/
|
|
43338
|
+
ForwardedMetadata.verify = function verify(message) {
|
|
43339
|
+
if (typeof message !== "object" || message === null)
|
|
43340
|
+
return "object expected";
|
|
43341
|
+
if (message.space != null && message.hasOwnProperty("space"))
|
|
43342
|
+
if (!$util.isString(message.space))
|
|
43343
|
+
return "space: string expected";
|
|
43344
|
+
if (message.spaceDisplayName != null && message.hasOwnProperty("spaceDisplayName"))
|
|
43345
|
+
if (!$util.isString(message.spaceDisplayName))
|
|
43346
|
+
return "spaceDisplayName: string expected";
|
|
43347
|
+
return null;
|
|
43348
|
+
};
|
|
43349
|
+
|
|
43350
|
+
/**
|
|
43351
|
+
* Creates a ForwardedMetadata message from a plain object. Also converts values to their respective internal types.
|
|
43352
|
+
* @function fromObject
|
|
43353
|
+
* @memberof google.chat.v1.ForwardedMetadata
|
|
43354
|
+
* @static
|
|
43355
|
+
* @param {Object.<string,*>} object Plain object
|
|
43356
|
+
* @returns {google.chat.v1.ForwardedMetadata} ForwardedMetadata
|
|
43357
|
+
*/
|
|
43358
|
+
ForwardedMetadata.fromObject = function fromObject(object) {
|
|
43359
|
+
if (object instanceof $root.google.chat.v1.ForwardedMetadata)
|
|
43360
|
+
return object;
|
|
43361
|
+
var message = new $root.google.chat.v1.ForwardedMetadata();
|
|
43362
|
+
if (object.space != null)
|
|
43363
|
+
message.space = String(object.space);
|
|
43364
|
+
if (object.spaceDisplayName != null)
|
|
43365
|
+
message.spaceDisplayName = String(object.spaceDisplayName);
|
|
43366
|
+
return message;
|
|
43367
|
+
};
|
|
43368
|
+
|
|
43369
|
+
/**
|
|
43370
|
+
* Creates a plain object from a ForwardedMetadata message. Also converts values to other types if specified.
|
|
43371
|
+
* @function toObject
|
|
43372
|
+
* @memberof google.chat.v1.ForwardedMetadata
|
|
43373
|
+
* @static
|
|
43374
|
+
* @param {google.chat.v1.ForwardedMetadata} message ForwardedMetadata
|
|
43375
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
43376
|
+
* @returns {Object.<string,*>} Plain object
|
|
43377
|
+
*/
|
|
43378
|
+
ForwardedMetadata.toObject = function toObject(message, options) {
|
|
43379
|
+
if (!options)
|
|
43380
|
+
options = {};
|
|
43381
|
+
var object = {};
|
|
43382
|
+
if (options.defaults) {
|
|
43383
|
+
object.space = "";
|
|
43384
|
+
object.spaceDisplayName = "";
|
|
43385
|
+
}
|
|
43386
|
+
if (message.space != null && message.hasOwnProperty("space"))
|
|
43387
|
+
object.space = message.space;
|
|
43388
|
+
if (message.spaceDisplayName != null && message.hasOwnProperty("spaceDisplayName"))
|
|
43389
|
+
object.spaceDisplayName = message.spaceDisplayName;
|
|
43390
|
+
return object;
|
|
43391
|
+
};
|
|
43392
|
+
|
|
43393
|
+
/**
|
|
43394
|
+
* Converts this ForwardedMetadata to JSON.
|
|
43395
|
+
* @function toJSON
|
|
43396
|
+
* @memberof google.chat.v1.ForwardedMetadata
|
|
43397
|
+
* @instance
|
|
43398
|
+
* @returns {Object.<string,*>} JSON object
|
|
43399
|
+
*/
|
|
43400
|
+
ForwardedMetadata.prototype.toJSON = function toJSON() {
|
|
43401
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
43402
|
+
};
|
|
43403
|
+
|
|
43404
|
+
/**
|
|
43405
|
+
* Gets the default type url for ForwardedMetadata
|
|
43406
|
+
* @function getTypeUrl
|
|
43407
|
+
* @memberof google.chat.v1.ForwardedMetadata
|
|
43408
|
+
* @static
|
|
43409
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
43410
|
+
* @returns {string} The default type url
|
|
43411
|
+
*/
|
|
43412
|
+
ForwardedMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
43413
|
+
if (typeUrlPrefix === undefined) {
|
|
43414
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
43415
|
+
}
|
|
43416
|
+
return typeUrlPrefix + "/google.chat.v1.ForwardedMetadata";
|
|
43417
|
+
};
|
|
43418
|
+
|
|
43419
|
+
return ForwardedMetadata;
|
|
43420
|
+
})();
|
|
43421
|
+
|
|
42732
43422
|
v1.Thread = (function() {
|
|
42733
43423
|
|
|
42734
43424
|
/**
|