@google-apps/chat 0.3.0 → 0.4.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 +7 -0
- package/README.md +3 -0
- package/build/protos/google/chat/v1/chat_service.proto +43 -1
- package/build/protos/google/chat/v1/space_read_state.proto +112 -0
- package/build/protos/google/chat/v1/thread_read_state.proto +74 -0
- package/build/protos/protos.d.ts +566 -0
- package/build/protos/protos.js +1337 -131
- package/build/protos/protos.json +137 -2
- package/build/src/v1/chat_service_client.d.ts +195 -0
- package/build/src/v1/chat_service_client.js +148 -0
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/build/src/v1/chat_service_client_config.json +15 -0
- package/package.json +1 -1
package/build/protos/protos.js
CHANGED
|
@@ -30694,6 +30694,105 @@
|
|
|
30694
30694
|
* @variation 2
|
|
30695
30695
|
*/
|
|
30696
30696
|
|
|
30697
|
+
/**
|
|
30698
|
+
* Callback as used by {@link google.chat.v1.ChatService|getSpaceReadState}.
|
|
30699
|
+
* @memberof google.chat.v1.ChatService
|
|
30700
|
+
* @typedef GetSpaceReadStateCallback
|
|
30701
|
+
* @type {function}
|
|
30702
|
+
* @param {Error|null} error Error, if any
|
|
30703
|
+
* @param {google.chat.v1.SpaceReadState} [response] SpaceReadState
|
|
30704
|
+
*/
|
|
30705
|
+
|
|
30706
|
+
/**
|
|
30707
|
+
* Calls GetSpaceReadState.
|
|
30708
|
+
* @function getSpaceReadState
|
|
30709
|
+
* @memberof google.chat.v1.ChatService
|
|
30710
|
+
* @instance
|
|
30711
|
+
* @param {google.chat.v1.IGetSpaceReadStateRequest} request GetSpaceReadStateRequest message or plain object
|
|
30712
|
+
* @param {google.chat.v1.ChatService.GetSpaceReadStateCallback} callback Node-style callback called with the error, if any, and SpaceReadState
|
|
30713
|
+
* @returns {undefined}
|
|
30714
|
+
* @variation 1
|
|
30715
|
+
*/
|
|
30716
|
+
Object.defineProperty(ChatService.prototype.getSpaceReadState = function getSpaceReadState(request, callback) {
|
|
30717
|
+
return this.rpcCall(getSpaceReadState, $root.google.chat.v1.GetSpaceReadStateRequest, $root.google.chat.v1.SpaceReadState, request, callback);
|
|
30718
|
+
}, "name", { value: "GetSpaceReadState" });
|
|
30719
|
+
|
|
30720
|
+
/**
|
|
30721
|
+
* Calls GetSpaceReadState.
|
|
30722
|
+
* @function getSpaceReadState
|
|
30723
|
+
* @memberof google.chat.v1.ChatService
|
|
30724
|
+
* @instance
|
|
30725
|
+
* @param {google.chat.v1.IGetSpaceReadStateRequest} request GetSpaceReadStateRequest message or plain object
|
|
30726
|
+
* @returns {Promise<google.chat.v1.SpaceReadState>} Promise
|
|
30727
|
+
* @variation 2
|
|
30728
|
+
*/
|
|
30729
|
+
|
|
30730
|
+
/**
|
|
30731
|
+
* Callback as used by {@link google.chat.v1.ChatService|updateSpaceReadState}.
|
|
30732
|
+
* @memberof google.chat.v1.ChatService
|
|
30733
|
+
* @typedef UpdateSpaceReadStateCallback
|
|
30734
|
+
* @type {function}
|
|
30735
|
+
* @param {Error|null} error Error, if any
|
|
30736
|
+
* @param {google.chat.v1.SpaceReadState} [response] SpaceReadState
|
|
30737
|
+
*/
|
|
30738
|
+
|
|
30739
|
+
/**
|
|
30740
|
+
* Calls UpdateSpaceReadState.
|
|
30741
|
+
* @function updateSpaceReadState
|
|
30742
|
+
* @memberof google.chat.v1.ChatService
|
|
30743
|
+
* @instance
|
|
30744
|
+
* @param {google.chat.v1.IUpdateSpaceReadStateRequest} request UpdateSpaceReadStateRequest message or plain object
|
|
30745
|
+
* @param {google.chat.v1.ChatService.UpdateSpaceReadStateCallback} callback Node-style callback called with the error, if any, and SpaceReadState
|
|
30746
|
+
* @returns {undefined}
|
|
30747
|
+
* @variation 1
|
|
30748
|
+
*/
|
|
30749
|
+
Object.defineProperty(ChatService.prototype.updateSpaceReadState = function updateSpaceReadState(request, callback) {
|
|
30750
|
+
return this.rpcCall(updateSpaceReadState, $root.google.chat.v1.UpdateSpaceReadStateRequest, $root.google.chat.v1.SpaceReadState, request, callback);
|
|
30751
|
+
}, "name", { value: "UpdateSpaceReadState" });
|
|
30752
|
+
|
|
30753
|
+
/**
|
|
30754
|
+
* Calls UpdateSpaceReadState.
|
|
30755
|
+
* @function updateSpaceReadState
|
|
30756
|
+
* @memberof google.chat.v1.ChatService
|
|
30757
|
+
* @instance
|
|
30758
|
+
* @param {google.chat.v1.IUpdateSpaceReadStateRequest} request UpdateSpaceReadStateRequest message or plain object
|
|
30759
|
+
* @returns {Promise<google.chat.v1.SpaceReadState>} Promise
|
|
30760
|
+
* @variation 2
|
|
30761
|
+
*/
|
|
30762
|
+
|
|
30763
|
+
/**
|
|
30764
|
+
* Callback as used by {@link google.chat.v1.ChatService|getThreadReadState}.
|
|
30765
|
+
* @memberof google.chat.v1.ChatService
|
|
30766
|
+
* @typedef GetThreadReadStateCallback
|
|
30767
|
+
* @type {function}
|
|
30768
|
+
* @param {Error|null} error Error, if any
|
|
30769
|
+
* @param {google.chat.v1.ThreadReadState} [response] ThreadReadState
|
|
30770
|
+
*/
|
|
30771
|
+
|
|
30772
|
+
/**
|
|
30773
|
+
* Calls GetThreadReadState.
|
|
30774
|
+
* @function getThreadReadState
|
|
30775
|
+
* @memberof google.chat.v1.ChatService
|
|
30776
|
+
* @instance
|
|
30777
|
+
* @param {google.chat.v1.IGetThreadReadStateRequest} request GetThreadReadStateRequest message or plain object
|
|
30778
|
+
* @param {google.chat.v1.ChatService.GetThreadReadStateCallback} callback Node-style callback called with the error, if any, and ThreadReadState
|
|
30779
|
+
* @returns {undefined}
|
|
30780
|
+
* @variation 1
|
|
30781
|
+
*/
|
|
30782
|
+
Object.defineProperty(ChatService.prototype.getThreadReadState = function getThreadReadState(request, callback) {
|
|
30783
|
+
return this.rpcCall(getThreadReadState, $root.google.chat.v1.GetThreadReadStateRequest, $root.google.chat.v1.ThreadReadState, request, callback);
|
|
30784
|
+
}, "name", { value: "GetThreadReadState" });
|
|
30785
|
+
|
|
30786
|
+
/**
|
|
30787
|
+
* Calls GetThreadReadState.
|
|
30788
|
+
* @function getThreadReadState
|
|
30789
|
+
* @memberof google.chat.v1.ChatService
|
|
30790
|
+
* @instance
|
|
30791
|
+
* @param {google.chat.v1.IGetThreadReadStateRequest} request GetThreadReadStateRequest message or plain object
|
|
30792
|
+
* @returns {Promise<google.chat.v1.ThreadReadState>} Promise
|
|
30793
|
+
* @variation 2
|
|
30794
|
+
*/
|
|
30795
|
+
|
|
30697
30796
|
return ChatService;
|
|
30698
30797
|
})();
|
|
30699
30798
|
|
|
@@ -47975,27 +48074,25 @@
|
|
|
47975
48074
|
return values;
|
|
47976
48075
|
})();
|
|
47977
48076
|
|
|
47978
|
-
v1.
|
|
48077
|
+
v1.SpaceReadState = (function() {
|
|
47979
48078
|
|
|
47980
48079
|
/**
|
|
47981
|
-
* Properties of a
|
|
48080
|
+
* Properties of a SpaceReadState.
|
|
47982
48081
|
* @memberof google.chat.v1
|
|
47983
|
-
* @interface
|
|
47984
|
-
* @property {
|
|
47985
|
-
* @property {
|
|
47986
|
-
* @property {Array.<google.chat.v1.IMembership>|null} [memberships] SetUpSpaceRequest memberships
|
|
48082
|
+
* @interface ISpaceReadState
|
|
48083
|
+
* @property {string|null} [name] SpaceReadState name
|
|
48084
|
+
* @property {google.protobuf.ITimestamp|null} [lastReadTime] SpaceReadState lastReadTime
|
|
47987
48085
|
*/
|
|
47988
48086
|
|
|
47989
48087
|
/**
|
|
47990
|
-
* Constructs a new
|
|
48088
|
+
* Constructs a new SpaceReadState.
|
|
47991
48089
|
* @memberof google.chat.v1
|
|
47992
|
-
* @classdesc Represents a
|
|
47993
|
-
* @implements
|
|
48090
|
+
* @classdesc Represents a SpaceReadState.
|
|
48091
|
+
* @implements ISpaceReadState
|
|
47994
48092
|
* @constructor
|
|
47995
|
-
* @param {google.chat.v1.
|
|
48093
|
+
* @param {google.chat.v1.ISpaceReadState=} [properties] Properties to set
|
|
47996
48094
|
*/
|
|
47997
|
-
function
|
|
47998
|
-
this.memberships = [];
|
|
48095
|
+
function SpaceReadState(properties) {
|
|
47999
48096
|
if (properties)
|
|
48000
48097
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
48001
48098
|
if (properties[keys[i]] != null)
|
|
@@ -48003,106 +48100,89 @@
|
|
|
48003
48100
|
}
|
|
48004
48101
|
|
|
48005
48102
|
/**
|
|
48006
|
-
*
|
|
48007
|
-
* @member {
|
|
48008
|
-
* @memberof google.chat.v1.
|
|
48009
|
-
* @instance
|
|
48010
|
-
*/
|
|
48011
|
-
SetUpSpaceRequest.prototype.space = null;
|
|
48012
|
-
|
|
48013
|
-
/**
|
|
48014
|
-
* SetUpSpaceRequest requestId.
|
|
48015
|
-
* @member {string} requestId
|
|
48016
|
-
* @memberof google.chat.v1.SetUpSpaceRequest
|
|
48103
|
+
* SpaceReadState name.
|
|
48104
|
+
* @member {string} name
|
|
48105
|
+
* @memberof google.chat.v1.SpaceReadState
|
|
48017
48106
|
* @instance
|
|
48018
48107
|
*/
|
|
48019
|
-
|
|
48108
|
+
SpaceReadState.prototype.name = "";
|
|
48020
48109
|
|
|
48021
48110
|
/**
|
|
48022
|
-
*
|
|
48023
|
-
* @member {
|
|
48024
|
-
* @memberof google.chat.v1.
|
|
48111
|
+
* SpaceReadState lastReadTime.
|
|
48112
|
+
* @member {google.protobuf.ITimestamp|null|undefined} lastReadTime
|
|
48113
|
+
* @memberof google.chat.v1.SpaceReadState
|
|
48025
48114
|
* @instance
|
|
48026
48115
|
*/
|
|
48027
|
-
|
|
48116
|
+
SpaceReadState.prototype.lastReadTime = null;
|
|
48028
48117
|
|
|
48029
48118
|
/**
|
|
48030
|
-
* Creates a new
|
|
48119
|
+
* Creates a new SpaceReadState instance using the specified properties.
|
|
48031
48120
|
* @function create
|
|
48032
|
-
* @memberof google.chat.v1.
|
|
48121
|
+
* @memberof google.chat.v1.SpaceReadState
|
|
48033
48122
|
* @static
|
|
48034
|
-
* @param {google.chat.v1.
|
|
48035
|
-
* @returns {google.chat.v1.
|
|
48123
|
+
* @param {google.chat.v1.ISpaceReadState=} [properties] Properties to set
|
|
48124
|
+
* @returns {google.chat.v1.SpaceReadState} SpaceReadState instance
|
|
48036
48125
|
*/
|
|
48037
|
-
|
|
48038
|
-
return new
|
|
48126
|
+
SpaceReadState.create = function create(properties) {
|
|
48127
|
+
return new SpaceReadState(properties);
|
|
48039
48128
|
};
|
|
48040
48129
|
|
|
48041
48130
|
/**
|
|
48042
|
-
* Encodes the specified
|
|
48131
|
+
* Encodes the specified SpaceReadState message. Does not implicitly {@link google.chat.v1.SpaceReadState.verify|verify} messages.
|
|
48043
48132
|
* @function encode
|
|
48044
|
-
* @memberof google.chat.v1.
|
|
48133
|
+
* @memberof google.chat.v1.SpaceReadState
|
|
48045
48134
|
* @static
|
|
48046
|
-
* @param {google.chat.v1.
|
|
48135
|
+
* @param {google.chat.v1.ISpaceReadState} message SpaceReadState message or plain object to encode
|
|
48047
48136
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
48048
48137
|
* @returns {$protobuf.Writer} Writer
|
|
48049
48138
|
*/
|
|
48050
|
-
|
|
48139
|
+
SpaceReadState.encode = function encode(message, writer) {
|
|
48051
48140
|
if (!writer)
|
|
48052
48141
|
writer = $Writer.create();
|
|
48053
|
-
if (message.
|
|
48054
|
-
|
|
48055
|
-
if (message.
|
|
48056
|
-
writer.uint32(/* id 2, wireType 2 =*/18).
|
|
48057
|
-
if (message.memberships != null && message.memberships.length)
|
|
48058
|
-
for (var i = 0; i < message.memberships.length; ++i)
|
|
48059
|
-
$root.google.chat.v1.Membership.encode(message.memberships[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
48142
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
48143
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
48144
|
+
if (message.lastReadTime != null && Object.hasOwnProperty.call(message, "lastReadTime"))
|
|
48145
|
+
$root.google.protobuf.Timestamp.encode(message.lastReadTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
48060
48146
|
return writer;
|
|
48061
48147
|
};
|
|
48062
48148
|
|
|
48063
48149
|
/**
|
|
48064
|
-
* Encodes the specified
|
|
48150
|
+
* Encodes the specified SpaceReadState message, length delimited. Does not implicitly {@link google.chat.v1.SpaceReadState.verify|verify} messages.
|
|
48065
48151
|
* @function encodeDelimited
|
|
48066
|
-
* @memberof google.chat.v1.
|
|
48152
|
+
* @memberof google.chat.v1.SpaceReadState
|
|
48067
48153
|
* @static
|
|
48068
|
-
* @param {google.chat.v1.
|
|
48154
|
+
* @param {google.chat.v1.ISpaceReadState} message SpaceReadState message or plain object to encode
|
|
48069
48155
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
48070
48156
|
* @returns {$protobuf.Writer} Writer
|
|
48071
48157
|
*/
|
|
48072
|
-
|
|
48158
|
+
SpaceReadState.encodeDelimited = function encodeDelimited(message, writer) {
|
|
48073
48159
|
return this.encode(message, writer).ldelim();
|
|
48074
48160
|
};
|
|
48075
48161
|
|
|
48076
48162
|
/**
|
|
48077
|
-
* Decodes a
|
|
48163
|
+
* Decodes a SpaceReadState message from the specified reader or buffer.
|
|
48078
48164
|
* @function decode
|
|
48079
|
-
* @memberof google.chat.v1.
|
|
48165
|
+
* @memberof google.chat.v1.SpaceReadState
|
|
48080
48166
|
* @static
|
|
48081
48167
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
48082
48168
|
* @param {number} [length] Message length if known beforehand
|
|
48083
|
-
* @returns {google.chat.v1.
|
|
48169
|
+
* @returns {google.chat.v1.SpaceReadState} SpaceReadState
|
|
48084
48170
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
48085
48171
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
48086
48172
|
*/
|
|
48087
|
-
|
|
48173
|
+
SpaceReadState.decode = function decode(reader, length) {
|
|
48088
48174
|
if (!(reader instanceof $Reader))
|
|
48089
48175
|
reader = $Reader.create(reader);
|
|
48090
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.
|
|
48176
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.SpaceReadState();
|
|
48091
48177
|
while (reader.pos < end) {
|
|
48092
48178
|
var tag = reader.uint32();
|
|
48093
48179
|
switch (tag >>> 3) {
|
|
48094
48180
|
case 1: {
|
|
48095
|
-
message.
|
|
48181
|
+
message.name = reader.string();
|
|
48096
48182
|
break;
|
|
48097
48183
|
}
|
|
48098
48184
|
case 2: {
|
|
48099
|
-
message.
|
|
48100
|
-
break;
|
|
48101
|
-
}
|
|
48102
|
-
case 4: {
|
|
48103
|
-
if (!(message.memberships && message.memberships.length))
|
|
48104
|
-
message.memberships = [];
|
|
48105
|
-
message.memberships.push($root.google.chat.v1.Membership.decode(reader, reader.uint32()));
|
|
48185
|
+
message.lastReadTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
|
48106
48186
|
break;
|
|
48107
48187
|
}
|
|
48108
48188
|
default:
|
|
@@ -48114,142 +48194,1268 @@
|
|
|
48114
48194
|
};
|
|
48115
48195
|
|
|
48116
48196
|
/**
|
|
48117
|
-
* Decodes a
|
|
48197
|
+
* Decodes a SpaceReadState message from the specified reader or buffer, length delimited.
|
|
48118
48198
|
* @function decodeDelimited
|
|
48119
|
-
* @memberof google.chat.v1.
|
|
48199
|
+
* @memberof google.chat.v1.SpaceReadState
|
|
48120
48200
|
* @static
|
|
48121
48201
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
48122
|
-
* @returns {google.chat.v1.
|
|
48202
|
+
* @returns {google.chat.v1.SpaceReadState} SpaceReadState
|
|
48123
48203
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
48124
48204
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
48125
48205
|
*/
|
|
48126
|
-
|
|
48206
|
+
SpaceReadState.decodeDelimited = function decodeDelimited(reader) {
|
|
48127
48207
|
if (!(reader instanceof $Reader))
|
|
48128
48208
|
reader = new $Reader(reader);
|
|
48129
48209
|
return this.decode(reader, reader.uint32());
|
|
48130
48210
|
};
|
|
48131
48211
|
|
|
48132
48212
|
/**
|
|
48133
|
-
* Verifies a
|
|
48213
|
+
* Verifies a SpaceReadState message.
|
|
48134
48214
|
* @function verify
|
|
48135
|
-
* @memberof google.chat.v1.
|
|
48215
|
+
* @memberof google.chat.v1.SpaceReadState
|
|
48136
48216
|
* @static
|
|
48137
48217
|
* @param {Object.<string,*>} message Plain object to verify
|
|
48138
48218
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
48139
48219
|
*/
|
|
48140
|
-
|
|
48220
|
+
SpaceReadState.verify = function verify(message) {
|
|
48141
48221
|
if (typeof message !== "object" || message === null)
|
|
48142
48222
|
return "object expected";
|
|
48143
|
-
if (message.
|
|
48144
|
-
|
|
48223
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
48224
|
+
if (!$util.isString(message.name))
|
|
48225
|
+
return "name: string expected";
|
|
48226
|
+
if (message.lastReadTime != null && message.hasOwnProperty("lastReadTime")) {
|
|
48227
|
+
var error = $root.google.protobuf.Timestamp.verify(message.lastReadTime);
|
|
48145
48228
|
if (error)
|
|
48146
|
-
return "
|
|
48147
|
-
}
|
|
48148
|
-
if (message.requestId != null && message.hasOwnProperty("requestId"))
|
|
48149
|
-
if (!$util.isString(message.requestId))
|
|
48150
|
-
return "requestId: string expected";
|
|
48151
|
-
if (message.memberships != null && message.hasOwnProperty("memberships")) {
|
|
48152
|
-
if (!Array.isArray(message.memberships))
|
|
48153
|
-
return "memberships: array expected";
|
|
48154
|
-
for (var i = 0; i < message.memberships.length; ++i) {
|
|
48155
|
-
var error = $root.google.chat.v1.Membership.verify(message.memberships[i]);
|
|
48156
|
-
if (error)
|
|
48157
|
-
return "memberships." + error;
|
|
48158
|
-
}
|
|
48229
|
+
return "lastReadTime." + error;
|
|
48159
48230
|
}
|
|
48160
48231
|
return null;
|
|
48161
48232
|
};
|
|
48162
48233
|
|
|
48163
48234
|
/**
|
|
48164
|
-
* Creates a
|
|
48235
|
+
* Creates a SpaceReadState message from a plain object. Also converts values to their respective internal types.
|
|
48165
48236
|
* @function fromObject
|
|
48166
|
-
* @memberof google.chat.v1.
|
|
48237
|
+
* @memberof google.chat.v1.SpaceReadState
|
|
48167
48238
|
* @static
|
|
48168
48239
|
* @param {Object.<string,*>} object Plain object
|
|
48169
|
-
* @returns {google.chat.v1.
|
|
48240
|
+
* @returns {google.chat.v1.SpaceReadState} SpaceReadState
|
|
48170
48241
|
*/
|
|
48171
|
-
|
|
48172
|
-
if (object instanceof $root.google.chat.v1.
|
|
48242
|
+
SpaceReadState.fromObject = function fromObject(object) {
|
|
48243
|
+
if (object instanceof $root.google.chat.v1.SpaceReadState)
|
|
48173
48244
|
return object;
|
|
48174
|
-
var message = new $root.google.chat.v1.
|
|
48175
|
-
if (object.
|
|
48176
|
-
|
|
48177
|
-
|
|
48178
|
-
|
|
48179
|
-
|
|
48180
|
-
|
|
48181
|
-
message.requestId = String(object.requestId);
|
|
48182
|
-
if (object.memberships) {
|
|
48183
|
-
if (!Array.isArray(object.memberships))
|
|
48184
|
-
throw TypeError(".google.chat.v1.SetUpSpaceRequest.memberships: array expected");
|
|
48185
|
-
message.memberships = [];
|
|
48186
|
-
for (var i = 0; i < object.memberships.length; ++i) {
|
|
48187
|
-
if (typeof object.memberships[i] !== "object")
|
|
48188
|
-
throw TypeError(".google.chat.v1.SetUpSpaceRequest.memberships: object expected");
|
|
48189
|
-
message.memberships[i] = $root.google.chat.v1.Membership.fromObject(object.memberships[i]);
|
|
48190
|
-
}
|
|
48245
|
+
var message = new $root.google.chat.v1.SpaceReadState();
|
|
48246
|
+
if (object.name != null)
|
|
48247
|
+
message.name = String(object.name);
|
|
48248
|
+
if (object.lastReadTime != null) {
|
|
48249
|
+
if (typeof object.lastReadTime !== "object")
|
|
48250
|
+
throw TypeError(".google.chat.v1.SpaceReadState.lastReadTime: object expected");
|
|
48251
|
+
message.lastReadTime = $root.google.protobuf.Timestamp.fromObject(object.lastReadTime);
|
|
48191
48252
|
}
|
|
48192
48253
|
return message;
|
|
48193
48254
|
};
|
|
48194
48255
|
|
|
48195
48256
|
/**
|
|
48196
|
-
* Creates a plain object from a
|
|
48257
|
+
* Creates a plain object from a SpaceReadState message. Also converts values to other types if specified.
|
|
48197
48258
|
* @function toObject
|
|
48198
|
-
* @memberof google.chat.v1.
|
|
48259
|
+
* @memberof google.chat.v1.SpaceReadState
|
|
48199
48260
|
* @static
|
|
48200
|
-
* @param {google.chat.v1.
|
|
48261
|
+
* @param {google.chat.v1.SpaceReadState} message SpaceReadState
|
|
48201
48262
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
48202
48263
|
* @returns {Object.<string,*>} Plain object
|
|
48203
48264
|
*/
|
|
48204
|
-
|
|
48265
|
+
SpaceReadState.toObject = function toObject(message, options) {
|
|
48205
48266
|
if (!options)
|
|
48206
48267
|
options = {};
|
|
48207
48268
|
var object = {};
|
|
48208
|
-
if (options.arrays || options.defaults)
|
|
48209
|
-
object.memberships = [];
|
|
48210
48269
|
if (options.defaults) {
|
|
48211
|
-
object.
|
|
48212
|
-
object.
|
|
48213
|
-
}
|
|
48214
|
-
if (message.space != null && message.hasOwnProperty("space"))
|
|
48215
|
-
object.space = $root.google.chat.v1.Space.toObject(message.space, options);
|
|
48216
|
-
if (message.requestId != null && message.hasOwnProperty("requestId"))
|
|
48217
|
-
object.requestId = message.requestId;
|
|
48218
|
-
if (message.memberships && message.memberships.length) {
|
|
48219
|
-
object.memberships = [];
|
|
48220
|
-
for (var j = 0; j < message.memberships.length; ++j)
|
|
48221
|
-
object.memberships[j] = $root.google.chat.v1.Membership.toObject(message.memberships[j], options);
|
|
48270
|
+
object.name = "";
|
|
48271
|
+
object.lastReadTime = null;
|
|
48222
48272
|
}
|
|
48273
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
48274
|
+
object.name = message.name;
|
|
48275
|
+
if (message.lastReadTime != null && message.hasOwnProperty("lastReadTime"))
|
|
48276
|
+
object.lastReadTime = $root.google.protobuf.Timestamp.toObject(message.lastReadTime, options);
|
|
48223
48277
|
return object;
|
|
48224
48278
|
};
|
|
48225
48279
|
|
|
48226
48280
|
/**
|
|
48227
|
-
* Converts this
|
|
48281
|
+
* Converts this SpaceReadState to JSON.
|
|
48228
48282
|
* @function toJSON
|
|
48229
|
-
* @memberof google.chat.v1.
|
|
48283
|
+
* @memberof google.chat.v1.SpaceReadState
|
|
48230
48284
|
* @instance
|
|
48231
48285
|
* @returns {Object.<string,*>} JSON object
|
|
48232
48286
|
*/
|
|
48233
|
-
|
|
48287
|
+
SpaceReadState.prototype.toJSON = function toJSON() {
|
|
48234
48288
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
48235
48289
|
};
|
|
48236
48290
|
|
|
48237
48291
|
/**
|
|
48238
|
-
* Gets the default type url for
|
|
48292
|
+
* Gets the default type url for SpaceReadState
|
|
48239
48293
|
* @function getTypeUrl
|
|
48240
|
-
* @memberof google.chat.v1.
|
|
48294
|
+
* @memberof google.chat.v1.SpaceReadState
|
|
48241
48295
|
* @static
|
|
48242
48296
|
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
48243
48297
|
* @returns {string} The default type url
|
|
48244
48298
|
*/
|
|
48245
|
-
|
|
48299
|
+
SpaceReadState.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
48246
48300
|
if (typeUrlPrefix === undefined) {
|
|
48247
48301
|
typeUrlPrefix = "type.googleapis.com";
|
|
48248
48302
|
}
|
|
48249
|
-
return typeUrlPrefix + "/google.chat.v1.
|
|
48303
|
+
return typeUrlPrefix + "/google.chat.v1.SpaceReadState";
|
|
48250
48304
|
};
|
|
48251
48305
|
|
|
48252
|
-
return
|
|
48306
|
+
return SpaceReadState;
|
|
48307
|
+
})();
|
|
48308
|
+
|
|
48309
|
+
v1.GetSpaceReadStateRequest = (function() {
|
|
48310
|
+
|
|
48311
|
+
/**
|
|
48312
|
+
* Properties of a GetSpaceReadStateRequest.
|
|
48313
|
+
* @memberof google.chat.v1
|
|
48314
|
+
* @interface IGetSpaceReadStateRequest
|
|
48315
|
+
* @property {string|null} [name] GetSpaceReadStateRequest name
|
|
48316
|
+
*/
|
|
48317
|
+
|
|
48318
|
+
/**
|
|
48319
|
+
* Constructs a new GetSpaceReadStateRequest.
|
|
48320
|
+
* @memberof google.chat.v1
|
|
48321
|
+
* @classdesc Represents a GetSpaceReadStateRequest.
|
|
48322
|
+
* @implements IGetSpaceReadStateRequest
|
|
48323
|
+
* @constructor
|
|
48324
|
+
* @param {google.chat.v1.IGetSpaceReadStateRequest=} [properties] Properties to set
|
|
48325
|
+
*/
|
|
48326
|
+
function GetSpaceReadStateRequest(properties) {
|
|
48327
|
+
if (properties)
|
|
48328
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
48329
|
+
if (properties[keys[i]] != null)
|
|
48330
|
+
this[keys[i]] = properties[keys[i]];
|
|
48331
|
+
}
|
|
48332
|
+
|
|
48333
|
+
/**
|
|
48334
|
+
* GetSpaceReadStateRequest name.
|
|
48335
|
+
* @member {string} name
|
|
48336
|
+
* @memberof google.chat.v1.GetSpaceReadStateRequest
|
|
48337
|
+
* @instance
|
|
48338
|
+
*/
|
|
48339
|
+
GetSpaceReadStateRequest.prototype.name = "";
|
|
48340
|
+
|
|
48341
|
+
/**
|
|
48342
|
+
* Creates a new GetSpaceReadStateRequest instance using the specified properties.
|
|
48343
|
+
* @function create
|
|
48344
|
+
* @memberof google.chat.v1.GetSpaceReadStateRequest
|
|
48345
|
+
* @static
|
|
48346
|
+
* @param {google.chat.v1.IGetSpaceReadStateRequest=} [properties] Properties to set
|
|
48347
|
+
* @returns {google.chat.v1.GetSpaceReadStateRequest} GetSpaceReadStateRequest instance
|
|
48348
|
+
*/
|
|
48349
|
+
GetSpaceReadStateRequest.create = function create(properties) {
|
|
48350
|
+
return new GetSpaceReadStateRequest(properties);
|
|
48351
|
+
};
|
|
48352
|
+
|
|
48353
|
+
/**
|
|
48354
|
+
* Encodes the specified GetSpaceReadStateRequest message. Does not implicitly {@link google.chat.v1.GetSpaceReadStateRequest.verify|verify} messages.
|
|
48355
|
+
* @function encode
|
|
48356
|
+
* @memberof google.chat.v1.GetSpaceReadStateRequest
|
|
48357
|
+
* @static
|
|
48358
|
+
* @param {google.chat.v1.IGetSpaceReadStateRequest} message GetSpaceReadStateRequest message or plain object to encode
|
|
48359
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
48360
|
+
* @returns {$protobuf.Writer} Writer
|
|
48361
|
+
*/
|
|
48362
|
+
GetSpaceReadStateRequest.encode = function encode(message, writer) {
|
|
48363
|
+
if (!writer)
|
|
48364
|
+
writer = $Writer.create();
|
|
48365
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
48366
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
48367
|
+
return writer;
|
|
48368
|
+
};
|
|
48369
|
+
|
|
48370
|
+
/**
|
|
48371
|
+
* Encodes the specified GetSpaceReadStateRequest message, length delimited. Does not implicitly {@link google.chat.v1.GetSpaceReadStateRequest.verify|verify} messages.
|
|
48372
|
+
* @function encodeDelimited
|
|
48373
|
+
* @memberof google.chat.v1.GetSpaceReadStateRequest
|
|
48374
|
+
* @static
|
|
48375
|
+
* @param {google.chat.v1.IGetSpaceReadStateRequest} message GetSpaceReadStateRequest message or plain object to encode
|
|
48376
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
48377
|
+
* @returns {$protobuf.Writer} Writer
|
|
48378
|
+
*/
|
|
48379
|
+
GetSpaceReadStateRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
48380
|
+
return this.encode(message, writer).ldelim();
|
|
48381
|
+
};
|
|
48382
|
+
|
|
48383
|
+
/**
|
|
48384
|
+
* Decodes a GetSpaceReadStateRequest message from the specified reader or buffer.
|
|
48385
|
+
* @function decode
|
|
48386
|
+
* @memberof google.chat.v1.GetSpaceReadStateRequest
|
|
48387
|
+
* @static
|
|
48388
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
48389
|
+
* @param {number} [length] Message length if known beforehand
|
|
48390
|
+
* @returns {google.chat.v1.GetSpaceReadStateRequest} GetSpaceReadStateRequest
|
|
48391
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
48392
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
48393
|
+
*/
|
|
48394
|
+
GetSpaceReadStateRequest.decode = function decode(reader, length) {
|
|
48395
|
+
if (!(reader instanceof $Reader))
|
|
48396
|
+
reader = $Reader.create(reader);
|
|
48397
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.GetSpaceReadStateRequest();
|
|
48398
|
+
while (reader.pos < end) {
|
|
48399
|
+
var tag = reader.uint32();
|
|
48400
|
+
switch (tag >>> 3) {
|
|
48401
|
+
case 1: {
|
|
48402
|
+
message.name = reader.string();
|
|
48403
|
+
break;
|
|
48404
|
+
}
|
|
48405
|
+
default:
|
|
48406
|
+
reader.skipType(tag & 7);
|
|
48407
|
+
break;
|
|
48408
|
+
}
|
|
48409
|
+
}
|
|
48410
|
+
return message;
|
|
48411
|
+
};
|
|
48412
|
+
|
|
48413
|
+
/**
|
|
48414
|
+
* Decodes a GetSpaceReadStateRequest message from the specified reader or buffer, length delimited.
|
|
48415
|
+
* @function decodeDelimited
|
|
48416
|
+
* @memberof google.chat.v1.GetSpaceReadStateRequest
|
|
48417
|
+
* @static
|
|
48418
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
48419
|
+
* @returns {google.chat.v1.GetSpaceReadStateRequest} GetSpaceReadStateRequest
|
|
48420
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
48421
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
48422
|
+
*/
|
|
48423
|
+
GetSpaceReadStateRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
48424
|
+
if (!(reader instanceof $Reader))
|
|
48425
|
+
reader = new $Reader(reader);
|
|
48426
|
+
return this.decode(reader, reader.uint32());
|
|
48427
|
+
};
|
|
48428
|
+
|
|
48429
|
+
/**
|
|
48430
|
+
* Verifies a GetSpaceReadStateRequest message.
|
|
48431
|
+
* @function verify
|
|
48432
|
+
* @memberof google.chat.v1.GetSpaceReadStateRequest
|
|
48433
|
+
* @static
|
|
48434
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
48435
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
48436
|
+
*/
|
|
48437
|
+
GetSpaceReadStateRequest.verify = function verify(message) {
|
|
48438
|
+
if (typeof message !== "object" || message === null)
|
|
48439
|
+
return "object expected";
|
|
48440
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
48441
|
+
if (!$util.isString(message.name))
|
|
48442
|
+
return "name: string expected";
|
|
48443
|
+
return null;
|
|
48444
|
+
};
|
|
48445
|
+
|
|
48446
|
+
/**
|
|
48447
|
+
* Creates a GetSpaceReadStateRequest message from a plain object. Also converts values to their respective internal types.
|
|
48448
|
+
* @function fromObject
|
|
48449
|
+
* @memberof google.chat.v1.GetSpaceReadStateRequest
|
|
48450
|
+
* @static
|
|
48451
|
+
* @param {Object.<string,*>} object Plain object
|
|
48452
|
+
* @returns {google.chat.v1.GetSpaceReadStateRequest} GetSpaceReadStateRequest
|
|
48453
|
+
*/
|
|
48454
|
+
GetSpaceReadStateRequest.fromObject = function fromObject(object) {
|
|
48455
|
+
if (object instanceof $root.google.chat.v1.GetSpaceReadStateRequest)
|
|
48456
|
+
return object;
|
|
48457
|
+
var message = new $root.google.chat.v1.GetSpaceReadStateRequest();
|
|
48458
|
+
if (object.name != null)
|
|
48459
|
+
message.name = String(object.name);
|
|
48460
|
+
return message;
|
|
48461
|
+
};
|
|
48462
|
+
|
|
48463
|
+
/**
|
|
48464
|
+
* Creates a plain object from a GetSpaceReadStateRequest message. Also converts values to other types if specified.
|
|
48465
|
+
* @function toObject
|
|
48466
|
+
* @memberof google.chat.v1.GetSpaceReadStateRequest
|
|
48467
|
+
* @static
|
|
48468
|
+
* @param {google.chat.v1.GetSpaceReadStateRequest} message GetSpaceReadStateRequest
|
|
48469
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
48470
|
+
* @returns {Object.<string,*>} Plain object
|
|
48471
|
+
*/
|
|
48472
|
+
GetSpaceReadStateRequest.toObject = function toObject(message, options) {
|
|
48473
|
+
if (!options)
|
|
48474
|
+
options = {};
|
|
48475
|
+
var object = {};
|
|
48476
|
+
if (options.defaults)
|
|
48477
|
+
object.name = "";
|
|
48478
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
48479
|
+
object.name = message.name;
|
|
48480
|
+
return object;
|
|
48481
|
+
};
|
|
48482
|
+
|
|
48483
|
+
/**
|
|
48484
|
+
* Converts this GetSpaceReadStateRequest to JSON.
|
|
48485
|
+
* @function toJSON
|
|
48486
|
+
* @memberof google.chat.v1.GetSpaceReadStateRequest
|
|
48487
|
+
* @instance
|
|
48488
|
+
* @returns {Object.<string,*>} JSON object
|
|
48489
|
+
*/
|
|
48490
|
+
GetSpaceReadStateRequest.prototype.toJSON = function toJSON() {
|
|
48491
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
48492
|
+
};
|
|
48493
|
+
|
|
48494
|
+
/**
|
|
48495
|
+
* Gets the default type url for GetSpaceReadStateRequest
|
|
48496
|
+
* @function getTypeUrl
|
|
48497
|
+
* @memberof google.chat.v1.GetSpaceReadStateRequest
|
|
48498
|
+
* @static
|
|
48499
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
48500
|
+
* @returns {string} The default type url
|
|
48501
|
+
*/
|
|
48502
|
+
GetSpaceReadStateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
48503
|
+
if (typeUrlPrefix === undefined) {
|
|
48504
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
48505
|
+
}
|
|
48506
|
+
return typeUrlPrefix + "/google.chat.v1.GetSpaceReadStateRequest";
|
|
48507
|
+
};
|
|
48508
|
+
|
|
48509
|
+
return GetSpaceReadStateRequest;
|
|
48510
|
+
})();
|
|
48511
|
+
|
|
48512
|
+
v1.UpdateSpaceReadStateRequest = (function() {
|
|
48513
|
+
|
|
48514
|
+
/**
|
|
48515
|
+
* Properties of an UpdateSpaceReadStateRequest.
|
|
48516
|
+
* @memberof google.chat.v1
|
|
48517
|
+
* @interface IUpdateSpaceReadStateRequest
|
|
48518
|
+
* @property {google.chat.v1.ISpaceReadState|null} [spaceReadState] UpdateSpaceReadStateRequest spaceReadState
|
|
48519
|
+
* @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSpaceReadStateRequest updateMask
|
|
48520
|
+
*/
|
|
48521
|
+
|
|
48522
|
+
/**
|
|
48523
|
+
* Constructs a new UpdateSpaceReadStateRequest.
|
|
48524
|
+
* @memberof google.chat.v1
|
|
48525
|
+
* @classdesc Represents an UpdateSpaceReadStateRequest.
|
|
48526
|
+
* @implements IUpdateSpaceReadStateRequest
|
|
48527
|
+
* @constructor
|
|
48528
|
+
* @param {google.chat.v1.IUpdateSpaceReadStateRequest=} [properties] Properties to set
|
|
48529
|
+
*/
|
|
48530
|
+
function UpdateSpaceReadStateRequest(properties) {
|
|
48531
|
+
if (properties)
|
|
48532
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
48533
|
+
if (properties[keys[i]] != null)
|
|
48534
|
+
this[keys[i]] = properties[keys[i]];
|
|
48535
|
+
}
|
|
48536
|
+
|
|
48537
|
+
/**
|
|
48538
|
+
* UpdateSpaceReadStateRequest spaceReadState.
|
|
48539
|
+
* @member {google.chat.v1.ISpaceReadState|null|undefined} spaceReadState
|
|
48540
|
+
* @memberof google.chat.v1.UpdateSpaceReadStateRequest
|
|
48541
|
+
* @instance
|
|
48542
|
+
*/
|
|
48543
|
+
UpdateSpaceReadStateRequest.prototype.spaceReadState = null;
|
|
48544
|
+
|
|
48545
|
+
/**
|
|
48546
|
+
* UpdateSpaceReadStateRequest updateMask.
|
|
48547
|
+
* @member {google.protobuf.IFieldMask|null|undefined} updateMask
|
|
48548
|
+
* @memberof google.chat.v1.UpdateSpaceReadStateRequest
|
|
48549
|
+
* @instance
|
|
48550
|
+
*/
|
|
48551
|
+
UpdateSpaceReadStateRequest.prototype.updateMask = null;
|
|
48552
|
+
|
|
48553
|
+
/**
|
|
48554
|
+
* Creates a new UpdateSpaceReadStateRequest instance using the specified properties.
|
|
48555
|
+
* @function create
|
|
48556
|
+
* @memberof google.chat.v1.UpdateSpaceReadStateRequest
|
|
48557
|
+
* @static
|
|
48558
|
+
* @param {google.chat.v1.IUpdateSpaceReadStateRequest=} [properties] Properties to set
|
|
48559
|
+
* @returns {google.chat.v1.UpdateSpaceReadStateRequest} UpdateSpaceReadStateRequest instance
|
|
48560
|
+
*/
|
|
48561
|
+
UpdateSpaceReadStateRequest.create = function create(properties) {
|
|
48562
|
+
return new UpdateSpaceReadStateRequest(properties);
|
|
48563
|
+
};
|
|
48564
|
+
|
|
48565
|
+
/**
|
|
48566
|
+
* Encodes the specified UpdateSpaceReadStateRequest message. Does not implicitly {@link google.chat.v1.UpdateSpaceReadStateRequest.verify|verify} messages.
|
|
48567
|
+
* @function encode
|
|
48568
|
+
* @memberof google.chat.v1.UpdateSpaceReadStateRequest
|
|
48569
|
+
* @static
|
|
48570
|
+
* @param {google.chat.v1.IUpdateSpaceReadStateRequest} message UpdateSpaceReadStateRequest message or plain object to encode
|
|
48571
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
48572
|
+
* @returns {$protobuf.Writer} Writer
|
|
48573
|
+
*/
|
|
48574
|
+
UpdateSpaceReadStateRequest.encode = function encode(message, writer) {
|
|
48575
|
+
if (!writer)
|
|
48576
|
+
writer = $Writer.create();
|
|
48577
|
+
if (message.spaceReadState != null && Object.hasOwnProperty.call(message, "spaceReadState"))
|
|
48578
|
+
$root.google.chat.v1.SpaceReadState.encode(message.spaceReadState, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
48579
|
+
if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask"))
|
|
48580
|
+
$root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
48581
|
+
return writer;
|
|
48582
|
+
};
|
|
48583
|
+
|
|
48584
|
+
/**
|
|
48585
|
+
* Encodes the specified UpdateSpaceReadStateRequest message, length delimited. Does not implicitly {@link google.chat.v1.UpdateSpaceReadStateRequest.verify|verify} messages.
|
|
48586
|
+
* @function encodeDelimited
|
|
48587
|
+
* @memberof google.chat.v1.UpdateSpaceReadStateRequest
|
|
48588
|
+
* @static
|
|
48589
|
+
* @param {google.chat.v1.IUpdateSpaceReadStateRequest} message UpdateSpaceReadStateRequest message or plain object to encode
|
|
48590
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
48591
|
+
* @returns {$protobuf.Writer} Writer
|
|
48592
|
+
*/
|
|
48593
|
+
UpdateSpaceReadStateRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
48594
|
+
return this.encode(message, writer).ldelim();
|
|
48595
|
+
};
|
|
48596
|
+
|
|
48597
|
+
/**
|
|
48598
|
+
* Decodes an UpdateSpaceReadStateRequest message from the specified reader or buffer.
|
|
48599
|
+
* @function decode
|
|
48600
|
+
* @memberof google.chat.v1.UpdateSpaceReadStateRequest
|
|
48601
|
+
* @static
|
|
48602
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
48603
|
+
* @param {number} [length] Message length if known beforehand
|
|
48604
|
+
* @returns {google.chat.v1.UpdateSpaceReadStateRequest} UpdateSpaceReadStateRequest
|
|
48605
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
48606
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
48607
|
+
*/
|
|
48608
|
+
UpdateSpaceReadStateRequest.decode = function decode(reader, length) {
|
|
48609
|
+
if (!(reader instanceof $Reader))
|
|
48610
|
+
reader = $Reader.create(reader);
|
|
48611
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.UpdateSpaceReadStateRequest();
|
|
48612
|
+
while (reader.pos < end) {
|
|
48613
|
+
var tag = reader.uint32();
|
|
48614
|
+
switch (tag >>> 3) {
|
|
48615
|
+
case 1: {
|
|
48616
|
+
message.spaceReadState = $root.google.chat.v1.SpaceReadState.decode(reader, reader.uint32());
|
|
48617
|
+
break;
|
|
48618
|
+
}
|
|
48619
|
+
case 2: {
|
|
48620
|
+
message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
|
|
48621
|
+
break;
|
|
48622
|
+
}
|
|
48623
|
+
default:
|
|
48624
|
+
reader.skipType(tag & 7);
|
|
48625
|
+
break;
|
|
48626
|
+
}
|
|
48627
|
+
}
|
|
48628
|
+
return message;
|
|
48629
|
+
};
|
|
48630
|
+
|
|
48631
|
+
/**
|
|
48632
|
+
* Decodes an UpdateSpaceReadStateRequest message from the specified reader or buffer, length delimited.
|
|
48633
|
+
* @function decodeDelimited
|
|
48634
|
+
* @memberof google.chat.v1.UpdateSpaceReadStateRequest
|
|
48635
|
+
* @static
|
|
48636
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
48637
|
+
* @returns {google.chat.v1.UpdateSpaceReadStateRequest} UpdateSpaceReadStateRequest
|
|
48638
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
48639
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
48640
|
+
*/
|
|
48641
|
+
UpdateSpaceReadStateRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
48642
|
+
if (!(reader instanceof $Reader))
|
|
48643
|
+
reader = new $Reader(reader);
|
|
48644
|
+
return this.decode(reader, reader.uint32());
|
|
48645
|
+
};
|
|
48646
|
+
|
|
48647
|
+
/**
|
|
48648
|
+
* Verifies an UpdateSpaceReadStateRequest message.
|
|
48649
|
+
* @function verify
|
|
48650
|
+
* @memberof google.chat.v1.UpdateSpaceReadStateRequest
|
|
48651
|
+
* @static
|
|
48652
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
48653
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
48654
|
+
*/
|
|
48655
|
+
UpdateSpaceReadStateRequest.verify = function verify(message) {
|
|
48656
|
+
if (typeof message !== "object" || message === null)
|
|
48657
|
+
return "object expected";
|
|
48658
|
+
if (message.spaceReadState != null && message.hasOwnProperty("spaceReadState")) {
|
|
48659
|
+
var error = $root.google.chat.v1.SpaceReadState.verify(message.spaceReadState);
|
|
48660
|
+
if (error)
|
|
48661
|
+
return "spaceReadState." + error;
|
|
48662
|
+
}
|
|
48663
|
+
if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
|
|
48664
|
+
var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
|
|
48665
|
+
if (error)
|
|
48666
|
+
return "updateMask." + error;
|
|
48667
|
+
}
|
|
48668
|
+
return null;
|
|
48669
|
+
};
|
|
48670
|
+
|
|
48671
|
+
/**
|
|
48672
|
+
* Creates an UpdateSpaceReadStateRequest message from a plain object. Also converts values to their respective internal types.
|
|
48673
|
+
* @function fromObject
|
|
48674
|
+
* @memberof google.chat.v1.UpdateSpaceReadStateRequest
|
|
48675
|
+
* @static
|
|
48676
|
+
* @param {Object.<string,*>} object Plain object
|
|
48677
|
+
* @returns {google.chat.v1.UpdateSpaceReadStateRequest} UpdateSpaceReadStateRequest
|
|
48678
|
+
*/
|
|
48679
|
+
UpdateSpaceReadStateRequest.fromObject = function fromObject(object) {
|
|
48680
|
+
if (object instanceof $root.google.chat.v1.UpdateSpaceReadStateRequest)
|
|
48681
|
+
return object;
|
|
48682
|
+
var message = new $root.google.chat.v1.UpdateSpaceReadStateRequest();
|
|
48683
|
+
if (object.spaceReadState != null) {
|
|
48684
|
+
if (typeof object.spaceReadState !== "object")
|
|
48685
|
+
throw TypeError(".google.chat.v1.UpdateSpaceReadStateRequest.spaceReadState: object expected");
|
|
48686
|
+
message.spaceReadState = $root.google.chat.v1.SpaceReadState.fromObject(object.spaceReadState);
|
|
48687
|
+
}
|
|
48688
|
+
if (object.updateMask != null) {
|
|
48689
|
+
if (typeof object.updateMask !== "object")
|
|
48690
|
+
throw TypeError(".google.chat.v1.UpdateSpaceReadStateRequest.updateMask: object expected");
|
|
48691
|
+
message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
|
|
48692
|
+
}
|
|
48693
|
+
return message;
|
|
48694
|
+
};
|
|
48695
|
+
|
|
48696
|
+
/**
|
|
48697
|
+
* Creates a plain object from an UpdateSpaceReadStateRequest message. Also converts values to other types if specified.
|
|
48698
|
+
* @function toObject
|
|
48699
|
+
* @memberof google.chat.v1.UpdateSpaceReadStateRequest
|
|
48700
|
+
* @static
|
|
48701
|
+
* @param {google.chat.v1.UpdateSpaceReadStateRequest} message UpdateSpaceReadStateRequest
|
|
48702
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
48703
|
+
* @returns {Object.<string,*>} Plain object
|
|
48704
|
+
*/
|
|
48705
|
+
UpdateSpaceReadStateRequest.toObject = function toObject(message, options) {
|
|
48706
|
+
if (!options)
|
|
48707
|
+
options = {};
|
|
48708
|
+
var object = {};
|
|
48709
|
+
if (options.defaults) {
|
|
48710
|
+
object.spaceReadState = null;
|
|
48711
|
+
object.updateMask = null;
|
|
48712
|
+
}
|
|
48713
|
+
if (message.spaceReadState != null && message.hasOwnProperty("spaceReadState"))
|
|
48714
|
+
object.spaceReadState = $root.google.chat.v1.SpaceReadState.toObject(message.spaceReadState, options);
|
|
48715
|
+
if (message.updateMask != null && message.hasOwnProperty("updateMask"))
|
|
48716
|
+
object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
|
|
48717
|
+
return object;
|
|
48718
|
+
};
|
|
48719
|
+
|
|
48720
|
+
/**
|
|
48721
|
+
* Converts this UpdateSpaceReadStateRequest to JSON.
|
|
48722
|
+
* @function toJSON
|
|
48723
|
+
* @memberof google.chat.v1.UpdateSpaceReadStateRequest
|
|
48724
|
+
* @instance
|
|
48725
|
+
* @returns {Object.<string,*>} JSON object
|
|
48726
|
+
*/
|
|
48727
|
+
UpdateSpaceReadStateRequest.prototype.toJSON = function toJSON() {
|
|
48728
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
48729
|
+
};
|
|
48730
|
+
|
|
48731
|
+
/**
|
|
48732
|
+
* Gets the default type url for UpdateSpaceReadStateRequest
|
|
48733
|
+
* @function getTypeUrl
|
|
48734
|
+
* @memberof google.chat.v1.UpdateSpaceReadStateRequest
|
|
48735
|
+
* @static
|
|
48736
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
48737
|
+
* @returns {string} The default type url
|
|
48738
|
+
*/
|
|
48739
|
+
UpdateSpaceReadStateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
48740
|
+
if (typeUrlPrefix === undefined) {
|
|
48741
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
48742
|
+
}
|
|
48743
|
+
return typeUrlPrefix + "/google.chat.v1.UpdateSpaceReadStateRequest";
|
|
48744
|
+
};
|
|
48745
|
+
|
|
48746
|
+
return UpdateSpaceReadStateRequest;
|
|
48747
|
+
})();
|
|
48748
|
+
|
|
48749
|
+
v1.SetUpSpaceRequest = (function() {
|
|
48750
|
+
|
|
48751
|
+
/**
|
|
48752
|
+
* Properties of a SetUpSpaceRequest.
|
|
48753
|
+
* @memberof google.chat.v1
|
|
48754
|
+
* @interface ISetUpSpaceRequest
|
|
48755
|
+
* @property {google.chat.v1.ISpace|null} [space] SetUpSpaceRequest space
|
|
48756
|
+
* @property {string|null} [requestId] SetUpSpaceRequest requestId
|
|
48757
|
+
* @property {Array.<google.chat.v1.IMembership>|null} [memberships] SetUpSpaceRequest memberships
|
|
48758
|
+
*/
|
|
48759
|
+
|
|
48760
|
+
/**
|
|
48761
|
+
* Constructs a new SetUpSpaceRequest.
|
|
48762
|
+
* @memberof google.chat.v1
|
|
48763
|
+
* @classdesc Represents a SetUpSpaceRequest.
|
|
48764
|
+
* @implements ISetUpSpaceRequest
|
|
48765
|
+
* @constructor
|
|
48766
|
+
* @param {google.chat.v1.ISetUpSpaceRequest=} [properties] Properties to set
|
|
48767
|
+
*/
|
|
48768
|
+
function SetUpSpaceRequest(properties) {
|
|
48769
|
+
this.memberships = [];
|
|
48770
|
+
if (properties)
|
|
48771
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
48772
|
+
if (properties[keys[i]] != null)
|
|
48773
|
+
this[keys[i]] = properties[keys[i]];
|
|
48774
|
+
}
|
|
48775
|
+
|
|
48776
|
+
/**
|
|
48777
|
+
* SetUpSpaceRequest space.
|
|
48778
|
+
* @member {google.chat.v1.ISpace|null|undefined} space
|
|
48779
|
+
* @memberof google.chat.v1.SetUpSpaceRequest
|
|
48780
|
+
* @instance
|
|
48781
|
+
*/
|
|
48782
|
+
SetUpSpaceRequest.prototype.space = null;
|
|
48783
|
+
|
|
48784
|
+
/**
|
|
48785
|
+
* SetUpSpaceRequest requestId.
|
|
48786
|
+
* @member {string} requestId
|
|
48787
|
+
* @memberof google.chat.v1.SetUpSpaceRequest
|
|
48788
|
+
* @instance
|
|
48789
|
+
*/
|
|
48790
|
+
SetUpSpaceRequest.prototype.requestId = "";
|
|
48791
|
+
|
|
48792
|
+
/**
|
|
48793
|
+
* SetUpSpaceRequest memberships.
|
|
48794
|
+
* @member {Array.<google.chat.v1.IMembership>} memberships
|
|
48795
|
+
* @memberof google.chat.v1.SetUpSpaceRequest
|
|
48796
|
+
* @instance
|
|
48797
|
+
*/
|
|
48798
|
+
SetUpSpaceRequest.prototype.memberships = $util.emptyArray;
|
|
48799
|
+
|
|
48800
|
+
/**
|
|
48801
|
+
* Creates a new SetUpSpaceRequest instance using the specified properties.
|
|
48802
|
+
* @function create
|
|
48803
|
+
* @memberof google.chat.v1.SetUpSpaceRequest
|
|
48804
|
+
* @static
|
|
48805
|
+
* @param {google.chat.v1.ISetUpSpaceRequest=} [properties] Properties to set
|
|
48806
|
+
* @returns {google.chat.v1.SetUpSpaceRequest} SetUpSpaceRequest instance
|
|
48807
|
+
*/
|
|
48808
|
+
SetUpSpaceRequest.create = function create(properties) {
|
|
48809
|
+
return new SetUpSpaceRequest(properties);
|
|
48810
|
+
};
|
|
48811
|
+
|
|
48812
|
+
/**
|
|
48813
|
+
* Encodes the specified SetUpSpaceRequest message. Does not implicitly {@link google.chat.v1.SetUpSpaceRequest.verify|verify} messages.
|
|
48814
|
+
* @function encode
|
|
48815
|
+
* @memberof google.chat.v1.SetUpSpaceRequest
|
|
48816
|
+
* @static
|
|
48817
|
+
* @param {google.chat.v1.ISetUpSpaceRequest} message SetUpSpaceRequest message or plain object to encode
|
|
48818
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
48819
|
+
* @returns {$protobuf.Writer} Writer
|
|
48820
|
+
*/
|
|
48821
|
+
SetUpSpaceRequest.encode = function encode(message, writer) {
|
|
48822
|
+
if (!writer)
|
|
48823
|
+
writer = $Writer.create();
|
|
48824
|
+
if (message.space != null && Object.hasOwnProperty.call(message, "space"))
|
|
48825
|
+
$root.google.chat.v1.Space.encode(message.space, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
48826
|
+
if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId"))
|
|
48827
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId);
|
|
48828
|
+
if (message.memberships != null && message.memberships.length)
|
|
48829
|
+
for (var i = 0; i < message.memberships.length; ++i)
|
|
48830
|
+
$root.google.chat.v1.Membership.encode(message.memberships[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
48831
|
+
return writer;
|
|
48832
|
+
};
|
|
48833
|
+
|
|
48834
|
+
/**
|
|
48835
|
+
* Encodes the specified SetUpSpaceRequest message, length delimited. Does not implicitly {@link google.chat.v1.SetUpSpaceRequest.verify|verify} messages.
|
|
48836
|
+
* @function encodeDelimited
|
|
48837
|
+
* @memberof google.chat.v1.SetUpSpaceRequest
|
|
48838
|
+
* @static
|
|
48839
|
+
* @param {google.chat.v1.ISetUpSpaceRequest} message SetUpSpaceRequest message or plain object to encode
|
|
48840
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
48841
|
+
* @returns {$protobuf.Writer} Writer
|
|
48842
|
+
*/
|
|
48843
|
+
SetUpSpaceRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
48844
|
+
return this.encode(message, writer).ldelim();
|
|
48845
|
+
};
|
|
48846
|
+
|
|
48847
|
+
/**
|
|
48848
|
+
* Decodes a SetUpSpaceRequest message from the specified reader or buffer.
|
|
48849
|
+
* @function decode
|
|
48850
|
+
* @memberof google.chat.v1.SetUpSpaceRequest
|
|
48851
|
+
* @static
|
|
48852
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
48853
|
+
* @param {number} [length] Message length if known beforehand
|
|
48854
|
+
* @returns {google.chat.v1.SetUpSpaceRequest} SetUpSpaceRequest
|
|
48855
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
48856
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
48857
|
+
*/
|
|
48858
|
+
SetUpSpaceRequest.decode = function decode(reader, length) {
|
|
48859
|
+
if (!(reader instanceof $Reader))
|
|
48860
|
+
reader = $Reader.create(reader);
|
|
48861
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.SetUpSpaceRequest();
|
|
48862
|
+
while (reader.pos < end) {
|
|
48863
|
+
var tag = reader.uint32();
|
|
48864
|
+
switch (tag >>> 3) {
|
|
48865
|
+
case 1: {
|
|
48866
|
+
message.space = $root.google.chat.v1.Space.decode(reader, reader.uint32());
|
|
48867
|
+
break;
|
|
48868
|
+
}
|
|
48869
|
+
case 2: {
|
|
48870
|
+
message.requestId = reader.string();
|
|
48871
|
+
break;
|
|
48872
|
+
}
|
|
48873
|
+
case 4: {
|
|
48874
|
+
if (!(message.memberships && message.memberships.length))
|
|
48875
|
+
message.memberships = [];
|
|
48876
|
+
message.memberships.push($root.google.chat.v1.Membership.decode(reader, reader.uint32()));
|
|
48877
|
+
break;
|
|
48878
|
+
}
|
|
48879
|
+
default:
|
|
48880
|
+
reader.skipType(tag & 7);
|
|
48881
|
+
break;
|
|
48882
|
+
}
|
|
48883
|
+
}
|
|
48884
|
+
return message;
|
|
48885
|
+
};
|
|
48886
|
+
|
|
48887
|
+
/**
|
|
48888
|
+
* Decodes a SetUpSpaceRequest message from the specified reader or buffer, length delimited.
|
|
48889
|
+
* @function decodeDelimited
|
|
48890
|
+
* @memberof google.chat.v1.SetUpSpaceRequest
|
|
48891
|
+
* @static
|
|
48892
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
48893
|
+
* @returns {google.chat.v1.SetUpSpaceRequest} SetUpSpaceRequest
|
|
48894
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
48895
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
48896
|
+
*/
|
|
48897
|
+
SetUpSpaceRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
48898
|
+
if (!(reader instanceof $Reader))
|
|
48899
|
+
reader = new $Reader(reader);
|
|
48900
|
+
return this.decode(reader, reader.uint32());
|
|
48901
|
+
};
|
|
48902
|
+
|
|
48903
|
+
/**
|
|
48904
|
+
* Verifies a SetUpSpaceRequest message.
|
|
48905
|
+
* @function verify
|
|
48906
|
+
* @memberof google.chat.v1.SetUpSpaceRequest
|
|
48907
|
+
* @static
|
|
48908
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
48909
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
48910
|
+
*/
|
|
48911
|
+
SetUpSpaceRequest.verify = function verify(message) {
|
|
48912
|
+
if (typeof message !== "object" || message === null)
|
|
48913
|
+
return "object expected";
|
|
48914
|
+
if (message.space != null && message.hasOwnProperty("space")) {
|
|
48915
|
+
var error = $root.google.chat.v1.Space.verify(message.space);
|
|
48916
|
+
if (error)
|
|
48917
|
+
return "space." + error;
|
|
48918
|
+
}
|
|
48919
|
+
if (message.requestId != null && message.hasOwnProperty("requestId"))
|
|
48920
|
+
if (!$util.isString(message.requestId))
|
|
48921
|
+
return "requestId: string expected";
|
|
48922
|
+
if (message.memberships != null && message.hasOwnProperty("memberships")) {
|
|
48923
|
+
if (!Array.isArray(message.memberships))
|
|
48924
|
+
return "memberships: array expected";
|
|
48925
|
+
for (var i = 0; i < message.memberships.length; ++i) {
|
|
48926
|
+
var error = $root.google.chat.v1.Membership.verify(message.memberships[i]);
|
|
48927
|
+
if (error)
|
|
48928
|
+
return "memberships." + error;
|
|
48929
|
+
}
|
|
48930
|
+
}
|
|
48931
|
+
return null;
|
|
48932
|
+
};
|
|
48933
|
+
|
|
48934
|
+
/**
|
|
48935
|
+
* Creates a SetUpSpaceRequest message from a plain object. Also converts values to their respective internal types.
|
|
48936
|
+
* @function fromObject
|
|
48937
|
+
* @memberof google.chat.v1.SetUpSpaceRequest
|
|
48938
|
+
* @static
|
|
48939
|
+
* @param {Object.<string,*>} object Plain object
|
|
48940
|
+
* @returns {google.chat.v1.SetUpSpaceRequest} SetUpSpaceRequest
|
|
48941
|
+
*/
|
|
48942
|
+
SetUpSpaceRequest.fromObject = function fromObject(object) {
|
|
48943
|
+
if (object instanceof $root.google.chat.v1.SetUpSpaceRequest)
|
|
48944
|
+
return object;
|
|
48945
|
+
var message = new $root.google.chat.v1.SetUpSpaceRequest();
|
|
48946
|
+
if (object.space != null) {
|
|
48947
|
+
if (typeof object.space !== "object")
|
|
48948
|
+
throw TypeError(".google.chat.v1.SetUpSpaceRequest.space: object expected");
|
|
48949
|
+
message.space = $root.google.chat.v1.Space.fromObject(object.space);
|
|
48950
|
+
}
|
|
48951
|
+
if (object.requestId != null)
|
|
48952
|
+
message.requestId = String(object.requestId);
|
|
48953
|
+
if (object.memberships) {
|
|
48954
|
+
if (!Array.isArray(object.memberships))
|
|
48955
|
+
throw TypeError(".google.chat.v1.SetUpSpaceRequest.memberships: array expected");
|
|
48956
|
+
message.memberships = [];
|
|
48957
|
+
for (var i = 0; i < object.memberships.length; ++i) {
|
|
48958
|
+
if (typeof object.memberships[i] !== "object")
|
|
48959
|
+
throw TypeError(".google.chat.v1.SetUpSpaceRequest.memberships: object expected");
|
|
48960
|
+
message.memberships[i] = $root.google.chat.v1.Membership.fromObject(object.memberships[i]);
|
|
48961
|
+
}
|
|
48962
|
+
}
|
|
48963
|
+
return message;
|
|
48964
|
+
};
|
|
48965
|
+
|
|
48966
|
+
/**
|
|
48967
|
+
* Creates a plain object from a SetUpSpaceRequest message. Also converts values to other types if specified.
|
|
48968
|
+
* @function toObject
|
|
48969
|
+
* @memberof google.chat.v1.SetUpSpaceRequest
|
|
48970
|
+
* @static
|
|
48971
|
+
* @param {google.chat.v1.SetUpSpaceRequest} message SetUpSpaceRequest
|
|
48972
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
48973
|
+
* @returns {Object.<string,*>} Plain object
|
|
48974
|
+
*/
|
|
48975
|
+
SetUpSpaceRequest.toObject = function toObject(message, options) {
|
|
48976
|
+
if (!options)
|
|
48977
|
+
options = {};
|
|
48978
|
+
var object = {};
|
|
48979
|
+
if (options.arrays || options.defaults)
|
|
48980
|
+
object.memberships = [];
|
|
48981
|
+
if (options.defaults) {
|
|
48982
|
+
object.space = null;
|
|
48983
|
+
object.requestId = "";
|
|
48984
|
+
}
|
|
48985
|
+
if (message.space != null && message.hasOwnProperty("space"))
|
|
48986
|
+
object.space = $root.google.chat.v1.Space.toObject(message.space, options);
|
|
48987
|
+
if (message.requestId != null && message.hasOwnProperty("requestId"))
|
|
48988
|
+
object.requestId = message.requestId;
|
|
48989
|
+
if (message.memberships && message.memberships.length) {
|
|
48990
|
+
object.memberships = [];
|
|
48991
|
+
for (var j = 0; j < message.memberships.length; ++j)
|
|
48992
|
+
object.memberships[j] = $root.google.chat.v1.Membership.toObject(message.memberships[j], options);
|
|
48993
|
+
}
|
|
48994
|
+
return object;
|
|
48995
|
+
};
|
|
48996
|
+
|
|
48997
|
+
/**
|
|
48998
|
+
* Converts this SetUpSpaceRequest to JSON.
|
|
48999
|
+
* @function toJSON
|
|
49000
|
+
* @memberof google.chat.v1.SetUpSpaceRequest
|
|
49001
|
+
* @instance
|
|
49002
|
+
* @returns {Object.<string,*>} JSON object
|
|
49003
|
+
*/
|
|
49004
|
+
SetUpSpaceRequest.prototype.toJSON = function toJSON() {
|
|
49005
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
49006
|
+
};
|
|
49007
|
+
|
|
49008
|
+
/**
|
|
49009
|
+
* Gets the default type url for SetUpSpaceRequest
|
|
49010
|
+
* @function getTypeUrl
|
|
49011
|
+
* @memberof google.chat.v1.SetUpSpaceRequest
|
|
49012
|
+
* @static
|
|
49013
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
49014
|
+
* @returns {string} The default type url
|
|
49015
|
+
*/
|
|
49016
|
+
SetUpSpaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
49017
|
+
if (typeUrlPrefix === undefined) {
|
|
49018
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
49019
|
+
}
|
|
49020
|
+
return typeUrlPrefix + "/google.chat.v1.SetUpSpaceRequest";
|
|
49021
|
+
};
|
|
49022
|
+
|
|
49023
|
+
return SetUpSpaceRequest;
|
|
49024
|
+
})();
|
|
49025
|
+
|
|
49026
|
+
v1.ThreadReadState = (function() {
|
|
49027
|
+
|
|
49028
|
+
/**
|
|
49029
|
+
* Properties of a ThreadReadState.
|
|
49030
|
+
* @memberof google.chat.v1
|
|
49031
|
+
* @interface IThreadReadState
|
|
49032
|
+
* @property {string|null} [name] ThreadReadState name
|
|
49033
|
+
* @property {google.protobuf.ITimestamp|null} [lastReadTime] ThreadReadState lastReadTime
|
|
49034
|
+
*/
|
|
49035
|
+
|
|
49036
|
+
/**
|
|
49037
|
+
* Constructs a new ThreadReadState.
|
|
49038
|
+
* @memberof google.chat.v1
|
|
49039
|
+
* @classdesc Represents a ThreadReadState.
|
|
49040
|
+
* @implements IThreadReadState
|
|
49041
|
+
* @constructor
|
|
49042
|
+
* @param {google.chat.v1.IThreadReadState=} [properties] Properties to set
|
|
49043
|
+
*/
|
|
49044
|
+
function ThreadReadState(properties) {
|
|
49045
|
+
if (properties)
|
|
49046
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
49047
|
+
if (properties[keys[i]] != null)
|
|
49048
|
+
this[keys[i]] = properties[keys[i]];
|
|
49049
|
+
}
|
|
49050
|
+
|
|
49051
|
+
/**
|
|
49052
|
+
* ThreadReadState name.
|
|
49053
|
+
* @member {string} name
|
|
49054
|
+
* @memberof google.chat.v1.ThreadReadState
|
|
49055
|
+
* @instance
|
|
49056
|
+
*/
|
|
49057
|
+
ThreadReadState.prototype.name = "";
|
|
49058
|
+
|
|
49059
|
+
/**
|
|
49060
|
+
* ThreadReadState lastReadTime.
|
|
49061
|
+
* @member {google.protobuf.ITimestamp|null|undefined} lastReadTime
|
|
49062
|
+
* @memberof google.chat.v1.ThreadReadState
|
|
49063
|
+
* @instance
|
|
49064
|
+
*/
|
|
49065
|
+
ThreadReadState.prototype.lastReadTime = null;
|
|
49066
|
+
|
|
49067
|
+
/**
|
|
49068
|
+
* Creates a new ThreadReadState instance using the specified properties.
|
|
49069
|
+
* @function create
|
|
49070
|
+
* @memberof google.chat.v1.ThreadReadState
|
|
49071
|
+
* @static
|
|
49072
|
+
* @param {google.chat.v1.IThreadReadState=} [properties] Properties to set
|
|
49073
|
+
* @returns {google.chat.v1.ThreadReadState} ThreadReadState instance
|
|
49074
|
+
*/
|
|
49075
|
+
ThreadReadState.create = function create(properties) {
|
|
49076
|
+
return new ThreadReadState(properties);
|
|
49077
|
+
};
|
|
49078
|
+
|
|
49079
|
+
/**
|
|
49080
|
+
* Encodes the specified ThreadReadState message. Does not implicitly {@link google.chat.v1.ThreadReadState.verify|verify} messages.
|
|
49081
|
+
* @function encode
|
|
49082
|
+
* @memberof google.chat.v1.ThreadReadState
|
|
49083
|
+
* @static
|
|
49084
|
+
* @param {google.chat.v1.IThreadReadState} message ThreadReadState message or plain object to encode
|
|
49085
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
49086
|
+
* @returns {$protobuf.Writer} Writer
|
|
49087
|
+
*/
|
|
49088
|
+
ThreadReadState.encode = function encode(message, writer) {
|
|
49089
|
+
if (!writer)
|
|
49090
|
+
writer = $Writer.create();
|
|
49091
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
49092
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
49093
|
+
if (message.lastReadTime != null && Object.hasOwnProperty.call(message, "lastReadTime"))
|
|
49094
|
+
$root.google.protobuf.Timestamp.encode(message.lastReadTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
49095
|
+
return writer;
|
|
49096
|
+
};
|
|
49097
|
+
|
|
49098
|
+
/**
|
|
49099
|
+
* Encodes the specified ThreadReadState message, length delimited. Does not implicitly {@link google.chat.v1.ThreadReadState.verify|verify} messages.
|
|
49100
|
+
* @function encodeDelimited
|
|
49101
|
+
* @memberof google.chat.v1.ThreadReadState
|
|
49102
|
+
* @static
|
|
49103
|
+
* @param {google.chat.v1.IThreadReadState} message ThreadReadState message or plain object to encode
|
|
49104
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
49105
|
+
* @returns {$protobuf.Writer} Writer
|
|
49106
|
+
*/
|
|
49107
|
+
ThreadReadState.encodeDelimited = function encodeDelimited(message, writer) {
|
|
49108
|
+
return this.encode(message, writer).ldelim();
|
|
49109
|
+
};
|
|
49110
|
+
|
|
49111
|
+
/**
|
|
49112
|
+
* Decodes a ThreadReadState message from the specified reader or buffer.
|
|
49113
|
+
* @function decode
|
|
49114
|
+
* @memberof google.chat.v1.ThreadReadState
|
|
49115
|
+
* @static
|
|
49116
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
49117
|
+
* @param {number} [length] Message length if known beforehand
|
|
49118
|
+
* @returns {google.chat.v1.ThreadReadState} ThreadReadState
|
|
49119
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
49120
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
49121
|
+
*/
|
|
49122
|
+
ThreadReadState.decode = function decode(reader, length) {
|
|
49123
|
+
if (!(reader instanceof $Reader))
|
|
49124
|
+
reader = $Reader.create(reader);
|
|
49125
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.ThreadReadState();
|
|
49126
|
+
while (reader.pos < end) {
|
|
49127
|
+
var tag = reader.uint32();
|
|
49128
|
+
switch (tag >>> 3) {
|
|
49129
|
+
case 1: {
|
|
49130
|
+
message.name = reader.string();
|
|
49131
|
+
break;
|
|
49132
|
+
}
|
|
49133
|
+
case 2: {
|
|
49134
|
+
message.lastReadTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
|
49135
|
+
break;
|
|
49136
|
+
}
|
|
49137
|
+
default:
|
|
49138
|
+
reader.skipType(tag & 7);
|
|
49139
|
+
break;
|
|
49140
|
+
}
|
|
49141
|
+
}
|
|
49142
|
+
return message;
|
|
49143
|
+
};
|
|
49144
|
+
|
|
49145
|
+
/**
|
|
49146
|
+
* Decodes a ThreadReadState message from the specified reader or buffer, length delimited.
|
|
49147
|
+
* @function decodeDelimited
|
|
49148
|
+
* @memberof google.chat.v1.ThreadReadState
|
|
49149
|
+
* @static
|
|
49150
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
49151
|
+
* @returns {google.chat.v1.ThreadReadState} ThreadReadState
|
|
49152
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
49153
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
49154
|
+
*/
|
|
49155
|
+
ThreadReadState.decodeDelimited = function decodeDelimited(reader) {
|
|
49156
|
+
if (!(reader instanceof $Reader))
|
|
49157
|
+
reader = new $Reader(reader);
|
|
49158
|
+
return this.decode(reader, reader.uint32());
|
|
49159
|
+
};
|
|
49160
|
+
|
|
49161
|
+
/**
|
|
49162
|
+
* Verifies a ThreadReadState message.
|
|
49163
|
+
* @function verify
|
|
49164
|
+
* @memberof google.chat.v1.ThreadReadState
|
|
49165
|
+
* @static
|
|
49166
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
49167
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
49168
|
+
*/
|
|
49169
|
+
ThreadReadState.verify = function verify(message) {
|
|
49170
|
+
if (typeof message !== "object" || message === null)
|
|
49171
|
+
return "object expected";
|
|
49172
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
49173
|
+
if (!$util.isString(message.name))
|
|
49174
|
+
return "name: string expected";
|
|
49175
|
+
if (message.lastReadTime != null && message.hasOwnProperty("lastReadTime")) {
|
|
49176
|
+
var error = $root.google.protobuf.Timestamp.verify(message.lastReadTime);
|
|
49177
|
+
if (error)
|
|
49178
|
+
return "lastReadTime." + error;
|
|
49179
|
+
}
|
|
49180
|
+
return null;
|
|
49181
|
+
};
|
|
49182
|
+
|
|
49183
|
+
/**
|
|
49184
|
+
* Creates a ThreadReadState message from a plain object. Also converts values to their respective internal types.
|
|
49185
|
+
* @function fromObject
|
|
49186
|
+
* @memberof google.chat.v1.ThreadReadState
|
|
49187
|
+
* @static
|
|
49188
|
+
* @param {Object.<string,*>} object Plain object
|
|
49189
|
+
* @returns {google.chat.v1.ThreadReadState} ThreadReadState
|
|
49190
|
+
*/
|
|
49191
|
+
ThreadReadState.fromObject = function fromObject(object) {
|
|
49192
|
+
if (object instanceof $root.google.chat.v1.ThreadReadState)
|
|
49193
|
+
return object;
|
|
49194
|
+
var message = new $root.google.chat.v1.ThreadReadState();
|
|
49195
|
+
if (object.name != null)
|
|
49196
|
+
message.name = String(object.name);
|
|
49197
|
+
if (object.lastReadTime != null) {
|
|
49198
|
+
if (typeof object.lastReadTime !== "object")
|
|
49199
|
+
throw TypeError(".google.chat.v1.ThreadReadState.lastReadTime: object expected");
|
|
49200
|
+
message.lastReadTime = $root.google.protobuf.Timestamp.fromObject(object.lastReadTime);
|
|
49201
|
+
}
|
|
49202
|
+
return message;
|
|
49203
|
+
};
|
|
49204
|
+
|
|
49205
|
+
/**
|
|
49206
|
+
* Creates a plain object from a ThreadReadState message. Also converts values to other types if specified.
|
|
49207
|
+
* @function toObject
|
|
49208
|
+
* @memberof google.chat.v1.ThreadReadState
|
|
49209
|
+
* @static
|
|
49210
|
+
* @param {google.chat.v1.ThreadReadState} message ThreadReadState
|
|
49211
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
49212
|
+
* @returns {Object.<string,*>} Plain object
|
|
49213
|
+
*/
|
|
49214
|
+
ThreadReadState.toObject = function toObject(message, options) {
|
|
49215
|
+
if (!options)
|
|
49216
|
+
options = {};
|
|
49217
|
+
var object = {};
|
|
49218
|
+
if (options.defaults) {
|
|
49219
|
+
object.name = "";
|
|
49220
|
+
object.lastReadTime = null;
|
|
49221
|
+
}
|
|
49222
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
49223
|
+
object.name = message.name;
|
|
49224
|
+
if (message.lastReadTime != null && message.hasOwnProperty("lastReadTime"))
|
|
49225
|
+
object.lastReadTime = $root.google.protobuf.Timestamp.toObject(message.lastReadTime, options);
|
|
49226
|
+
return object;
|
|
49227
|
+
};
|
|
49228
|
+
|
|
49229
|
+
/**
|
|
49230
|
+
* Converts this ThreadReadState to JSON.
|
|
49231
|
+
* @function toJSON
|
|
49232
|
+
* @memberof google.chat.v1.ThreadReadState
|
|
49233
|
+
* @instance
|
|
49234
|
+
* @returns {Object.<string,*>} JSON object
|
|
49235
|
+
*/
|
|
49236
|
+
ThreadReadState.prototype.toJSON = function toJSON() {
|
|
49237
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
49238
|
+
};
|
|
49239
|
+
|
|
49240
|
+
/**
|
|
49241
|
+
* Gets the default type url for ThreadReadState
|
|
49242
|
+
* @function getTypeUrl
|
|
49243
|
+
* @memberof google.chat.v1.ThreadReadState
|
|
49244
|
+
* @static
|
|
49245
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
49246
|
+
* @returns {string} The default type url
|
|
49247
|
+
*/
|
|
49248
|
+
ThreadReadState.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
49249
|
+
if (typeUrlPrefix === undefined) {
|
|
49250
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
49251
|
+
}
|
|
49252
|
+
return typeUrlPrefix + "/google.chat.v1.ThreadReadState";
|
|
49253
|
+
};
|
|
49254
|
+
|
|
49255
|
+
return ThreadReadState;
|
|
49256
|
+
})();
|
|
49257
|
+
|
|
49258
|
+
v1.GetThreadReadStateRequest = (function() {
|
|
49259
|
+
|
|
49260
|
+
/**
|
|
49261
|
+
* Properties of a GetThreadReadStateRequest.
|
|
49262
|
+
* @memberof google.chat.v1
|
|
49263
|
+
* @interface IGetThreadReadStateRequest
|
|
49264
|
+
* @property {string|null} [name] GetThreadReadStateRequest name
|
|
49265
|
+
*/
|
|
49266
|
+
|
|
49267
|
+
/**
|
|
49268
|
+
* Constructs a new GetThreadReadStateRequest.
|
|
49269
|
+
* @memberof google.chat.v1
|
|
49270
|
+
* @classdesc Represents a GetThreadReadStateRequest.
|
|
49271
|
+
* @implements IGetThreadReadStateRequest
|
|
49272
|
+
* @constructor
|
|
49273
|
+
* @param {google.chat.v1.IGetThreadReadStateRequest=} [properties] Properties to set
|
|
49274
|
+
*/
|
|
49275
|
+
function GetThreadReadStateRequest(properties) {
|
|
49276
|
+
if (properties)
|
|
49277
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
49278
|
+
if (properties[keys[i]] != null)
|
|
49279
|
+
this[keys[i]] = properties[keys[i]];
|
|
49280
|
+
}
|
|
49281
|
+
|
|
49282
|
+
/**
|
|
49283
|
+
* GetThreadReadStateRequest name.
|
|
49284
|
+
* @member {string} name
|
|
49285
|
+
* @memberof google.chat.v1.GetThreadReadStateRequest
|
|
49286
|
+
* @instance
|
|
49287
|
+
*/
|
|
49288
|
+
GetThreadReadStateRequest.prototype.name = "";
|
|
49289
|
+
|
|
49290
|
+
/**
|
|
49291
|
+
* Creates a new GetThreadReadStateRequest instance using the specified properties.
|
|
49292
|
+
* @function create
|
|
49293
|
+
* @memberof google.chat.v1.GetThreadReadStateRequest
|
|
49294
|
+
* @static
|
|
49295
|
+
* @param {google.chat.v1.IGetThreadReadStateRequest=} [properties] Properties to set
|
|
49296
|
+
* @returns {google.chat.v1.GetThreadReadStateRequest} GetThreadReadStateRequest instance
|
|
49297
|
+
*/
|
|
49298
|
+
GetThreadReadStateRequest.create = function create(properties) {
|
|
49299
|
+
return new GetThreadReadStateRequest(properties);
|
|
49300
|
+
};
|
|
49301
|
+
|
|
49302
|
+
/**
|
|
49303
|
+
* Encodes the specified GetThreadReadStateRequest message. Does not implicitly {@link google.chat.v1.GetThreadReadStateRequest.verify|verify} messages.
|
|
49304
|
+
* @function encode
|
|
49305
|
+
* @memberof google.chat.v1.GetThreadReadStateRequest
|
|
49306
|
+
* @static
|
|
49307
|
+
* @param {google.chat.v1.IGetThreadReadStateRequest} message GetThreadReadStateRequest message or plain object to encode
|
|
49308
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
49309
|
+
* @returns {$protobuf.Writer} Writer
|
|
49310
|
+
*/
|
|
49311
|
+
GetThreadReadStateRequest.encode = function encode(message, writer) {
|
|
49312
|
+
if (!writer)
|
|
49313
|
+
writer = $Writer.create();
|
|
49314
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
49315
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
49316
|
+
return writer;
|
|
49317
|
+
};
|
|
49318
|
+
|
|
49319
|
+
/**
|
|
49320
|
+
* Encodes the specified GetThreadReadStateRequest message, length delimited. Does not implicitly {@link google.chat.v1.GetThreadReadStateRequest.verify|verify} messages.
|
|
49321
|
+
* @function encodeDelimited
|
|
49322
|
+
* @memberof google.chat.v1.GetThreadReadStateRequest
|
|
49323
|
+
* @static
|
|
49324
|
+
* @param {google.chat.v1.IGetThreadReadStateRequest} message GetThreadReadStateRequest message or plain object to encode
|
|
49325
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
49326
|
+
* @returns {$protobuf.Writer} Writer
|
|
49327
|
+
*/
|
|
49328
|
+
GetThreadReadStateRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
49329
|
+
return this.encode(message, writer).ldelim();
|
|
49330
|
+
};
|
|
49331
|
+
|
|
49332
|
+
/**
|
|
49333
|
+
* Decodes a GetThreadReadStateRequest message from the specified reader or buffer.
|
|
49334
|
+
* @function decode
|
|
49335
|
+
* @memberof google.chat.v1.GetThreadReadStateRequest
|
|
49336
|
+
* @static
|
|
49337
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
49338
|
+
* @param {number} [length] Message length if known beforehand
|
|
49339
|
+
* @returns {google.chat.v1.GetThreadReadStateRequest} GetThreadReadStateRequest
|
|
49340
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
49341
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
49342
|
+
*/
|
|
49343
|
+
GetThreadReadStateRequest.decode = function decode(reader, length) {
|
|
49344
|
+
if (!(reader instanceof $Reader))
|
|
49345
|
+
reader = $Reader.create(reader);
|
|
49346
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.GetThreadReadStateRequest();
|
|
49347
|
+
while (reader.pos < end) {
|
|
49348
|
+
var tag = reader.uint32();
|
|
49349
|
+
switch (tag >>> 3) {
|
|
49350
|
+
case 1: {
|
|
49351
|
+
message.name = reader.string();
|
|
49352
|
+
break;
|
|
49353
|
+
}
|
|
49354
|
+
default:
|
|
49355
|
+
reader.skipType(tag & 7);
|
|
49356
|
+
break;
|
|
49357
|
+
}
|
|
49358
|
+
}
|
|
49359
|
+
return message;
|
|
49360
|
+
};
|
|
49361
|
+
|
|
49362
|
+
/**
|
|
49363
|
+
* Decodes a GetThreadReadStateRequest message from the specified reader or buffer, length delimited.
|
|
49364
|
+
* @function decodeDelimited
|
|
49365
|
+
* @memberof google.chat.v1.GetThreadReadStateRequest
|
|
49366
|
+
* @static
|
|
49367
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
49368
|
+
* @returns {google.chat.v1.GetThreadReadStateRequest} GetThreadReadStateRequest
|
|
49369
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
49370
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
49371
|
+
*/
|
|
49372
|
+
GetThreadReadStateRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
49373
|
+
if (!(reader instanceof $Reader))
|
|
49374
|
+
reader = new $Reader(reader);
|
|
49375
|
+
return this.decode(reader, reader.uint32());
|
|
49376
|
+
};
|
|
49377
|
+
|
|
49378
|
+
/**
|
|
49379
|
+
* Verifies a GetThreadReadStateRequest message.
|
|
49380
|
+
* @function verify
|
|
49381
|
+
* @memberof google.chat.v1.GetThreadReadStateRequest
|
|
49382
|
+
* @static
|
|
49383
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
49384
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
49385
|
+
*/
|
|
49386
|
+
GetThreadReadStateRequest.verify = function verify(message) {
|
|
49387
|
+
if (typeof message !== "object" || message === null)
|
|
49388
|
+
return "object expected";
|
|
49389
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
49390
|
+
if (!$util.isString(message.name))
|
|
49391
|
+
return "name: string expected";
|
|
49392
|
+
return null;
|
|
49393
|
+
};
|
|
49394
|
+
|
|
49395
|
+
/**
|
|
49396
|
+
* Creates a GetThreadReadStateRequest message from a plain object. Also converts values to their respective internal types.
|
|
49397
|
+
* @function fromObject
|
|
49398
|
+
* @memberof google.chat.v1.GetThreadReadStateRequest
|
|
49399
|
+
* @static
|
|
49400
|
+
* @param {Object.<string,*>} object Plain object
|
|
49401
|
+
* @returns {google.chat.v1.GetThreadReadStateRequest} GetThreadReadStateRequest
|
|
49402
|
+
*/
|
|
49403
|
+
GetThreadReadStateRequest.fromObject = function fromObject(object) {
|
|
49404
|
+
if (object instanceof $root.google.chat.v1.GetThreadReadStateRequest)
|
|
49405
|
+
return object;
|
|
49406
|
+
var message = new $root.google.chat.v1.GetThreadReadStateRequest();
|
|
49407
|
+
if (object.name != null)
|
|
49408
|
+
message.name = String(object.name);
|
|
49409
|
+
return message;
|
|
49410
|
+
};
|
|
49411
|
+
|
|
49412
|
+
/**
|
|
49413
|
+
* Creates a plain object from a GetThreadReadStateRequest message. Also converts values to other types if specified.
|
|
49414
|
+
* @function toObject
|
|
49415
|
+
* @memberof google.chat.v1.GetThreadReadStateRequest
|
|
49416
|
+
* @static
|
|
49417
|
+
* @param {google.chat.v1.GetThreadReadStateRequest} message GetThreadReadStateRequest
|
|
49418
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
49419
|
+
* @returns {Object.<string,*>} Plain object
|
|
49420
|
+
*/
|
|
49421
|
+
GetThreadReadStateRequest.toObject = function toObject(message, options) {
|
|
49422
|
+
if (!options)
|
|
49423
|
+
options = {};
|
|
49424
|
+
var object = {};
|
|
49425
|
+
if (options.defaults)
|
|
49426
|
+
object.name = "";
|
|
49427
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
49428
|
+
object.name = message.name;
|
|
49429
|
+
return object;
|
|
49430
|
+
};
|
|
49431
|
+
|
|
49432
|
+
/**
|
|
49433
|
+
* Converts this GetThreadReadStateRequest to JSON.
|
|
49434
|
+
* @function toJSON
|
|
49435
|
+
* @memberof google.chat.v1.GetThreadReadStateRequest
|
|
49436
|
+
* @instance
|
|
49437
|
+
* @returns {Object.<string,*>} JSON object
|
|
49438
|
+
*/
|
|
49439
|
+
GetThreadReadStateRequest.prototype.toJSON = function toJSON() {
|
|
49440
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
49441
|
+
};
|
|
49442
|
+
|
|
49443
|
+
/**
|
|
49444
|
+
* Gets the default type url for GetThreadReadStateRequest
|
|
49445
|
+
* @function getTypeUrl
|
|
49446
|
+
* @memberof google.chat.v1.GetThreadReadStateRequest
|
|
49447
|
+
* @static
|
|
49448
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
49449
|
+
* @returns {string} The default type url
|
|
49450
|
+
*/
|
|
49451
|
+
GetThreadReadStateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
49452
|
+
if (typeUrlPrefix === undefined) {
|
|
49453
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
49454
|
+
}
|
|
49455
|
+
return typeUrlPrefix + "/google.chat.v1.GetThreadReadStateRequest";
|
|
49456
|
+
};
|
|
49457
|
+
|
|
49458
|
+
return GetThreadReadStateRequest;
|
|
48253
49459
|
})();
|
|
48254
49460
|
|
|
48255
49461
|
return v1;
|