@dcl/protocol 1.0.0-16429465125.commit-bac58dd → 1.0.0-16564746732.commit-501dda6

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.
@@ -3,8 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.UnblockUserResponse_Ok = exports.UnblockUserResponse = exports.UnblockUserPayload = exports.BlockUserResponse_Ok = exports.BlockUserResponse = exports.BlockUserPayload = exports.GetFriendshipStatusResponse_Ok = exports.GetFriendshipStatusResponse = exports.GetFriendshipStatusPayload = exports.FriendConnectivityUpdate = exports.FriendshipUpdate_BlockResponse = exports.FriendshipUpdate_CancelResponse = exports.FriendshipUpdate_DeleteResponse = exports.FriendshipUpdate_RejectResponse = exports.FriendshipUpdate_AcceptResponse = exports.FriendshipUpdate_RequestResponse = exports.FriendshipUpdate = exports.UpsertFriendshipResponse_Accepted = exports.UpsertFriendshipResponse = exports.PaginatedFriendshipRequestsResponse = exports.PaginatedFriendsProfilesResponse = exports.PaginatedResponse = exports.GetMutualFriendsPayload = exports.UpsertFriendshipPayload_CancelPayload = exports.UpsertFriendshipPayload_DeletePayload = exports.UpsertFriendshipPayload_RejectPayload = exports.UpsertFriendshipPayload_AcceptPayload = exports.UpsertFriendshipPayload_RequestPayload = exports.UpsertFriendshipPayload = exports.GetFriendshipRequestsPayload = exports.GetFriendsPayload = exports.FriendshipRequests = exports.FriendshipRequestResponse = exports.Pagination = exports.BlockedUserProfile = exports.FriendProfile = exports.User = exports.NotFoundError = exports.ForbiddenError = exports.ConflictingError = exports.ProfileNotFound = exports.InvalidRequest = exports.InternalServerError = exports.InvalidFriendshipAction = exports.PrivateVoiceChatStatus = exports.BlockedUsersMessagesVisibilitySetting = exports.PrivateMessagePrivacySetting = exports.FriendshipStatus = exports.ConnectivityStatus = exports.protobufPackage = void 0;
7
- exports.SocialServiceDefinition = exports.GetIncomingPrivateVoiceChatRequestResponse_Ok = exports.GetIncomingPrivateVoiceChatRequestResponse = exports.EndPrivateVoiceChatResponse_Ok = exports.EndPrivateVoiceChatResponse = exports.EndPrivateVoiceChatPayload = exports.PrivateVoiceChatUpdate = exports.PrivateVoiceChatCredentials = exports.RejectPrivateVoiceChatResponse_Ok = exports.RejectPrivateVoiceChatResponse = exports.RejectPrivateVoiceChatPayload = exports.AcceptPrivateVoiceChatResponse_Ok = exports.AcceptPrivateVoiceChatResponse = exports.AcceptPrivateVoiceChatPayload = exports.StartPrivateVoiceChatResponse_Ok = exports.StartPrivateVoiceChatResponse = exports.StartPrivateVoiceChatPayload = exports.CommunityMemberConnectivityUpdate = exports.BlockUpdate = exports.GetBlockingStatusResponse = exports.GetBlockedUsersResponse = exports.GetBlockedUsersPayload = exports.GetPrivateMessagesSettingsResponse_Ok = exports.GetPrivateMessagesSettingsResponse_PrivateMessagesSettings = exports.GetPrivateMessagesSettingsResponse = exports.GetPrivateMessagesSettingsPayload = exports.UpsertSocialSettingsResponse = exports.UpsertSocialSettingsPayload = exports.GetSocialSettingsResponse_Ok = exports.GetSocialSettingsResponse = exports.SocialSettings = void 0;
6
+ exports.UnblockUserResponse = exports.UnblockUserPayload = exports.BlockUserResponse_Ok = exports.BlockUserResponse = exports.BlockUserPayload = exports.GetFriendshipStatusResponse_Ok = exports.GetFriendshipStatusResponse = exports.GetFriendshipStatusPayload = exports.FriendConnectivityUpdate = exports.FriendshipUpdate_BlockResponse = exports.FriendshipUpdate_CancelResponse = exports.FriendshipUpdate_DeleteResponse = exports.FriendshipUpdate_RejectResponse = exports.FriendshipUpdate_AcceptResponse = exports.FriendshipUpdate_RequestResponse = exports.FriendshipUpdate = exports.UpsertFriendshipResponse_Accepted = exports.UpsertFriendshipResponse = exports.PaginatedFriendshipRequestsResponse = exports.PaginatedFriendsProfilesResponse = exports.PaginatedResponse = exports.GetMutualFriendsPayload = exports.UpsertFriendshipPayload_CancelPayload = exports.UpsertFriendshipPayload_DeletePayload = exports.UpsertFriendshipPayload_RejectPayload = exports.UpsertFriendshipPayload_AcceptPayload = exports.UpsertFriendshipPayload_RequestPayload = exports.UpsertFriendshipPayload = exports.GetFriendshipRequestsPayload = exports.GetFriendsPayload = exports.FriendshipRequests = exports.FriendshipRequestResponse = exports.Pagination = exports.BlockedUserProfile = exports.FriendProfile = exports.User = exports.NotFoundError = exports.ForbiddenError = exports.ConflictingError = exports.ProfileNotFound = exports.InvalidRequest = exports.InternalServerError = exports.InvalidFriendshipAction = exports.CommunityVoiceChatStatus = exports.PrivateVoiceChatStatus = exports.BlockedUsersMessagesVisibilitySetting = exports.PrivateMessagePrivacySetting = exports.FriendshipStatus = exports.ConnectivityStatus = exports.protobufPackage = void 0;
7
+ exports.KickPlayerFromCommunityVoiceChatResponse_Ok = exports.KickPlayerFromCommunityVoiceChatResponse = exports.KickPlayerFromCommunityVoiceChatPayload = exports.DemoteSpeakerInCommunityVoiceChatResponse_Ok = exports.DemoteSpeakerInCommunityVoiceChatResponse = exports.DemoteSpeakerInCommunityVoiceChatPayload = exports.PromoteSpeakerInCommunityVoiceChatResponse_Ok = exports.PromoteSpeakerInCommunityVoiceChatResponse = exports.PromoteSpeakerInCommunityVoiceChatPayload = exports.RequestToSpeakInCommunityVoiceChatResponse_Ok = exports.RequestToSpeakInCommunityVoiceChatResponse = exports.RequestToSpeakInCommunityVoiceChatPayload = exports.JoinCommunityVoiceChatResponse_Ok = exports.JoinCommunityVoiceChatResponse = exports.JoinCommunityVoiceChatPayload = exports.StartCommunityVoiceChatResponse_Ok = exports.StartCommunityVoiceChatResponse = exports.StartCommunityVoiceChatPayload = exports.CommunityVoiceChatCredentials = exports.GetIncomingPrivateVoiceChatRequestResponse_Ok = exports.GetIncomingPrivateVoiceChatRequestResponse = exports.EndPrivateVoiceChatResponse_Ok = exports.EndPrivateVoiceChatResponse = exports.EndPrivateVoiceChatPayload = exports.PrivateVoiceChatUpdate = exports.PrivateVoiceChatCredentials = exports.RejectPrivateVoiceChatResponse_Ok = exports.RejectPrivateVoiceChatResponse = exports.RejectPrivateVoiceChatPayload = exports.AcceptPrivateVoiceChatResponse_Ok = exports.AcceptPrivateVoiceChatResponse = exports.AcceptPrivateVoiceChatPayload = exports.StartPrivateVoiceChatResponse_Ok = exports.StartPrivateVoiceChatResponse = exports.StartPrivateVoiceChatPayload = exports.CommunityMemberConnectivityUpdate = exports.BlockUpdate = exports.GetBlockingStatusResponse = exports.GetBlockedUsersResponse = exports.GetBlockedUsersPayload = exports.GetPrivateMessagesSettingsResponse_Ok = exports.GetPrivateMessagesSettingsResponse_PrivateMessagesSettings = exports.GetPrivateMessagesSettingsResponse = exports.GetPrivateMessagesSettingsPayload = exports.UpsertSocialSettingsResponse = exports.UpsertSocialSettingsPayload = exports.GetSocialSettingsResponse_Ok = exports.GetSocialSettingsResponse = exports.SocialSettings = exports.UnblockUserResponse_Ok = void 0;
8
+ exports.SocialServiceDefinition = exports.CommunityVoiceChatUpdate = void 0;
8
9
  exports.connectivityStatusFromJSON = connectivityStatusFromJSON;
9
10
  exports.connectivityStatusToJSON = connectivityStatusToJSON;
10
11
  exports.friendshipStatusFromJSON = friendshipStatusFromJSON;
@@ -15,6 +16,8 @@ exports.blockedUsersMessagesVisibilitySettingFromJSON = blockedUsersMessagesVisi
15
16
  exports.blockedUsersMessagesVisibilitySettingToJSON = blockedUsersMessagesVisibilitySettingToJSON;
16
17
  exports.privateVoiceChatStatusFromJSON = privateVoiceChatStatusFromJSON;
17
18
  exports.privateVoiceChatStatusToJSON = privateVoiceChatStatusToJSON;
19
+ exports.communityVoiceChatStatusFromJSON = communityVoiceChatStatusFromJSON;
20
+ exports.communityVoiceChatStatusToJSON = communityVoiceChatStatusToJSON;
18
21
  /* eslint-disable */
19
22
  const long_1 = __importDefault(require("long"));
20
23
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
@@ -241,6 +244,37 @@ function privateVoiceChatStatusToJSON(object) {
241
244
  return "UNRECOGNIZED";
242
245
  }
243
246
  }
247
+ var CommunityVoiceChatStatus;
248
+ (function (CommunityVoiceChatStatus) {
249
+ CommunityVoiceChatStatus[CommunityVoiceChatStatus["COMMUNITY_VOICE_CHAT_STARTED"] = 0] = "COMMUNITY_VOICE_CHAT_STARTED";
250
+ CommunityVoiceChatStatus[CommunityVoiceChatStatus["COMMUNITY_VOICE_CHAT_ENDED"] = 1] = "COMMUNITY_VOICE_CHAT_ENDED";
251
+ CommunityVoiceChatStatus[CommunityVoiceChatStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
252
+ })(CommunityVoiceChatStatus || (exports.CommunityVoiceChatStatus = CommunityVoiceChatStatus = {}));
253
+ function communityVoiceChatStatusFromJSON(object) {
254
+ switch (object) {
255
+ case 0:
256
+ case "COMMUNITY_VOICE_CHAT_STARTED":
257
+ return CommunityVoiceChatStatus.COMMUNITY_VOICE_CHAT_STARTED;
258
+ case 1:
259
+ case "COMMUNITY_VOICE_CHAT_ENDED":
260
+ return CommunityVoiceChatStatus.COMMUNITY_VOICE_CHAT_ENDED;
261
+ case -1:
262
+ case "UNRECOGNIZED":
263
+ default:
264
+ return CommunityVoiceChatStatus.UNRECOGNIZED;
265
+ }
266
+ }
267
+ function communityVoiceChatStatusToJSON(object) {
268
+ switch (object) {
269
+ case CommunityVoiceChatStatus.COMMUNITY_VOICE_CHAT_STARTED:
270
+ return "COMMUNITY_VOICE_CHAT_STARTED";
271
+ case CommunityVoiceChatStatus.COMMUNITY_VOICE_CHAT_ENDED:
272
+ return "COMMUNITY_VOICE_CHAT_ENDED";
273
+ case CommunityVoiceChatStatus.UNRECOGNIZED:
274
+ default:
275
+ return "UNRECOGNIZED";
276
+ }
277
+ }
244
278
  function createBaseInvalidFriendshipAction() {
245
279
  return { message: undefined };
246
280
  }
@@ -6205,209 +6239,2256 @@ var GetIncomingPrivateVoiceChatRequestResponse_Ok;
6205
6239
  }
6206
6240
  GetIncomingPrivateVoiceChatRequestResponse_Ok.fromPartial = fromPartial;
6207
6241
  })(GetIncomingPrivateVoiceChatRequestResponse_Ok || (exports.GetIncomingPrivateVoiceChatRequestResponse_Ok = GetIncomingPrivateVoiceChatRequestResponse_Ok = {}));
6208
- exports.SocialServiceDefinition = {
6209
- name: "SocialService",
6210
- fullName: "decentraland.social_service.v2.SocialService",
6211
- methods: {
6212
- /** Get the list of friends for the authenticated user */
6213
- getFriends: {
6214
- name: "GetFriends",
6215
- requestType: GetFriendsPayload,
6216
- requestStream: false,
6217
- responseType: PaginatedFriendsProfilesResponse,
6218
- responseStream: false,
6219
- options: {},
6220
- },
6221
- /** Get the list of mutual friends between the authenticated user and the one in the parameter */
6222
- getMutualFriends: {
6223
- name: "GetMutualFriends",
6224
- requestType: GetMutualFriendsPayload,
6225
- requestStream: false,
6226
- responseType: PaginatedFriendsProfilesResponse,
6227
- responseStream: false,
6228
- options: {},
6229
- },
6230
- /** Get the pending friendship requests for the authenticated user */
6231
- getPendingFriendshipRequests: {
6232
- name: "GetPendingFriendshipRequests",
6233
- requestType: GetFriendshipRequestsPayload,
6234
- requestStream: false,
6235
- responseType: PaginatedFriendshipRequestsResponse,
6236
- responseStream: false,
6237
- options: {},
6238
- },
6239
- /** Get the sent friendship requests for the authenticated user */
6240
- getSentFriendshipRequests: {
6241
- name: "GetSentFriendshipRequests",
6242
- requestType: GetFriendshipRequestsPayload,
6243
- requestStream: false,
6244
- responseType: PaginatedFriendshipRequestsResponse,
6245
- responseStream: false,
6246
- options: {},
6247
- },
6248
- /** Create or update friendship status: REQUEST, ACCEPT, REJECT, CANCEL, DELETE */
6249
- upsertFriendship: {
6250
- name: "UpsertFriendship",
6251
- requestType: UpsertFriendshipPayload,
6252
- requestStream: false,
6253
- responseType: UpsertFriendshipResponse,
6254
- responseStream: false,
6255
- options: {},
6256
- },
6257
- /** Subscribe to updates of friendship status: REQUEST, ACCEPT, REJECT, CANCEL, DELETE */
6258
- subscribeToFriendshipUpdates: {
6259
- name: "SubscribeToFriendshipUpdates",
6260
- requestType: empty_gen_1.Empty,
6261
- requestStream: false,
6262
- responseType: FriendshipUpdate,
6263
- responseStream: true,
6264
- options: {},
6265
- },
6266
- /** Get the friendship status between the authenticated user and the one in the parameter */
6267
- getFriendshipStatus: {
6268
- name: "GetFriendshipStatus",
6269
- requestType: GetFriendshipStatusPayload,
6270
- requestStream: false,
6271
- responseType: GetFriendshipStatusResponse,
6272
- responseStream: false,
6273
- options: {},
6274
- },
6275
- /** Subscribe to connectivity updates of friends: ONLINE, OFFLINE, AWAY */
6276
- subscribeToFriendConnectivityUpdates: {
6277
- name: "SubscribeToFriendConnectivityUpdates",
6278
- requestType: empty_gen_1.Empty,
6279
- requestStream: false,
6280
- responseType: FriendConnectivityUpdate,
6281
- responseStream: true,
6282
- options: {},
6283
- },
6284
- blockUser: {
6285
- name: "BlockUser",
6286
- requestType: BlockUserPayload,
6287
- requestStream: false,
6288
- responseType: BlockUserResponse,
6289
- responseStream: false,
6290
- options: {},
6291
- },
6292
- unblockUser: {
6293
- name: "UnblockUser",
6294
- requestType: UnblockUserPayload,
6295
- requestStream: false,
6296
- responseType: UnblockUserResponse,
6297
- responseStream: false,
6298
- options: {},
6299
- },
6300
- getBlockedUsers: {
6301
- name: "GetBlockedUsers",
6302
- requestType: GetBlockedUsersPayload,
6303
- requestStream: false,
6304
- responseType: GetBlockedUsersResponse,
6305
- responseStream: false,
6306
- options: {},
6307
- },
6308
- getBlockingStatus: {
6309
- name: "GetBlockingStatus",
6310
- requestType: empty_gen_1.Empty,
6311
- requestStream: false,
6312
- responseType: GetBlockingStatusResponse,
6313
- responseStream: false,
6314
- options: {},
6315
- },
6316
- subscribeToBlockUpdates: {
6317
- name: "SubscribeToBlockUpdates",
6318
- requestType: empty_gen_1.Empty,
6319
- requestStream: false,
6320
- responseType: BlockUpdate,
6321
- responseStream: true,
6322
- options: {},
6323
- },
6324
- /** Get all the social settings for the authenticated user */
6325
- getSocialSettings: {
6326
- name: "GetSocialSettings",
6327
- requestType: empty_gen_1.Empty,
6328
- requestStream: false,
6329
- responseType: GetSocialSettingsResponse,
6330
- responseStream: false,
6331
- options: {},
6332
- },
6333
- /** Insert or update the social settings for the authenticated user */
6334
- upsertSocialSettings: {
6335
- name: "UpsertSocialSettings",
6336
- requestType: UpsertSocialSettingsPayload,
6337
- requestStream: false,
6338
- responseType: UpsertSocialSettingsResponse,
6339
- responseStream: false,
6340
- options: {},
6341
- },
6342
- /** Get the private messages privacy settings for the requested users */
6343
- getPrivateMessagesSettings: {
6344
- name: "GetPrivateMessagesSettings",
6345
- requestType: GetPrivateMessagesSettingsPayload,
6346
- requestStream: false,
6347
- responseType: GetPrivateMessagesSettingsResponse,
6348
- responseStream: false,
6349
- options: {},
6350
- },
6351
- /** Subscribe to community member connectivity updates: ONLINE, OFFLINE */
6352
- subscribeToCommunityMemberConnectivityUpdates: {
6353
- name: "SubscribeToCommunityMemberConnectivityUpdates",
6354
- requestType: empty_gen_1.Empty,
6355
- requestStream: false,
6356
- responseType: CommunityMemberConnectivityUpdate,
6357
- responseStream: true,
6358
- options: {},
6359
- },
6360
- /** Start a private voice chat */
6361
- startPrivateVoiceChat: {
6362
- name: "StartPrivateVoiceChat",
6363
- requestType: StartPrivateVoiceChatPayload,
6364
- requestStream: false,
6365
- responseType: StartPrivateVoiceChatResponse,
6366
- responseStream: false,
6367
- options: {},
6368
- },
6369
- /** Accept a private voice chat */
6370
- acceptPrivateVoiceChat: {
6371
- name: "AcceptPrivateVoiceChat",
6372
- requestType: AcceptPrivateVoiceChatPayload,
6373
- requestStream: false,
6374
- responseType: AcceptPrivateVoiceChatResponse,
6375
- responseStream: false,
6376
- options: {},
6377
- },
6378
- /** Reject a private voice chat */
6379
- rejectPrivateVoiceChat: {
6380
- name: "RejectPrivateVoiceChat",
6381
- requestType: RejectPrivateVoiceChatPayload,
6382
- requestStream: false,
6383
- responseType: RejectPrivateVoiceChatResponse,
6384
- responseStream: false,
6385
- options: {},
6386
- },
6387
- /** End a private voice chat */
6388
- endPrivateVoiceChat: {
6389
- name: "EndPrivateVoiceChat",
6390
- requestType: EndPrivateVoiceChatPayload,
6391
- requestStream: false,
6392
- responseType: EndPrivateVoiceChatResponse,
6393
- responseStream: false,
6394
- options: {},
6395
- },
6396
- /** Get the incoming private voice chat request */
6397
- getIncomingPrivateVoiceChatRequest: {
6398
- name: "GetIncomingPrivateVoiceChatRequest",
6399
- requestType: empty_gen_1.Empty,
6400
- requestStream: false,
6401
- responseType: GetIncomingPrivateVoiceChatRequestResponse,
6402
- responseStream: false,
6403
- options: {},
6404
- },
6405
- /** Subscribe to private voice chat updates */
6406
- subscribeToPrivateVoiceChatUpdates: {
6407
- name: "SubscribeToPrivateVoiceChatUpdates",
6408
- requestType: empty_gen_1.Empty,
6409
- requestStream: false,
6410
- responseType: PrivateVoiceChatUpdate,
6242
+ function createBaseCommunityVoiceChatCredentials() {
6243
+ return { connectionUrl: "" };
6244
+ }
6245
+ var CommunityVoiceChatCredentials;
6246
+ (function (CommunityVoiceChatCredentials) {
6247
+ function encode(message, writer = minimal_1.default.Writer.create()) {
6248
+ if (message.connectionUrl !== "") {
6249
+ writer.uint32(10).string(message.connectionUrl);
6250
+ }
6251
+ return writer;
6252
+ }
6253
+ CommunityVoiceChatCredentials.encode = encode;
6254
+ function decode(input, length) {
6255
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
6256
+ let end = length === undefined ? reader.len : reader.pos + length;
6257
+ const message = createBaseCommunityVoiceChatCredentials();
6258
+ while (reader.pos < end) {
6259
+ const tag = reader.uint32();
6260
+ switch (tag >>> 3) {
6261
+ case 1:
6262
+ if (tag !== 10) {
6263
+ break;
6264
+ }
6265
+ message.connectionUrl = reader.string();
6266
+ continue;
6267
+ }
6268
+ if ((tag & 7) === 4 || tag === 0) {
6269
+ break;
6270
+ }
6271
+ reader.skipType(tag & 7);
6272
+ }
6273
+ return message;
6274
+ }
6275
+ CommunityVoiceChatCredentials.decode = decode;
6276
+ function fromJSON(object) {
6277
+ return { connectionUrl: isSet(object.connectionUrl) ? String(object.connectionUrl) : "" };
6278
+ }
6279
+ CommunityVoiceChatCredentials.fromJSON = fromJSON;
6280
+ function toJSON(message) {
6281
+ const obj = {};
6282
+ message.connectionUrl !== undefined && (obj.connectionUrl = message.connectionUrl);
6283
+ return obj;
6284
+ }
6285
+ CommunityVoiceChatCredentials.toJSON = toJSON;
6286
+ function create(base) {
6287
+ return CommunityVoiceChatCredentials.fromPartial(base !== null && base !== void 0 ? base : {});
6288
+ }
6289
+ CommunityVoiceChatCredentials.create = create;
6290
+ function fromPartial(object) {
6291
+ var _a;
6292
+ const message = createBaseCommunityVoiceChatCredentials();
6293
+ message.connectionUrl = (_a = object.connectionUrl) !== null && _a !== void 0 ? _a : "";
6294
+ return message;
6295
+ }
6296
+ CommunityVoiceChatCredentials.fromPartial = fromPartial;
6297
+ })(CommunityVoiceChatCredentials || (exports.CommunityVoiceChatCredentials = CommunityVoiceChatCredentials = {}));
6298
+ function createBaseStartCommunityVoiceChatPayload() {
6299
+ return { communityId: "" };
6300
+ }
6301
+ var StartCommunityVoiceChatPayload;
6302
+ (function (StartCommunityVoiceChatPayload) {
6303
+ function encode(message, writer = minimal_1.default.Writer.create()) {
6304
+ if (message.communityId !== "") {
6305
+ writer.uint32(10).string(message.communityId);
6306
+ }
6307
+ return writer;
6308
+ }
6309
+ StartCommunityVoiceChatPayload.encode = encode;
6310
+ function decode(input, length) {
6311
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
6312
+ let end = length === undefined ? reader.len : reader.pos + length;
6313
+ const message = createBaseStartCommunityVoiceChatPayload();
6314
+ while (reader.pos < end) {
6315
+ const tag = reader.uint32();
6316
+ switch (tag >>> 3) {
6317
+ case 1:
6318
+ if (tag !== 10) {
6319
+ break;
6320
+ }
6321
+ message.communityId = reader.string();
6322
+ continue;
6323
+ }
6324
+ if ((tag & 7) === 4 || tag === 0) {
6325
+ break;
6326
+ }
6327
+ reader.skipType(tag & 7);
6328
+ }
6329
+ return message;
6330
+ }
6331
+ StartCommunityVoiceChatPayload.decode = decode;
6332
+ function fromJSON(object) {
6333
+ return { communityId: isSet(object.communityId) ? String(object.communityId) : "" };
6334
+ }
6335
+ StartCommunityVoiceChatPayload.fromJSON = fromJSON;
6336
+ function toJSON(message) {
6337
+ const obj = {};
6338
+ message.communityId !== undefined && (obj.communityId = message.communityId);
6339
+ return obj;
6340
+ }
6341
+ StartCommunityVoiceChatPayload.toJSON = toJSON;
6342
+ function create(base) {
6343
+ return StartCommunityVoiceChatPayload.fromPartial(base !== null && base !== void 0 ? base : {});
6344
+ }
6345
+ StartCommunityVoiceChatPayload.create = create;
6346
+ function fromPartial(object) {
6347
+ var _a;
6348
+ const message = createBaseStartCommunityVoiceChatPayload();
6349
+ message.communityId = (_a = object.communityId) !== null && _a !== void 0 ? _a : "";
6350
+ return message;
6351
+ }
6352
+ StartCommunityVoiceChatPayload.fromPartial = fromPartial;
6353
+ })(StartCommunityVoiceChatPayload || (exports.StartCommunityVoiceChatPayload = StartCommunityVoiceChatPayload = {}));
6354
+ function createBaseStartCommunityVoiceChatResponse() {
6355
+ return { response: undefined };
6356
+ }
6357
+ var StartCommunityVoiceChatResponse;
6358
+ (function (StartCommunityVoiceChatResponse) {
6359
+ function encode(message, writer = minimal_1.default.Writer.create()) {
6360
+ var _a;
6361
+ switch ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) {
6362
+ case "ok":
6363
+ StartCommunityVoiceChatResponse_Ok.encode(message.response.ok, writer.uint32(10).fork()).ldelim();
6364
+ break;
6365
+ case "invalidRequest":
6366
+ InvalidRequest.encode(message.response.invalidRequest, writer.uint32(18).fork()).ldelim();
6367
+ break;
6368
+ case "forbiddenError":
6369
+ ForbiddenError.encode(message.response.forbiddenError, writer.uint32(26).fork()).ldelim();
6370
+ break;
6371
+ case "conflictingError":
6372
+ ConflictingError.encode(message.response.conflictingError, writer.uint32(34).fork()).ldelim();
6373
+ break;
6374
+ case "internalServerError":
6375
+ InternalServerError.encode(message.response.internalServerError, writer.uint32(42).fork()).ldelim();
6376
+ break;
6377
+ }
6378
+ return writer;
6379
+ }
6380
+ StartCommunityVoiceChatResponse.encode = encode;
6381
+ function decode(input, length) {
6382
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
6383
+ let end = length === undefined ? reader.len : reader.pos + length;
6384
+ const message = createBaseStartCommunityVoiceChatResponse();
6385
+ while (reader.pos < end) {
6386
+ const tag = reader.uint32();
6387
+ switch (tag >>> 3) {
6388
+ case 1:
6389
+ if (tag !== 10) {
6390
+ break;
6391
+ }
6392
+ message.response = { $case: "ok", ok: StartCommunityVoiceChatResponse_Ok.decode(reader, reader.uint32()) };
6393
+ continue;
6394
+ case 2:
6395
+ if (tag !== 18) {
6396
+ break;
6397
+ }
6398
+ message.response = {
6399
+ $case: "invalidRequest",
6400
+ invalidRequest: InvalidRequest.decode(reader, reader.uint32()),
6401
+ };
6402
+ continue;
6403
+ case 3:
6404
+ if (tag !== 26) {
6405
+ break;
6406
+ }
6407
+ message.response = {
6408
+ $case: "forbiddenError",
6409
+ forbiddenError: ForbiddenError.decode(reader, reader.uint32()),
6410
+ };
6411
+ continue;
6412
+ case 4:
6413
+ if (tag !== 34) {
6414
+ break;
6415
+ }
6416
+ message.response = {
6417
+ $case: "conflictingError",
6418
+ conflictingError: ConflictingError.decode(reader, reader.uint32()),
6419
+ };
6420
+ continue;
6421
+ case 5:
6422
+ if (tag !== 42) {
6423
+ break;
6424
+ }
6425
+ message.response = {
6426
+ $case: "internalServerError",
6427
+ internalServerError: InternalServerError.decode(reader, reader.uint32()),
6428
+ };
6429
+ continue;
6430
+ }
6431
+ if ((tag & 7) === 4 || tag === 0) {
6432
+ break;
6433
+ }
6434
+ reader.skipType(tag & 7);
6435
+ }
6436
+ return message;
6437
+ }
6438
+ StartCommunityVoiceChatResponse.decode = decode;
6439
+ function fromJSON(object) {
6440
+ return {
6441
+ response: isSet(object.ok)
6442
+ ? { $case: "ok", ok: StartCommunityVoiceChatResponse_Ok.fromJSON(object.ok) }
6443
+ : isSet(object.invalidRequest)
6444
+ ? { $case: "invalidRequest", invalidRequest: InvalidRequest.fromJSON(object.invalidRequest) }
6445
+ : isSet(object.forbiddenError)
6446
+ ? { $case: "forbiddenError", forbiddenError: ForbiddenError.fromJSON(object.forbiddenError) }
6447
+ : isSet(object.conflictingError)
6448
+ ? { $case: "conflictingError", conflictingError: ConflictingError.fromJSON(object.conflictingError) }
6449
+ : isSet(object.internalServerError)
6450
+ ? {
6451
+ $case: "internalServerError",
6452
+ internalServerError: InternalServerError.fromJSON(object.internalServerError),
6453
+ }
6454
+ : undefined,
6455
+ };
6456
+ }
6457
+ StartCommunityVoiceChatResponse.fromJSON = fromJSON;
6458
+ function toJSON(message) {
6459
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
6460
+ const obj = {};
6461
+ ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) === "ok" &&
6462
+ (obj.ok = ((_b = message.response) === null || _b === void 0 ? void 0 : _b.ok) ? StartCommunityVoiceChatResponse_Ok.toJSON((_c = message.response) === null || _c === void 0 ? void 0 : _c.ok) : undefined);
6463
+ ((_d = message.response) === null || _d === void 0 ? void 0 : _d.$case) === "invalidRequest" &&
6464
+ (obj.invalidRequest = ((_e = message.response) === null || _e === void 0 ? void 0 : _e.invalidRequest)
6465
+ ? InvalidRequest.toJSON((_f = message.response) === null || _f === void 0 ? void 0 : _f.invalidRequest)
6466
+ : undefined);
6467
+ ((_g = message.response) === null || _g === void 0 ? void 0 : _g.$case) === "forbiddenError" &&
6468
+ (obj.forbiddenError = ((_h = message.response) === null || _h === void 0 ? void 0 : _h.forbiddenError)
6469
+ ? ForbiddenError.toJSON((_j = message.response) === null || _j === void 0 ? void 0 : _j.forbiddenError)
6470
+ : undefined);
6471
+ ((_k = message.response) === null || _k === void 0 ? void 0 : _k.$case) === "conflictingError" &&
6472
+ (obj.conflictingError = ((_l = message.response) === null || _l === void 0 ? void 0 : _l.conflictingError)
6473
+ ? ConflictingError.toJSON((_m = message.response) === null || _m === void 0 ? void 0 : _m.conflictingError)
6474
+ : undefined);
6475
+ ((_o = message.response) === null || _o === void 0 ? void 0 : _o.$case) === "internalServerError" &&
6476
+ (obj.internalServerError = ((_p = message.response) === null || _p === void 0 ? void 0 : _p.internalServerError)
6477
+ ? InternalServerError.toJSON((_q = message.response) === null || _q === void 0 ? void 0 : _q.internalServerError)
6478
+ : undefined);
6479
+ return obj;
6480
+ }
6481
+ StartCommunityVoiceChatResponse.toJSON = toJSON;
6482
+ function create(base) {
6483
+ return StartCommunityVoiceChatResponse.fromPartial(base !== null && base !== void 0 ? base : {});
6484
+ }
6485
+ StartCommunityVoiceChatResponse.create = create;
6486
+ function fromPartial(object) {
6487
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
6488
+ const message = createBaseStartCommunityVoiceChatResponse();
6489
+ if (((_a = object.response) === null || _a === void 0 ? void 0 : _a.$case) === "ok" && ((_b = object.response) === null || _b === void 0 ? void 0 : _b.ok) !== undefined && ((_c = object.response) === null || _c === void 0 ? void 0 : _c.ok) !== null) {
6490
+ message.response = { $case: "ok", ok: StartCommunityVoiceChatResponse_Ok.fromPartial(object.response.ok) };
6491
+ }
6492
+ if (((_d = object.response) === null || _d === void 0 ? void 0 : _d.$case) === "invalidRequest" &&
6493
+ ((_e = object.response) === null || _e === void 0 ? void 0 : _e.invalidRequest) !== undefined &&
6494
+ ((_f = object.response) === null || _f === void 0 ? void 0 : _f.invalidRequest) !== null) {
6495
+ message.response = {
6496
+ $case: "invalidRequest",
6497
+ invalidRequest: InvalidRequest.fromPartial(object.response.invalidRequest),
6498
+ };
6499
+ }
6500
+ if (((_g = object.response) === null || _g === void 0 ? void 0 : _g.$case) === "forbiddenError" &&
6501
+ ((_h = object.response) === null || _h === void 0 ? void 0 : _h.forbiddenError) !== undefined &&
6502
+ ((_j = object.response) === null || _j === void 0 ? void 0 : _j.forbiddenError) !== null) {
6503
+ message.response = {
6504
+ $case: "forbiddenError",
6505
+ forbiddenError: ForbiddenError.fromPartial(object.response.forbiddenError),
6506
+ };
6507
+ }
6508
+ if (((_k = object.response) === null || _k === void 0 ? void 0 : _k.$case) === "conflictingError" &&
6509
+ ((_l = object.response) === null || _l === void 0 ? void 0 : _l.conflictingError) !== undefined &&
6510
+ ((_m = object.response) === null || _m === void 0 ? void 0 : _m.conflictingError) !== null) {
6511
+ message.response = {
6512
+ $case: "conflictingError",
6513
+ conflictingError: ConflictingError.fromPartial(object.response.conflictingError),
6514
+ };
6515
+ }
6516
+ if (((_o = object.response) === null || _o === void 0 ? void 0 : _o.$case) === "internalServerError" &&
6517
+ ((_p = object.response) === null || _p === void 0 ? void 0 : _p.internalServerError) !== undefined &&
6518
+ ((_q = object.response) === null || _q === void 0 ? void 0 : _q.internalServerError) !== null) {
6519
+ message.response = {
6520
+ $case: "internalServerError",
6521
+ internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
6522
+ };
6523
+ }
6524
+ return message;
6525
+ }
6526
+ StartCommunityVoiceChatResponse.fromPartial = fromPartial;
6527
+ })(StartCommunityVoiceChatResponse || (exports.StartCommunityVoiceChatResponse = StartCommunityVoiceChatResponse = {}));
6528
+ function createBaseStartCommunityVoiceChatResponse_Ok() {
6529
+ return { credentials: undefined };
6530
+ }
6531
+ var StartCommunityVoiceChatResponse_Ok;
6532
+ (function (StartCommunityVoiceChatResponse_Ok) {
6533
+ function encode(message, writer = minimal_1.default.Writer.create()) {
6534
+ if (message.credentials !== undefined) {
6535
+ CommunityVoiceChatCredentials.encode(message.credentials, writer.uint32(10).fork()).ldelim();
6536
+ }
6537
+ return writer;
6538
+ }
6539
+ StartCommunityVoiceChatResponse_Ok.encode = encode;
6540
+ function decode(input, length) {
6541
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
6542
+ let end = length === undefined ? reader.len : reader.pos + length;
6543
+ const message = createBaseStartCommunityVoiceChatResponse_Ok();
6544
+ while (reader.pos < end) {
6545
+ const tag = reader.uint32();
6546
+ switch (tag >>> 3) {
6547
+ case 1:
6548
+ if (tag !== 10) {
6549
+ break;
6550
+ }
6551
+ message.credentials = CommunityVoiceChatCredentials.decode(reader, reader.uint32());
6552
+ continue;
6553
+ }
6554
+ if ((tag & 7) === 4 || tag === 0) {
6555
+ break;
6556
+ }
6557
+ reader.skipType(tag & 7);
6558
+ }
6559
+ return message;
6560
+ }
6561
+ StartCommunityVoiceChatResponse_Ok.decode = decode;
6562
+ function fromJSON(object) {
6563
+ return {
6564
+ credentials: isSet(object.credentials) ? CommunityVoiceChatCredentials.fromJSON(object.credentials) : undefined,
6565
+ };
6566
+ }
6567
+ StartCommunityVoiceChatResponse_Ok.fromJSON = fromJSON;
6568
+ function toJSON(message) {
6569
+ const obj = {};
6570
+ message.credentials !== undefined &&
6571
+ (obj.credentials = message.credentials ? CommunityVoiceChatCredentials.toJSON(message.credentials) : undefined);
6572
+ return obj;
6573
+ }
6574
+ StartCommunityVoiceChatResponse_Ok.toJSON = toJSON;
6575
+ function create(base) {
6576
+ return StartCommunityVoiceChatResponse_Ok.fromPartial(base !== null && base !== void 0 ? base : {});
6577
+ }
6578
+ StartCommunityVoiceChatResponse_Ok.create = create;
6579
+ function fromPartial(object) {
6580
+ const message = createBaseStartCommunityVoiceChatResponse_Ok();
6581
+ message.credentials = (object.credentials !== undefined && object.credentials !== null)
6582
+ ? CommunityVoiceChatCredentials.fromPartial(object.credentials)
6583
+ : undefined;
6584
+ return message;
6585
+ }
6586
+ StartCommunityVoiceChatResponse_Ok.fromPartial = fromPartial;
6587
+ })(StartCommunityVoiceChatResponse_Ok || (exports.StartCommunityVoiceChatResponse_Ok = StartCommunityVoiceChatResponse_Ok = {}));
6588
+ function createBaseJoinCommunityVoiceChatPayload() {
6589
+ return { communityId: "" };
6590
+ }
6591
+ var JoinCommunityVoiceChatPayload;
6592
+ (function (JoinCommunityVoiceChatPayload) {
6593
+ function encode(message, writer = minimal_1.default.Writer.create()) {
6594
+ if (message.communityId !== "") {
6595
+ writer.uint32(10).string(message.communityId);
6596
+ }
6597
+ return writer;
6598
+ }
6599
+ JoinCommunityVoiceChatPayload.encode = encode;
6600
+ function decode(input, length) {
6601
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
6602
+ let end = length === undefined ? reader.len : reader.pos + length;
6603
+ const message = createBaseJoinCommunityVoiceChatPayload();
6604
+ while (reader.pos < end) {
6605
+ const tag = reader.uint32();
6606
+ switch (tag >>> 3) {
6607
+ case 1:
6608
+ if (tag !== 10) {
6609
+ break;
6610
+ }
6611
+ message.communityId = reader.string();
6612
+ continue;
6613
+ }
6614
+ if ((tag & 7) === 4 || tag === 0) {
6615
+ break;
6616
+ }
6617
+ reader.skipType(tag & 7);
6618
+ }
6619
+ return message;
6620
+ }
6621
+ JoinCommunityVoiceChatPayload.decode = decode;
6622
+ function fromJSON(object) {
6623
+ return { communityId: isSet(object.communityId) ? String(object.communityId) : "" };
6624
+ }
6625
+ JoinCommunityVoiceChatPayload.fromJSON = fromJSON;
6626
+ function toJSON(message) {
6627
+ const obj = {};
6628
+ message.communityId !== undefined && (obj.communityId = message.communityId);
6629
+ return obj;
6630
+ }
6631
+ JoinCommunityVoiceChatPayload.toJSON = toJSON;
6632
+ function create(base) {
6633
+ return JoinCommunityVoiceChatPayload.fromPartial(base !== null && base !== void 0 ? base : {});
6634
+ }
6635
+ JoinCommunityVoiceChatPayload.create = create;
6636
+ function fromPartial(object) {
6637
+ var _a;
6638
+ const message = createBaseJoinCommunityVoiceChatPayload();
6639
+ message.communityId = (_a = object.communityId) !== null && _a !== void 0 ? _a : "";
6640
+ return message;
6641
+ }
6642
+ JoinCommunityVoiceChatPayload.fromPartial = fromPartial;
6643
+ })(JoinCommunityVoiceChatPayload || (exports.JoinCommunityVoiceChatPayload = JoinCommunityVoiceChatPayload = {}));
6644
+ function createBaseJoinCommunityVoiceChatResponse() {
6645
+ return { response: undefined };
6646
+ }
6647
+ var JoinCommunityVoiceChatResponse;
6648
+ (function (JoinCommunityVoiceChatResponse) {
6649
+ function encode(message, writer = minimal_1.default.Writer.create()) {
6650
+ var _a;
6651
+ switch ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) {
6652
+ case "ok":
6653
+ JoinCommunityVoiceChatResponse_Ok.encode(message.response.ok, writer.uint32(10).fork()).ldelim();
6654
+ break;
6655
+ case "invalidRequest":
6656
+ InvalidRequest.encode(message.response.invalidRequest, writer.uint32(18).fork()).ldelim();
6657
+ break;
6658
+ case "forbiddenError":
6659
+ ForbiddenError.encode(message.response.forbiddenError, writer.uint32(26).fork()).ldelim();
6660
+ break;
6661
+ case "notFoundError":
6662
+ NotFoundError.encode(message.response.notFoundError, writer.uint32(34).fork()).ldelim();
6663
+ break;
6664
+ case "conflictingError":
6665
+ ConflictingError.encode(message.response.conflictingError, writer.uint32(42).fork()).ldelim();
6666
+ break;
6667
+ case "internalServerError":
6668
+ InternalServerError.encode(message.response.internalServerError, writer.uint32(50).fork()).ldelim();
6669
+ break;
6670
+ }
6671
+ return writer;
6672
+ }
6673
+ JoinCommunityVoiceChatResponse.encode = encode;
6674
+ function decode(input, length) {
6675
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
6676
+ let end = length === undefined ? reader.len : reader.pos + length;
6677
+ const message = createBaseJoinCommunityVoiceChatResponse();
6678
+ while (reader.pos < end) {
6679
+ const tag = reader.uint32();
6680
+ switch (tag >>> 3) {
6681
+ case 1:
6682
+ if (tag !== 10) {
6683
+ break;
6684
+ }
6685
+ message.response = { $case: "ok", ok: JoinCommunityVoiceChatResponse_Ok.decode(reader, reader.uint32()) };
6686
+ continue;
6687
+ case 2:
6688
+ if (tag !== 18) {
6689
+ break;
6690
+ }
6691
+ message.response = {
6692
+ $case: "invalidRequest",
6693
+ invalidRequest: InvalidRequest.decode(reader, reader.uint32()),
6694
+ };
6695
+ continue;
6696
+ case 3:
6697
+ if (tag !== 26) {
6698
+ break;
6699
+ }
6700
+ message.response = {
6701
+ $case: "forbiddenError",
6702
+ forbiddenError: ForbiddenError.decode(reader, reader.uint32()),
6703
+ };
6704
+ continue;
6705
+ case 4:
6706
+ if (tag !== 34) {
6707
+ break;
6708
+ }
6709
+ message.response = { $case: "notFoundError", notFoundError: NotFoundError.decode(reader, reader.uint32()) };
6710
+ continue;
6711
+ case 5:
6712
+ if (tag !== 42) {
6713
+ break;
6714
+ }
6715
+ message.response = {
6716
+ $case: "conflictingError",
6717
+ conflictingError: ConflictingError.decode(reader, reader.uint32()),
6718
+ };
6719
+ continue;
6720
+ case 6:
6721
+ if (tag !== 50) {
6722
+ break;
6723
+ }
6724
+ message.response = {
6725
+ $case: "internalServerError",
6726
+ internalServerError: InternalServerError.decode(reader, reader.uint32()),
6727
+ };
6728
+ continue;
6729
+ }
6730
+ if ((tag & 7) === 4 || tag === 0) {
6731
+ break;
6732
+ }
6733
+ reader.skipType(tag & 7);
6734
+ }
6735
+ return message;
6736
+ }
6737
+ JoinCommunityVoiceChatResponse.decode = decode;
6738
+ function fromJSON(object) {
6739
+ return {
6740
+ response: isSet(object.ok)
6741
+ ? { $case: "ok", ok: JoinCommunityVoiceChatResponse_Ok.fromJSON(object.ok) }
6742
+ : isSet(object.invalidRequest)
6743
+ ? { $case: "invalidRequest", invalidRequest: InvalidRequest.fromJSON(object.invalidRequest) }
6744
+ : isSet(object.forbiddenError)
6745
+ ? { $case: "forbiddenError", forbiddenError: ForbiddenError.fromJSON(object.forbiddenError) }
6746
+ : isSet(object.notFoundError)
6747
+ ? { $case: "notFoundError", notFoundError: NotFoundError.fromJSON(object.notFoundError) }
6748
+ : isSet(object.conflictingError)
6749
+ ? { $case: "conflictingError", conflictingError: ConflictingError.fromJSON(object.conflictingError) }
6750
+ : isSet(object.internalServerError)
6751
+ ? {
6752
+ $case: "internalServerError",
6753
+ internalServerError: InternalServerError.fromJSON(object.internalServerError),
6754
+ }
6755
+ : undefined,
6756
+ };
6757
+ }
6758
+ JoinCommunityVoiceChatResponse.fromJSON = fromJSON;
6759
+ function toJSON(message) {
6760
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
6761
+ const obj = {};
6762
+ ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) === "ok" &&
6763
+ (obj.ok = ((_b = message.response) === null || _b === void 0 ? void 0 : _b.ok) ? JoinCommunityVoiceChatResponse_Ok.toJSON((_c = message.response) === null || _c === void 0 ? void 0 : _c.ok) : undefined);
6764
+ ((_d = message.response) === null || _d === void 0 ? void 0 : _d.$case) === "invalidRequest" &&
6765
+ (obj.invalidRequest = ((_e = message.response) === null || _e === void 0 ? void 0 : _e.invalidRequest)
6766
+ ? InvalidRequest.toJSON((_f = message.response) === null || _f === void 0 ? void 0 : _f.invalidRequest)
6767
+ : undefined);
6768
+ ((_g = message.response) === null || _g === void 0 ? void 0 : _g.$case) === "forbiddenError" &&
6769
+ (obj.forbiddenError = ((_h = message.response) === null || _h === void 0 ? void 0 : _h.forbiddenError)
6770
+ ? ForbiddenError.toJSON((_j = message.response) === null || _j === void 0 ? void 0 : _j.forbiddenError)
6771
+ : undefined);
6772
+ ((_k = message.response) === null || _k === void 0 ? void 0 : _k.$case) === "notFoundError" &&
6773
+ (obj.notFoundError = ((_l = message.response) === null || _l === void 0 ? void 0 : _l.notFoundError)
6774
+ ? NotFoundError.toJSON((_m = message.response) === null || _m === void 0 ? void 0 : _m.notFoundError)
6775
+ : undefined);
6776
+ ((_o = message.response) === null || _o === void 0 ? void 0 : _o.$case) === "conflictingError" &&
6777
+ (obj.conflictingError = ((_p = message.response) === null || _p === void 0 ? void 0 : _p.conflictingError)
6778
+ ? ConflictingError.toJSON((_q = message.response) === null || _q === void 0 ? void 0 : _q.conflictingError)
6779
+ : undefined);
6780
+ ((_r = message.response) === null || _r === void 0 ? void 0 : _r.$case) === "internalServerError" &&
6781
+ (obj.internalServerError = ((_s = message.response) === null || _s === void 0 ? void 0 : _s.internalServerError)
6782
+ ? InternalServerError.toJSON((_t = message.response) === null || _t === void 0 ? void 0 : _t.internalServerError)
6783
+ : undefined);
6784
+ return obj;
6785
+ }
6786
+ JoinCommunityVoiceChatResponse.toJSON = toJSON;
6787
+ function create(base) {
6788
+ return JoinCommunityVoiceChatResponse.fromPartial(base !== null && base !== void 0 ? base : {});
6789
+ }
6790
+ JoinCommunityVoiceChatResponse.create = create;
6791
+ function fromPartial(object) {
6792
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
6793
+ const message = createBaseJoinCommunityVoiceChatResponse();
6794
+ if (((_a = object.response) === null || _a === void 0 ? void 0 : _a.$case) === "ok" && ((_b = object.response) === null || _b === void 0 ? void 0 : _b.ok) !== undefined && ((_c = object.response) === null || _c === void 0 ? void 0 : _c.ok) !== null) {
6795
+ message.response = { $case: "ok", ok: JoinCommunityVoiceChatResponse_Ok.fromPartial(object.response.ok) };
6796
+ }
6797
+ if (((_d = object.response) === null || _d === void 0 ? void 0 : _d.$case) === "invalidRequest" &&
6798
+ ((_e = object.response) === null || _e === void 0 ? void 0 : _e.invalidRequest) !== undefined &&
6799
+ ((_f = object.response) === null || _f === void 0 ? void 0 : _f.invalidRequest) !== null) {
6800
+ message.response = {
6801
+ $case: "invalidRequest",
6802
+ invalidRequest: InvalidRequest.fromPartial(object.response.invalidRequest),
6803
+ };
6804
+ }
6805
+ if (((_g = object.response) === null || _g === void 0 ? void 0 : _g.$case) === "forbiddenError" &&
6806
+ ((_h = object.response) === null || _h === void 0 ? void 0 : _h.forbiddenError) !== undefined &&
6807
+ ((_j = object.response) === null || _j === void 0 ? void 0 : _j.forbiddenError) !== null) {
6808
+ message.response = {
6809
+ $case: "forbiddenError",
6810
+ forbiddenError: ForbiddenError.fromPartial(object.response.forbiddenError),
6811
+ };
6812
+ }
6813
+ if (((_k = object.response) === null || _k === void 0 ? void 0 : _k.$case) === "notFoundError" &&
6814
+ ((_l = object.response) === null || _l === void 0 ? void 0 : _l.notFoundError) !== undefined &&
6815
+ ((_m = object.response) === null || _m === void 0 ? void 0 : _m.notFoundError) !== null) {
6816
+ message.response = {
6817
+ $case: "notFoundError",
6818
+ notFoundError: NotFoundError.fromPartial(object.response.notFoundError),
6819
+ };
6820
+ }
6821
+ if (((_o = object.response) === null || _o === void 0 ? void 0 : _o.$case) === "conflictingError" &&
6822
+ ((_p = object.response) === null || _p === void 0 ? void 0 : _p.conflictingError) !== undefined &&
6823
+ ((_q = object.response) === null || _q === void 0 ? void 0 : _q.conflictingError) !== null) {
6824
+ message.response = {
6825
+ $case: "conflictingError",
6826
+ conflictingError: ConflictingError.fromPartial(object.response.conflictingError),
6827
+ };
6828
+ }
6829
+ if (((_r = object.response) === null || _r === void 0 ? void 0 : _r.$case) === "internalServerError" &&
6830
+ ((_s = object.response) === null || _s === void 0 ? void 0 : _s.internalServerError) !== undefined &&
6831
+ ((_t = object.response) === null || _t === void 0 ? void 0 : _t.internalServerError) !== null) {
6832
+ message.response = {
6833
+ $case: "internalServerError",
6834
+ internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
6835
+ };
6836
+ }
6837
+ return message;
6838
+ }
6839
+ JoinCommunityVoiceChatResponse.fromPartial = fromPartial;
6840
+ })(JoinCommunityVoiceChatResponse || (exports.JoinCommunityVoiceChatResponse = JoinCommunityVoiceChatResponse = {}));
6841
+ function createBaseJoinCommunityVoiceChatResponse_Ok() {
6842
+ return { voiceChatId: "", credentials: undefined };
6843
+ }
6844
+ var JoinCommunityVoiceChatResponse_Ok;
6845
+ (function (JoinCommunityVoiceChatResponse_Ok) {
6846
+ function encode(message, writer = minimal_1.default.Writer.create()) {
6847
+ if (message.voiceChatId !== "") {
6848
+ writer.uint32(10).string(message.voiceChatId);
6849
+ }
6850
+ if (message.credentials !== undefined) {
6851
+ CommunityVoiceChatCredentials.encode(message.credentials, writer.uint32(18).fork()).ldelim();
6852
+ }
6853
+ return writer;
6854
+ }
6855
+ JoinCommunityVoiceChatResponse_Ok.encode = encode;
6856
+ function decode(input, length) {
6857
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
6858
+ let end = length === undefined ? reader.len : reader.pos + length;
6859
+ const message = createBaseJoinCommunityVoiceChatResponse_Ok();
6860
+ while (reader.pos < end) {
6861
+ const tag = reader.uint32();
6862
+ switch (tag >>> 3) {
6863
+ case 1:
6864
+ if (tag !== 10) {
6865
+ break;
6866
+ }
6867
+ message.voiceChatId = reader.string();
6868
+ continue;
6869
+ case 2:
6870
+ if (tag !== 18) {
6871
+ break;
6872
+ }
6873
+ message.credentials = CommunityVoiceChatCredentials.decode(reader, reader.uint32());
6874
+ continue;
6875
+ }
6876
+ if ((tag & 7) === 4 || tag === 0) {
6877
+ break;
6878
+ }
6879
+ reader.skipType(tag & 7);
6880
+ }
6881
+ return message;
6882
+ }
6883
+ JoinCommunityVoiceChatResponse_Ok.decode = decode;
6884
+ function fromJSON(object) {
6885
+ return {
6886
+ voiceChatId: isSet(object.voiceChatId) ? String(object.voiceChatId) : "",
6887
+ credentials: isSet(object.credentials) ? CommunityVoiceChatCredentials.fromJSON(object.credentials) : undefined,
6888
+ };
6889
+ }
6890
+ JoinCommunityVoiceChatResponse_Ok.fromJSON = fromJSON;
6891
+ function toJSON(message) {
6892
+ const obj = {};
6893
+ message.voiceChatId !== undefined && (obj.voiceChatId = message.voiceChatId);
6894
+ message.credentials !== undefined &&
6895
+ (obj.credentials = message.credentials ? CommunityVoiceChatCredentials.toJSON(message.credentials) : undefined);
6896
+ return obj;
6897
+ }
6898
+ JoinCommunityVoiceChatResponse_Ok.toJSON = toJSON;
6899
+ function create(base) {
6900
+ return JoinCommunityVoiceChatResponse_Ok.fromPartial(base !== null && base !== void 0 ? base : {});
6901
+ }
6902
+ JoinCommunityVoiceChatResponse_Ok.create = create;
6903
+ function fromPartial(object) {
6904
+ var _a;
6905
+ const message = createBaseJoinCommunityVoiceChatResponse_Ok();
6906
+ message.voiceChatId = (_a = object.voiceChatId) !== null && _a !== void 0 ? _a : "";
6907
+ message.credentials = (object.credentials !== undefined && object.credentials !== null)
6908
+ ? CommunityVoiceChatCredentials.fromPartial(object.credentials)
6909
+ : undefined;
6910
+ return message;
6911
+ }
6912
+ JoinCommunityVoiceChatResponse_Ok.fromPartial = fromPartial;
6913
+ })(JoinCommunityVoiceChatResponse_Ok || (exports.JoinCommunityVoiceChatResponse_Ok = JoinCommunityVoiceChatResponse_Ok = {}));
6914
+ function createBaseRequestToSpeakInCommunityVoiceChatPayload() {
6915
+ return { communityId: "" };
6916
+ }
6917
+ var RequestToSpeakInCommunityVoiceChatPayload;
6918
+ (function (RequestToSpeakInCommunityVoiceChatPayload) {
6919
+ function encode(message, writer = minimal_1.default.Writer.create()) {
6920
+ if (message.communityId !== "") {
6921
+ writer.uint32(10).string(message.communityId);
6922
+ }
6923
+ return writer;
6924
+ }
6925
+ RequestToSpeakInCommunityVoiceChatPayload.encode = encode;
6926
+ function decode(input, length) {
6927
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
6928
+ let end = length === undefined ? reader.len : reader.pos + length;
6929
+ const message = createBaseRequestToSpeakInCommunityVoiceChatPayload();
6930
+ while (reader.pos < end) {
6931
+ const tag = reader.uint32();
6932
+ switch (tag >>> 3) {
6933
+ case 1:
6934
+ if (tag !== 10) {
6935
+ break;
6936
+ }
6937
+ message.communityId = reader.string();
6938
+ continue;
6939
+ }
6940
+ if ((tag & 7) === 4 || tag === 0) {
6941
+ break;
6942
+ }
6943
+ reader.skipType(tag & 7);
6944
+ }
6945
+ return message;
6946
+ }
6947
+ RequestToSpeakInCommunityVoiceChatPayload.decode = decode;
6948
+ function fromJSON(object) {
6949
+ return { communityId: isSet(object.communityId) ? String(object.communityId) : "" };
6950
+ }
6951
+ RequestToSpeakInCommunityVoiceChatPayload.fromJSON = fromJSON;
6952
+ function toJSON(message) {
6953
+ const obj = {};
6954
+ message.communityId !== undefined && (obj.communityId = message.communityId);
6955
+ return obj;
6956
+ }
6957
+ RequestToSpeakInCommunityVoiceChatPayload.toJSON = toJSON;
6958
+ function create(base) {
6959
+ return RequestToSpeakInCommunityVoiceChatPayload.fromPartial(base !== null && base !== void 0 ? base : {});
6960
+ }
6961
+ RequestToSpeakInCommunityVoiceChatPayload.create = create;
6962
+ function fromPartial(object) {
6963
+ var _a;
6964
+ const message = createBaseRequestToSpeakInCommunityVoiceChatPayload();
6965
+ message.communityId = (_a = object.communityId) !== null && _a !== void 0 ? _a : "";
6966
+ return message;
6967
+ }
6968
+ RequestToSpeakInCommunityVoiceChatPayload.fromPartial = fromPartial;
6969
+ })(RequestToSpeakInCommunityVoiceChatPayload || (exports.RequestToSpeakInCommunityVoiceChatPayload = RequestToSpeakInCommunityVoiceChatPayload = {}));
6970
+ function createBaseRequestToSpeakInCommunityVoiceChatResponse() {
6971
+ return { response: undefined };
6972
+ }
6973
+ var RequestToSpeakInCommunityVoiceChatResponse;
6974
+ (function (RequestToSpeakInCommunityVoiceChatResponse) {
6975
+ function encode(message, writer = minimal_1.default.Writer.create()) {
6976
+ var _a;
6977
+ switch ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) {
6978
+ case "ok":
6979
+ RequestToSpeakInCommunityVoiceChatResponse_Ok.encode(message.response.ok, writer.uint32(10).fork()).ldelim();
6980
+ break;
6981
+ case "invalidRequest":
6982
+ InvalidRequest.encode(message.response.invalidRequest, writer.uint32(18).fork()).ldelim();
6983
+ break;
6984
+ case "forbiddenError":
6985
+ ForbiddenError.encode(message.response.forbiddenError, writer.uint32(26).fork()).ldelim();
6986
+ break;
6987
+ case "notFoundError":
6988
+ NotFoundError.encode(message.response.notFoundError, writer.uint32(34).fork()).ldelim();
6989
+ break;
6990
+ case "internalServerError":
6991
+ InternalServerError.encode(message.response.internalServerError, writer.uint32(42).fork()).ldelim();
6992
+ break;
6993
+ }
6994
+ return writer;
6995
+ }
6996
+ RequestToSpeakInCommunityVoiceChatResponse.encode = encode;
6997
+ function decode(input, length) {
6998
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
6999
+ let end = length === undefined ? reader.len : reader.pos + length;
7000
+ const message = createBaseRequestToSpeakInCommunityVoiceChatResponse();
7001
+ while (reader.pos < end) {
7002
+ const tag = reader.uint32();
7003
+ switch (tag >>> 3) {
7004
+ case 1:
7005
+ if (tag !== 10) {
7006
+ break;
7007
+ }
7008
+ message.response = {
7009
+ $case: "ok",
7010
+ ok: RequestToSpeakInCommunityVoiceChatResponse_Ok.decode(reader, reader.uint32()),
7011
+ };
7012
+ continue;
7013
+ case 2:
7014
+ if (tag !== 18) {
7015
+ break;
7016
+ }
7017
+ message.response = {
7018
+ $case: "invalidRequest",
7019
+ invalidRequest: InvalidRequest.decode(reader, reader.uint32()),
7020
+ };
7021
+ continue;
7022
+ case 3:
7023
+ if (tag !== 26) {
7024
+ break;
7025
+ }
7026
+ message.response = {
7027
+ $case: "forbiddenError",
7028
+ forbiddenError: ForbiddenError.decode(reader, reader.uint32()),
7029
+ };
7030
+ continue;
7031
+ case 4:
7032
+ if (tag !== 34) {
7033
+ break;
7034
+ }
7035
+ message.response = { $case: "notFoundError", notFoundError: NotFoundError.decode(reader, reader.uint32()) };
7036
+ continue;
7037
+ case 5:
7038
+ if (tag !== 42) {
7039
+ break;
7040
+ }
7041
+ message.response = {
7042
+ $case: "internalServerError",
7043
+ internalServerError: InternalServerError.decode(reader, reader.uint32()),
7044
+ };
7045
+ continue;
7046
+ }
7047
+ if ((tag & 7) === 4 || tag === 0) {
7048
+ break;
7049
+ }
7050
+ reader.skipType(tag & 7);
7051
+ }
7052
+ return message;
7053
+ }
7054
+ RequestToSpeakInCommunityVoiceChatResponse.decode = decode;
7055
+ function fromJSON(object) {
7056
+ return {
7057
+ response: isSet(object.ok)
7058
+ ? { $case: "ok", ok: RequestToSpeakInCommunityVoiceChatResponse_Ok.fromJSON(object.ok) }
7059
+ : isSet(object.invalidRequest)
7060
+ ? { $case: "invalidRequest", invalidRequest: InvalidRequest.fromJSON(object.invalidRequest) }
7061
+ : isSet(object.forbiddenError)
7062
+ ? { $case: "forbiddenError", forbiddenError: ForbiddenError.fromJSON(object.forbiddenError) }
7063
+ : isSet(object.notFoundError)
7064
+ ? { $case: "notFoundError", notFoundError: NotFoundError.fromJSON(object.notFoundError) }
7065
+ : isSet(object.internalServerError)
7066
+ ? {
7067
+ $case: "internalServerError",
7068
+ internalServerError: InternalServerError.fromJSON(object.internalServerError),
7069
+ }
7070
+ : undefined,
7071
+ };
7072
+ }
7073
+ RequestToSpeakInCommunityVoiceChatResponse.fromJSON = fromJSON;
7074
+ function toJSON(message) {
7075
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
7076
+ const obj = {};
7077
+ ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) === "ok" &&
7078
+ (obj.ok = ((_b = message.response) === null || _b === void 0 ? void 0 : _b.ok)
7079
+ ? RequestToSpeakInCommunityVoiceChatResponse_Ok.toJSON((_c = message.response) === null || _c === void 0 ? void 0 : _c.ok)
7080
+ : undefined);
7081
+ ((_d = message.response) === null || _d === void 0 ? void 0 : _d.$case) === "invalidRequest" &&
7082
+ (obj.invalidRequest = ((_e = message.response) === null || _e === void 0 ? void 0 : _e.invalidRequest)
7083
+ ? InvalidRequest.toJSON((_f = message.response) === null || _f === void 0 ? void 0 : _f.invalidRequest)
7084
+ : undefined);
7085
+ ((_g = message.response) === null || _g === void 0 ? void 0 : _g.$case) === "forbiddenError" &&
7086
+ (obj.forbiddenError = ((_h = message.response) === null || _h === void 0 ? void 0 : _h.forbiddenError)
7087
+ ? ForbiddenError.toJSON((_j = message.response) === null || _j === void 0 ? void 0 : _j.forbiddenError)
7088
+ : undefined);
7089
+ ((_k = message.response) === null || _k === void 0 ? void 0 : _k.$case) === "notFoundError" &&
7090
+ (obj.notFoundError = ((_l = message.response) === null || _l === void 0 ? void 0 : _l.notFoundError)
7091
+ ? NotFoundError.toJSON((_m = message.response) === null || _m === void 0 ? void 0 : _m.notFoundError)
7092
+ : undefined);
7093
+ ((_o = message.response) === null || _o === void 0 ? void 0 : _o.$case) === "internalServerError" &&
7094
+ (obj.internalServerError = ((_p = message.response) === null || _p === void 0 ? void 0 : _p.internalServerError)
7095
+ ? InternalServerError.toJSON((_q = message.response) === null || _q === void 0 ? void 0 : _q.internalServerError)
7096
+ : undefined);
7097
+ return obj;
7098
+ }
7099
+ RequestToSpeakInCommunityVoiceChatResponse.toJSON = toJSON;
7100
+ function create(base) {
7101
+ return RequestToSpeakInCommunityVoiceChatResponse.fromPartial(base !== null && base !== void 0 ? base : {});
7102
+ }
7103
+ RequestToSpeakInCommunityVoiceChatResponse.create = create;
7104
+ function fromPartial(object) {
7105
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
7106
+ const message = createBaseRequestToSpeakInCommunityVoiceChatResponse();
7107
+ if (((_a = object.response) === null || _a === void 0 ? void 0 : _a.$case) === "ok" && ((_b = object.response) === null || _b === void 0 ? void 0 : _b.ok) !== undefined && ((_c = object.response) === null || _c === void 0 ? void 0 : _c.ok) !== null) {
7108
+ message.response = {
7109
+ $case: "ok",
7110
+ ok: RequestToSpeakInCommunityVoiceChatResponse_Ok.fromPartial(object.response.ok),
7111
+ };
7112
+ }
7113
+ if (((_d = object.response) === null || _d === void 0 ? void 0 : _d.$case) === "invalidRequest" &&
7114
+ ((_e = object.response) === null || _e === void 0 ? void 0 : _e.invalidRequest) !== undefined &&
7115
+ ((_f = object.response) === null || _f === void 0 ? void 0 : _f.invalidRequest) !== null) {
7116
+ message.response = {
7117
+ $case: "invalidRequest",
7118
+ invalidRequest: InvalidRequest.fromPartial(object.response.invalidRequest),
7119
+ };
7120
+ }
7121
+ if (((_g = object.response) === null || _g === void 0 ? void 0 : _g.$case) === "forbiddenError" &&
7122
+ ((_h = object.response) === null || _h === void 0 ? void 0 : _h.forbiddenError) !== undefined &&
7123
+ ((_j = object.response) === null || _j === void 0 ? void 0 : _j.forbiddenError) !== null) {
7124
+ message.response = {
7125
+ $case: "forbiddenError",
7126
+ forbiddenError: ForbiddenError.fromPartial(object.response.forbiddenError),
7127
+ };
7128
+ }
7129
+ if (((_k = object.response) === null || _k === void 0 ? void 0 : _k.$case) === "notFoundError" &&
7130
+ ((_l = object.response) === null || _l === void 0 ? void 0 : _l.notFoundError) !== undefined &&
7131
+ ((_m = object.response) === null || _m === void 0 ? void 0 : _m.notFoundError) !== null) {
7132
+ message.response = {
7133
+ $case: "notFoundError",
7134
+ notFoundError: NotFoundError.fromPartial(object.response.notFoundError),
7135
+ };
7136
+ }
7137
+ if (((_o = object.response) === null || _o === void 0 ? void 0 : _o.$case) === "internalServerError" &&
7138
+ ((_p = object.response) === null || _p === void 0 ? void 0 : _p.internalServerError) !== undefined &&
7139
+ ((_q = object.response) === null || _q === void 0 ? void 0 : _q.internalServerError) !== null) {
7140
+ message.response = {
7141
+ $case: "internalServerError",
7142
+ internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
7143
+ };
7144
+ }
7145
+ return message;
7146
+ }
7147
+ RequestToSpeakInCommunityVoiceChatResponse.fromPartial = fromPartial;
7148
+ })(RequestToSpeakInCommunityVoiceChatResponse || (exports.RequestToSpeakInCommunityVoiceChatResponse = RequestToSpeakInCommunityVoiceChatResponse = {}));
7149
+ function createBaseRequestToSpeakInCommunityVoiceChatResponse_Ok() {
7150
+ return { message: "" };
7151
+ }
7152
+ var RequestToSpeakInCommunityVoiceChatResponse_Ok;
7153
+ (function (RequestToSpeakInCommunityVoiceChatResponse_Ok) {
7154
+ function encode(message, writer = minimal_1.default.Writer.create()) {
7155
+ if (message.message !== "") {
7156
+ writer.uint32(10).string(message.message);
7157
+ }
7158
+ return writer;
7159
+ }
7160
+ RequestToSpeakInCommunityVoiceChatResponse_Ok.encode = encode;
7161
+ function decode(input, length) {
7162
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
7163
+ let end = length === undefined ? reader.len : reader.pos + length;
7164
+ const message = createBaseRequestToSpeakInCommunityVoiceChatResponse_Ok();
7165
+ while (reader.pos < end) {
7166
+ const tag = reader.uint32();
7167
+ switch (tag >>> 3) {
7168
+ case 1:
7169
+ if (tag !== 10) {
7170
+ break;
7171
+ }
7172
+ message.message = reader.string();
7173
+ continue;
7174
+ }
7175
+ if ((tag & 7) === 4 || tag === 0) {
7176
+ break;
7177
+ }
7178
+ reader.skipType(tag & 7);
7179
+ }
7180
+ return message;
7181
+ }
7182
+ RequestToSpeakInCommunityVoiceChatResponse_Ok.decode = decode;
7183
+ function fromJSON(object) {
7184
+ return { message: isSet(object.message) ? String(object.message) : "" };
7185
+ }
7186
+ RequestToSpeakInCommunityVoiceChatResponse_Ok.fromJSON = fromJSON;
7187
+ function toJSON(message) {
7188
+ const obj = {};
7189
+ message.message !== undefined && (obj.message = message.message);
7190
+ return obj;
7191
+ }
7192
+ RequestToSpeakInCommunityVoiceChatResponse_Ok.toJSON = toJSON;
7193
+ function create(base) {
7194
+ return RequestToSpeakInCommunityVoiceChatResponse_Ok.fromPartial(base !== null && base !== void 0 ? base : {});
7195
+ }
7196
+ RequestToSpeakInCommunityVoiceChatResponse_Ok.create = create;
7197
+ function fromPartial(object) {
7198
+ var _a;
7199
+ const message = createBaseRequestToSpeakInCommunityVoiceChatResponse_Ok();
7200
+ message.message = (_a = object.message) !== null && _a !== void 0 ? _a : "";
7201
+ return message;
7202
+ }
7203
+ RequestToSpeakInCommunityVoiceChatResponse_Ok.fromPartial = fromPartial;
7204
+ })(RequestToSpeakInCommunityVoiceChatResponse_Ok || (exports.RequestToSpeakInCommunityVoiceChatResponse_Ok = RequestToSpeakInCommunityVoiceChatResponse_Ok = {}));
7205
+ function createBasePromoteSpeakerInCommunityVoiceChatPayload() {
7206
+ return { communityId: "", userAddress: "" };
7207
+ }
7208
+ var PromoteSpeakerInCommunityVoiceChatPayload;
7209
+ (function (PromoteSpeakerInCommunityVoiceChatPayload) {
7210
+ function encode(message, writer = minimal_1.default.Writer.create()) {
7211
+ if (message.communityId !== "") {
7212
+ writer.uint32(10).string(message.communityId);
7213
+ }
7214
+ if (message.userAddress !== "") {
7215
+ writer.uint32(18).string(message.userAddress);
7216
+ }
7217
+ return writer;
7218
+ }
7219
+ PromoteSpeakerInCommunityVoiceChatPayload.encode = encode;
7220
+ function decode(input, length) {
7221
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
7222
+ let end = length === undefined ? reader.len : reader.pos + length;
7223
+ const message = createBasePromoteSpeakerInCommunityVoiceChatPayload();
7224
+ while (reader.pos < end) {
7225
+ const tag = reader.uint32();
7226
+ switch (tag >>> 3) {
7227
+ case 1:
7228
+ if (tag !== 10) {
7229
+ break;
7230
+ }
7231
+ message.communityId = reader.string();
7232
+ continue;
7233
+ case 2:
7234
+ if (tag !== 18) {
7235
+ break;
7236
+ }
7237
+ message.userAddress = reader.string();
7238
+ continue;
7239
+ }
7240
+ if ((tag & 7) === 4 || tag === 0) {
7241
+ break;
7242
+ }
7243
+ reader.skipType(tag & 7);
7244
+ }
7245
+ return message;
7246
+ }
7247
+ PromoteSpeakerInCommunityVoiceChatPayload.decode = decode;
7248
+ function fromJSON(object) {
7249
+ return {
7250
+ communityId: isSet(object.communityId) ? String(object.communityId) : "",
7251
+ userAddress: isSet(object.userAddress) ? String(object.userAddress) : "",
7252
+ };
7253
+ }
7254
+ PromoteSpeakerInCommunityVoiceChatPayload.fromJSON = fromJSON;
7255
+ function toJSON(message) {
7256
+ const obj = {};
7257
+ message.communityId !== undefined && (obj.communityId = message.communityId);
7258
+ message.userAddress !== undefined && (obj.userAddress = message.userAddress);
7259
+ return obj;
7260
+ }
7261
+ PromoteSpeakerInCommunityVoiceChatPayload.toJSON = toJSON;
7262
+ function create(base) {
7263
+ return PromoteSpeakerInCommunityVoiceChatPayload.fromPartial(base !== null && base !== void 0 ? base : {});
7264
+ }
7265
+ PromoteSpeakerInCommunityVoiceChatPayload.create = create;
7266
+ function fromPartial(object) {
7267
+ var _a, _b;
7268
+ const message = createBasePromoteSpeakerInCommunityVoiceChatPayload();
7269
+ message.communityId = (_a = object.communityId) !== null && _a !== void 0 ? _a : "";
7270
+ message.userAddress = (_b = object.userAddress) !== null && _b !== void 0 ? _b : "";
7271
+ return message;
7272
+ }
7273
+ PromoteSpeakerInCommunityVoiceChatPayload.fromPartial = fromPartial;
7274
+ })(PromoteSpeakerInCommunityVoiceChatPayload || (exports.PromoteSpeakerInCommunityVoiceChatPayload = PromoteSpeakerInCommunityVoiceChatPayload = {}));
7275
+ function createBasePromoteSpeakerInCommunityVoiceChatResponse() {
7276
+ return { response: undefined };
7277
+ }
7278
+ var PromoteSpeakerInCommunityVoiceChatResponse;
7279
+ (function (PromoteSpeakerInCommunityVoiceChatResponse) {
7280
+ function encode(message, writer = minimal_1.default.Writer.create()) {
7281
+ var _a;
7282
+ switch ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) {
7283
+ case "ok":
7284
+ PromoteSpeakerInCommunityVoiceChatResponse_Ok.encode(message.response.ok, writer.uint32(10).fork()).ldelim();
7285
+ break;
7286
+ case "invalidRequest":
7287
+ InvalidRequest.encode(message.response.invalidRequest, writer.uint32(18).fork()).ldelim();
7288
+ break;
7289
+ case "forbiddenError":
7290
+ ForbiddenError.encode(message.response.forbiddenError, writer.uint32(26).fork()).ldelim();
7291
+ break;
7292
+ case "notFoundError":
7293
+ NotFoundError.encode(message.response.notFoundError, writer.uint32(34).fork()).ldelim();
7294
+ break;
7295
+ case "internalServerError":
7296
+ InternalServerError.encode(message.response.internalServerError, writer.uint32(42).fork()).ldelim();
7297
+ break;
7298
+ }
7299
+ return writer;
7300
+ }
7301
+ PromoteSpeakerInCommunityVoiceChatResponse.encode = encode;
7302
+ function decode(input, length) {
7303
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
7304
+ let end = length === undefined ? reader.len : reader.pos + length;
7305
+ const message = createBasePromoteSpeakerInCommunityVoiceChatResponse();
7306
+ while (reader.pos < end) {
7307
+ const tag = reader.uint32();
7308
+ switch (tag >>> 3) {
7309
+ case 1:
7310
+ if (tag !== 10) {
7311
+ break;
7312
+ }
7313
+ message.response = {
7314
+ $case: "ok",
7315
+ ok: PromoteSpeakerInCommunityVoiceChatResponse_Ok.decode(reader, reader.uint32()),
7316
+ };
7317
+ continue;
7318
+ case 2:
7319
+ if (tag !== 18) {
7320
+ break;
7321
+ }
7322
+ message.response = {
7323
+ $case: "invalidRequest",
7324
+ invalidRequest: InvalidRequest.decode(reader, reader.uint32()),
7325
+ };
7326
+ continue;
7327
+ case 3:
7328
+ if (tag !== 26) {
7329
+ break;
7330
+ }
7331
+ message.response = {
7332
+ $case: "forbiddenError",
7333
+ forbiddenError: ForbiddenError.decode(reader, reader.uint32()),
7334
+ };
7335
+ continue;
7336
+ case 4:
7337
+ if (tag !== 34) {
7338
+ break;
7339
+ }
7340
+ message.response = { $case: "notFoundError", notFoundError: NotFoundError.decode(reader, reader.uint32()) };
7341
+ continue;
7342
+ case 5:
7343
+ if (tag !== 42) {
7344
+ break;
7345
+ }
7346
+ message.response = {
7347
+ $case: "internalServerError",
7348
+ internalServerError: InternalServerError.decode(reader, reader.uint32()),
7349
+ };
7350
+ continue;
7351
+ }
7352
+ if ((tag & 7) === 4 || tag === 0) {
7353
+ break;
7354
+ }
7355
+ reader.skipType(tag & 7);
7356
+ }
7357
+ return message;
7358
+ }
7359
+ PromoteSpeakerInCommunityVoiceChatResponse.decode = decode;
7360
+ function fromJSON(object) {
7361
+ return {
7362
+ response: isSet(object.ok)
7363
+ ? { $case: "ok", ok: PromoteSpeakerInCommunityVoiceChatResponse_Ok.fromJSON(object.ok) }
7364
+ : isSet(object.invalidRequest)
7365
+ ? { $case: "invalidRequest", invalidRequest: InvalidRequest.fromJSON(object.invalidRequest) }
7366
+ : isSet(object.forbiddenError)
7367
+ ? { $case: "forbiddenError", forbiddenError: ForbiddenError.fromJSON(object.forbiddenError) }
7368
+ : isSet(object.notFoundError)
7369
+ ? { $case: "notFoundError", notFoundError: NotFoundError.fromJSON(object.notFoundError) }
7370
+ : isSet(object.internalServerError)
7371
+ ? {
7372
+ $case: "internalServerError",
7373
+ internalServerError: InternalServerError.fromJSON(object.internalServerError),
7374
+ }
7375
+ : undefined,
7376
+ };
7377
+ }
7378
+ PromoteSpeakerInCommunityVoiceChatResponse.fromJSON = fromJSON;
7379
+ function toJSON(message) {
7380
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
7381
+ const obj = {};
7382
+ ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) === "ok" &&
7383
+ (obj.ok = ((_b = message.response) === null || _b === void 0 ? void 0 : _b.ok)
7384
+ ? PromoteSpeakerInCommunityVoiceChatResponse_Ok.toJSON((_c = message.response) === null || _c === void 0 ? void 0 : _c.ok)
7385
+ : undefined);
7386
+ ((_d = message.response) === null || _d === void 0 ? void 0 : _d.$case) === "invalidRequest" &&
7387
+ (obj.invalidRequest = ((_e = message.response) === null || _e === void 0 ? void 0 : _e.invalidRequest)
7388
+ ? InvalidRequest.toJSON((_f = message.response) === null || _f === void 0 ? void 0 : _f.invalidRequest)
7389
+ : undefined);
7390
+ ((_g = message.response) === null || _g === void 0 ? void 0 : _g.$case) === "forbiddenError" &&
7391
+ (obj.forbiddenError = ((_h = message.response) === null || _h === void 0 ? void 0 : _h.forbiddenError)
7392
+ ? ForbiddenError.toJSON((_j = message.response) === null || _j === void 0 ? void 0 : _j.forbiddenError)
7393
+ : undefined);
7394
+ ((_k = message.response) === null || _k === void 0 ? void 0 : _k.$case) === "notFoundError" &&
7395
+ (obj.notFoundError = ((_l = message.response) === null || _l === void 0 ? void 0 : _l.notFoundError)
7396
+ ? NotFoundError.toJSON((_m = message.response) === null || _m === void 0 ? void 0 : _m.notFoundError)
7397
+ : undefined);
7398
+ ((_o = message.response) === null || _o === void 0 ? void 0 : _o.$case) === "internalServerError" &&
7399
+ (obj.internalServerError = ((_p = message.response) === null || _p === void 0 ? void 0 : _p.internalServerError)
7400
+ ? InternalServerError.toJSON((_q = message.response) === null || _q === void 0 ? void 0 : _q.internalServerError)
7401
+ : undefined);
7402
+ return obj;
7403
+ }
7404
+ PromoteSpeakerInCommunityVoiceChatResponse.toJSON = toJSON;
7405
+ function create(base) {
7406
+ return PromoteSpeakerInCommunityVoiceChatResponse.fromPartial(base !== null && base !== void 0 ? base : {});
7407
+ }
7408
+ PromoteSpeakerInCommunityVoiceChatResponse.create = create;
7409
+ function fromPartial(object) {
7410
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
7411
+ const message = createBasePromoteSpeakerInCommunityVoiceChatResponse();
7412
+ if (((_a = object.response) === null || _a === void 0 ? void 0 : _a.$case) === "ok" && ((_b = object.response) === null || _b === void 0 ? void 0 : _b.ok) !== undefined && ((_c = object.response) === null || _c === void 0 ? void 0 : _c.ok) !== null) {
7413
+ message.response = {
7414
+ $case: "ok",
7415
+ ok: PromoteSpeakerInCommunityVoiceChatResponse_Ok.fromPartial(object.response.ok),
7416
+ };
7417
+ }
7418
+ if (((_d = object.response) === null || _d === void 0 ? void 0 : _d.$case) === "invalidRequest" &&
7419
+ ((_e = object.response) === null || _e === void 0 ? void 0 : _e.invalidRequest) !== undefined &&
7420
+ ((_f = object.response) === null || _f === void 0 ? void 0 : _f.invalidRequest) !== null) {
7421
+ message.response = {
7422
+ $case: "invalidRequest",
7423
+ invalidRequest: InvalidRequest.fromPartial(object.response.invalidRequest),
7424
+ };
7425
+ }
7426
+ if (((_g = object.response) === null || _g === void 0 ? void 0 : _g.$case) === "forbiddenError" &&
7427
+ ((_h = object.response) === null || _h === void 0 ? void 0 : _h.forbiddenError) !== undefined &&
7428
+ ((_j = object.response) === null || _j === void 0 ? void 0 : _j.forbiddenError) !== null) {
7429
+ message.response = {
7430
+ $case: "forbiddenError",
7431
+ forbiddenError: ForbiddenError.fromPartial(object.response.forbiddenError),
7432
+ };
7433
+ }
7434
+ if (((_k = object.response) === null || _k === void 0 ? void 0 : _k.$case) === "notFoundError" &&
7435
+ ((_l = object.response) === null || _l === void 0 ? void 0 : _l.notFoundError) !== undefined &&
7436
+ ((_m = object.response) === null || _m === void 0 ? void 0 : _m.notFoundError) !== null) {
7437
+ message.response = {
7438
+ $case: "notFoundError",
7439
+ notFoundError: NotFoundError.fromPartial(object.response.notFoundError),
7440
+ };
7441
+ }
7442
+ if (((_o = object.response) === null || _o === void 0 ? void 0 : _o.$case) === "internalServerError" &&
7443
+ ((_p = object.response) === null || _p === void 0 ? void 0 : _p.internalServerError) !== undefined &&
7444
+ ((_q = object.response) === null || _q === void 0 ? void 0 : _q.internalServerError) !== null) {
7445
+ message.response = {
7446
+ $case: "internalServerError",
7447
+ internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
7448
+ };
7449
+ }
7450
+ return message;
7451
+ }
7452
+ PromoteSpeakerInCommunityVoiceChatResponse.fromPartial = fromPartial;
7453
+ })(PromoteSpeakerInCommunityVoiceChatResponse || (exports.PromoteSpeakerInCommunityVoiceChatResponse = PromoteSpeakerInCommunityVoiceChatResponse = {}));
7454
+ function createBasePromoteSpeakerInCommunityVoiceChatResponse_Ok() {
7455
+ return { message: "" };
7456
+ }
7457
+ var PromoteSpeakerInCommunityVoiceChatResponse_Ok;
7458
+ (function (PromoteSpeakerInCommunityVoiceChatResponse_Ok) {
7459
+ function encode(message, writer = minimal_1.default.Writer.create()) {
7460
+ if (message.message !== "") {
7461
+ writer.uint32(10).string(message.message);
7462
+ }
7463
+ return writer;
7464
+ }
7465
+ PromoteSpeakerInCommunityVoiceChatResponse_Ok.encode = encode;
7466
+ function decode(input, length) {
7467
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
7468
+ let end = length === undefined ? reader.len : reader.pos + length;
7469
+ const message = createBasePromoteSpeakerInCommunityVoiceChatResponse_Ok();
7470
+ while (reader.pos < end) {
7471
+ const tag = reader.uint32();
7472
+ switch (tag >>> 3) {
7473
+ case 1:
7474
+ if (tag !== 10) {
7475
+ break;
7476
+ }
7477
+ message.message = reader.string();
7478
+ continue;
7479
+ }
7480
+ if ((tag & 7) === 4 || tag === 0) {
7481
+ break;
7482
+ }
7483
+ reader.skipType(tag & 7);
7484
+ }
7485
+ return message;
7486
+ }
7487
+ PromoteSpeakerInCommunityVoiceChatResponse_Ok.decode = decode;
7488
+ function fromJSON(object) {
7489
+ return { message: isSet(object.message) ? String(object.message) : "" };
7490
+ }
7491
+ PromoteSpeakerInCommunityVoiceChatResponse_Ok.fromJSON = fromJSON;
7492
+ function toJSON(message) {
7493
+ const obj = {};
7494
+ message.message !== undefined && (obj.message = message.message);
7495
+ return obj;
7496
+ }
7497
+ PromoteSpeakerInCommunityVoiceChatResponse_Ok.toJSON = toJSON;
7498
+ function create(base) {
7499
+ return PromoteSpeakerInCommunityVoiceChatResponse_Ok.fromPartial(base !== null && base !== void 0 ? base : {});
7500
+ }
7501
+ PromoteSpeakerInCommunityVoiceChatResponse_Ok.create = create;
7502
+ function fromPartial(object) {
7503
+ var _a;
7504
+ const message = createBasePromoteSpeakerInCommunityVoiceChatResponse_Ok();
7505
+ message.message = (_a = object.message) !== null && _a !== void 0 ? _a : "";
7506
+ return message;
7507
+ }
7508
+ PromoteSpeakerInCommunityVoiceChatResponse_Ok.fromPartial = fromPartial;
7509
+ })(PromoteSpeakerInCommunityVoiceChatResponse_Ok || (exports.PromoteSpeakerInCommunityVoiceChatResponse_Ok = PromoteSpeakerInCommunityVoiceChatResponse_Ok = {}));
7510
+ function createBaseDemoteSpeakerInCommunityVoiceChatPayload() {
7511
+ return { communityId: "", userAddress: "" };
7512
+ }
7513
+ var DemoteSpeakerInCommunityVoiceChatPayload;
7514
+ (function (DemoteSpeakerInCommunityVoiceChatPayload) {
7515
+ function encode(message, writer = minimal_1.default.Writer.create()) {
7516
+ if (message.communityId !== "") {
7517
+ writer.uint32(10).string(message.communityId);
7518
+ }
7519
+ if (message.userAddress !== "") {
7520
+ writer.uint32(18).string(message.userAddress);
7521
+ }
7522
+ return writer;
7523
+ }
7524
+ DemoteSpeakerInCommunityVoiceChatPayload.encode = encode;
7525
+ function decode(input, length) {
7526
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
7527
+ let end = length === undefined ? reader.len : reader.pos + length;
7528
+ const message = createBaseDemoteSpeakerInCommunityVoiceChatPayload();
7529
+ while (reader.pos < end) {
7530
+ const tag = reader.uint32();
7531
+ switch (tag >>> 3) {
7532
+ case 1:
7533
+ if (tag !== 10) {
7534
+ break;
7535
+ }
7536
+ message.communityId = reader.string();
7537
+ continue;
7538
+ case 2:
7539
+ if (tag !== 18) {
7540
+ break;
7541
+ }
7542
+ message.userAddress = reader.string();
7543
+ continue;
7544
+ }
7545
+ if ((tag & 7) === 4 || tag === 0) {
7546
+ break;
7547
+ }
7548
+ reader.skipType(tag & 7);
7549
+ }
7550
+ return message;
7551
+ }
7552
+ DemoteSpeakerInCommunityVoiceChatPayload.decode = decode;
7553
+ function fromJSON(object) {
7554
+ return {
7555
+ communityId: isSet(object.communityId) ? String(object.communityId) : "",
7556
+ userAddress: isSet(object.userAddress) ? String(object.userAddress) : "",
7557
+ };
7558
+ }
7559
+ DemoteSpeakerInCommunityVoiceChatPayload.fromJSON = fromJSON;
7560
+ function toJSON(message) {
7561
+ const obj = {};
7562
+ message.communityId !== undefined && (obj.communityId = message.communityId);
7563
+ message.userAddress !== undefined && (obj.userAddress = message.userAddress);
7564
+ return obj;
7565
+ }
7566
+ DemoteSpeakerInCommunityVoiceChatPayload.toJSON = toJSON;
7567
+ function create(base) {
7568
+ return DemoteSpeakerInCommunityVoiceChatPayload.fromPartial(base !== null && base !== void 0 ? base : {});
7569
+ }
7570
+ DemoteSpeakerInCommunityVoiceChatPayload.create = create;
7571
+ function fromPartial(object) {
7572
+ var _a, _b;
7573
+ const message = createBaseDemoteSpeakerInCommunityVoiceChatPayload();
7574
+ message.communityId = (_a = object.communityId) !== null && _a !== void 0 ? _a : "";
7575
+ message.userAddress = (_b = object.userAddress) !== null && _b !== void 0 ? _b : "";
7576
+ return message;
7577
+ }
7578
+ DemoteSpeakerInCommunityVoiceChatPayload.fromPartial = fromPartial;
7579
+ })(DemoteSpeakerInCommunityVoiceChatPayload || (exports.DemoteSpeakerInCommunityVoiceChatPayload = DemoteSpeakerInCommunityVoiceChatPayload = {}));
7580
+ function createBaseDemoteSpeakerInCommunityVoiceChatResponse() {
7581
+ return { response: undefined };
7582
+ }
7583
+ var DemoteSpeakerInCommunityVoiceChatResponse;
7584
+ (function (DemoteSpeakerInCommunityVoiceChatResponse) {
7585
+ function encode(message, writer = minimal_1.default.Writer.create()) {
7586
+ var _a;
7587
+ switch ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) {
7588
+ case "ok":
7589
+ DemoteSpeakerInCommunityVoiceChatResponse_Ok.encode(message.response.ok, writer.uint32(10).fork()).ldelim();
7590
+ break;
7591
+ case "invalidRequest":
7592
+ InvalidRequest.encode(message.response.invalidRequest, writer.uint32(18).fork()).ldelim();
7593
+ break;
7594
+ case "forbiddenError":
7595
+ ForbiddenError.encode(message.response.forbiddenError, writer.uint32(26).fork()).ldelim();
7596
+ break;
7597
+ case "notFoundError":
7598
+ NotFoundError.encode(message.response.notFoundError, writer.uint32(34).fork()).ldelim();
7599
+ break;
7600
+ case "internalServerError":
7601
+ InternalServerError.encode(message.response.internalServerError, writer.uint32(42).fork()).ldelim();
7602
+ break;
7603
+ }
7604
+ return writer;
7605
+ }
7606
+ DemoteSpeakerInCommunityVoiceChatResponse.encode = encode;
7607
+ function decode(input, length) {
7608
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
7609
+ let end = length === undefined ? reader.len : reader.pos + length;
7610
+ const message = createBaseDemoteSpeakerInCommunityVoiceChatResponse();
7611
+ while (reader.pos < end) {
7612
+ const tag = reader.uint32();
7613
+ switch (tag >>> 3) {
7614
+ case 1:
7615
+ if (tag !== 10) {
7616
+ break;
7617
+ }
7618
+ message.response = {
7619
+ $case: "ok",
7620
+ ok: DemoteSpeakerInCommunityVoiceChatResponse_Ok.decode(reader, reader.uint32()),
7621
+ };
7622
+ continue;
7623
+ case 2:
7624
+ if (tag !== 18) {
7625
+ break;
7626
+ }
7627
+ message.response = {
7628
+ $case: "invalidRequest",
7629
+ invalidRequest: InvalidRequest.decode(reader, reader.uint32()),
7630
+ };
7631
+ continue;
7632
+ case 3:
7633
+ if (tag !== 26) {
7634
+ break;
7635
+ }
7636
+ message.response = {
7637
+ $case: "forbiddenError",
7638
+ forbiddenError: ForbiddenError.decode(reader, reader.uint32()),
7639
+ };
7640
+ continue;
7641
+ case 4:
7642
+ if (tag !== 34) {
7643
+ break;
7644
+ }
7645
+ message.response = { $case: "notFoundError", notFoundError: NotFoundError.decode(reader, reader.uint32()) };
7646
+ continue;
7647
+ case 5:
7648
+ if (tag !== 42) {
7649
+ break;
7650
+ }
7651
+ message.response = {
7652
+ $case: "internalServerError",
7653
+ internalServerError: InternalServerError.decode(reader, reader.uint32()),
7654
+ };
7655
+ continue;
7656
+ }
7657
+ if ((tag & 7) === 4 || tag === 0) {
7658
+ break;
7659
+ }
7660
+ reader.skipType(tag & 7);
7661
+ }
7662
+ return message;
7663
+ }
7664
+ DemoteSpeakerInCommunityVoiceChatResponse.decode = decode;
7665
+ function fromJSON(object) {
7666
+ return {
7667
+ response: isSet(object.ok)
7668
+ ? { $case: "ok", ok: DemoteSpeakerInCommunityVoiceChatResponse_Ok.fromJSON(object.ok) }
7669
+ : isSet(object.invalidRequest)
7670
+ ? { $case: "invalidRequest", invalidRequest: InvalidRequest.fromJSON(object.invalidRequest) }
7671
+ : isSet(object.forbiddenError)
7672
+ ? { $case: "forbiddenError", forbiddenError: ForbiddenError.fromJSON(object.forbiddenError) }
7673
+ : isSet(object.notFoundError)
7674
+ ? { $case: "notFoundError", notFoundError: NotFoundError.fromJSON(object.notFoundError) }
7675
+ : isSet(object.internalServerError)
7676
+ ? {
7677
+ $case: "internalServerError",
7678
+ internalServerError: InternalServerError.fromJSON(object.internalServerError),
7679
+ }
7680
+ : undefined,
7681
+ };
7682
+ }
7683
+ DemoteSpeakerInCommunityVoiceChatResponse.fromJSON = fromJSON;
7684
+ function toJSON(message) {
7685
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
7686
+ const obj = {};
7687
+ ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) === "ok" &&
7688
+ (obj.ok = ((_b = message.response) === null || _b === void 0 ? void 0 : _b.ok)
7689
+ ? DemoteSpeakerInCommunityVoiceChatResponse_Ok.toJSON((_c = message.response) === null || _c === void 0 ? void 0 : _c.ok)
7690
+ : undefined);
7691
+ ((_d = message.response) === null || _d === void 0 ? void 0 : _d.$case) === "invalidRequest" &&
7692
+ (obj.invalidRequest = ((_e = message.response) === null || _e === void 0 ? void 0 : _e.invalidRequest)
7693
+ ? InvalidRequest.toJSON((_f = message.response) === null || _f === void 0 ? void 0 : _f.invalidRequest)
7694
+ : undefined);
7695
+ ((_g = message.response) === null || _g === void 0 ? void 0 : _g.$case) === "forbiddenError" &&
7696
+ (obj.forbiddenError = ((_h = message.response) === null || _h === void 0 ? void 0 : _h.forbiddenError)
7697
+ ? ForbiddenError.toJSON((_j = message.response) === null || _j === void 0 ? void 0 : _j.forbiddenError)
7698
+ : undefined);
7699
+ ((_k = message.response) === null || _k === void 0 ? void 0 : _k.$case) === "notFoundError" &&
7700
+ (obj.notFoundError = ((_l = message.response) === null || _l === void 0 ? void 0 : _l.notFoundError)
7701
+ ? NotFoundError.toJSON((_m = message.response) === null || _m === void 0 ? void 0 : _m.notFoundError)
7702
+ : undefined);
7703
+ ((_o = message.response) === null || _o === void 0 ? void 0 : _o.$case) === "internalServerError" &&
7704
+ (obj.internalServerError = ((_p = message.response) === null || _p === void 0 ? void 0 : _p.internalServerError)
7705
+ ? InternalServerError.toJSON((_q = message.response) === null || _q === void 0 ? void 0 : _q.internalServerError)
7706
+ : undefined);
7707
+ return obj;
7708
+ }
7709
+ DemoteSpeakerInCommunityVoiceChatResponse.toJSON = toJSON;
7710
+ function create(base) {
7711
+ return DemoteSpeakerInCommunityVoiceChatResponse.fromPartial(base !== null && base !== void 0 ? base : {});
7712
+ }
7713
+ DemoteSpeakerInCommunityVoiceChatResponse.create = create;
7714
+ function fromPartial(object) {
7715
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
7716
+ const message = createBaseDemoteSpeakerInCommunityVoiceChatResponse();
7717
+ if (((_a = object.response) === null || _a === void 0 ? void 0 : _a.$case) === "ok" && ((_b = object.response) === null || _b === void 0 ? void 0 : _b.ok) !== undefined && ((_c = object.response) === null || _c === void 0 ? void 0 : _c.ok) !== null) {
7718
+ message.response = {
7719
+ $case: "ok",
7720
+ ok: DemoteSpeakerInCommunityVoiceChatResponse_Ok.fromPartial(object.response.ok),
7721
+ };
7722
+ }
7723
+ if (((_d = object.response) === null || _d === void 0 ? void 0 : _d.$case) === "invalidRequest" &&
7724
+ ((_e = object.response) === null || _e === void 0 ? void 0 : _e.invalidRequest) !== undefined &&
7725
+ ((_f = object.response) === null || _f === void 0 ? void 0 : _f.invalidRequest) !== null) {
7726
+ message.response = {
7727
+ $case: "invalidRequest",
7728
+ invalidRequest: InvalidRequest.fromPartial(object.response.invalidRequest),
7729
+ };
7730
+ }
7731
+ if (((_g = object.response) === null || _g === void 0 ? void 0 : _g.$case) === "forbiddenError" &&
7732
+ ((_h = object.response) === null || _h === void 0 ? void 0 : _h.forbiddenError) !== undefined &&
7733
+ ((_j = object.response) === null || _j === void 0 ? void 0 : _j.forbiddenError) !== null) {
7734
+ message.response = {
7735
+ $case: "forbiddenError",
7736
+ forbiddenError: ForbiddenError.fromPartial(object.response.forbiddenError),
7737
+ };
7738
+ }
7739
+ if (((_k = object.response) === null || _k === void 0 ? void 0 : _k.$case) === "notFoundError" &&
7740
+ ((_l = object.response) === null || _l === void 0 ? void 0 : _l.notFoundError) !== undefined &&
7741
+ ((_m = object.response) === null || _m === void 0 ? void 0 : _m.notFoundError) !== null) {
7742
+ message.response = {
7743
+ $case: "notFoundError",
7744
+ notFoundError: NotFoundError.fromPartial(object.response.notFoundError),
7745
+ };
7746
+ }
7747
+ if (((_o = object.response) === null || _o === void 0 ? void 0 : _o.$case) === "internalServerError" &&
7748
+ ((_p = object.response) === null || _p === void 0 ? void 0 : _p.internalServerError) !== undefined &&
7749
+ ((_q = object.response) === null || _q === void 0 ? void 0 : _q.internalServerError) !== null) {
7750
+ message.response = {
7751
+ $case: "internalServerError",
7752
+ internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
7753
+ };
7754
+ }
7755
+ return message;
7756
+ }
7757
+ DemoteSpeakerInCommunityVoiceChatResponse.fromPartial = fromPartial;
7758
+ })(DemoteSpeakerInCommunityVoiceChatResponse || (exports.DemoteSpeakerInCommunityVoiceChatResponse = DemoteSpeakerInCommunityVoiceChatResponse = {}));
7759
+ function createBaseDemoteSpeakerInCommunityVoiceChatResponse_Ok() {
7760
+ return { message: "" };
7761
+ }
7762
+ var DemoteSpeakerInCommunityVoiceChatResponse_Ok;
7763
+ (function (DemoteSpeakerInCommunityVoiceChatResponse_Ok) {
7764
+ function encode(message, writer = minimal_1.default.Writer.create()) {
7765
+ if (message.message !== "") {
7766
+ writer.uint32(10).string(message.message);
7767
+ }
7768
+ return writer;
7769
+ }
7770
+ DemoteSpeakerInCommunityVoiceChatResponse_Ok.encode = encode;
7771
+ function decode(input, length) {
7772
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
7773
+ let end = length === undefined ? reader.len : reader.pos + length;
7774
+ const message = createBaseDemoteSpeakerInCommunityVoiceChatResponse_Ok();
7775
+ while (reader.pos < end) {
7776
+ const tag = reader.uint32();
7777
+ switch (tag >>> 3) {
7778
+ case 1:
7779
+ if (tag !== 10) {
7780
+ break;
7781
+ }
7782
+ message.message = reader.string();
7783
+ continue;
7784
+ }
7785
+ if ((tag & 7) === 4 || tag === 0) {
7786
+ break;
7787
+ }
7788
+ reader.skipType(tag & 7);
7789
+ }
7790
+ return message;
7791
+ }
7792
+ DemoteSpeakerInCommunityVoiceChatResponse_Ok.decode = decode;
7793
+ function fromJSON(object) {
7794
+ return { message: isSet(object.message) ? String(object.message) : "" };
7795
+ }
7796
+ DemoteSpeakerInCommunityVoiceChatResponse_Ok.fromJSON = fromJSON;
7797
+ function toJSON(message) {
7798
+ const obj = {};
7799
+ message.message !== undefined && (obj.message = message.message);
7800
+ return obj;
7801
+ }
7802
+ DemoteSpeakerInCommunityVoiceChatResponse_Ok.toJSON = toJSON;
7803
+ function create(base) {
7804
+ return DemoteSpeakerInCommunityVoiceChatResponse_Ok.fromPartial(base !== null && base !== void 0 ? base : {});
7805
+ }
7806
+ DemoteSpeakerInCommunityVoiceChatResponse_Ok.create = create;
7807
+ function fromPartial(object) {
7808
+ var _a;
7809
+ const message = createBaseDemoteSpeakerInCommunityVoiceChatResponse_Ok();
7810
+ message.message = (_a = object.message) !== null && _a !== void 0 ? _a : "";
7811
+ return message;
7812
+ }
7813
+ DemoteSpeakerInCommunityVoiceChatResponse_Ok.fromPartial = fromPartial;
7814
+ })(DemoteSpeakerInCommunityVoiceChatResponse_Ok || (exports.DemoteSpeakerInCommunityVoiceChatResponse_Ok = DemoteSpeakerInCommunityVoiceChatResponse_Ok = {}));
7815
+ function createBaseKickPlayerFromCommunityVoiceChatPayload() {
7816
+ return { communityId: "", userAddress: "" };
7817
+ }
7818
+ var KickPlayerFromCommunityVoiceChatPayload;
7819
+ (function (KickPlayerFromCommunityVoiceChatPayload) {
7820
+ function encode(message, writer = minimal_1.default.Writer.create()) {
7821
+ if (message.communityId !== "") {
7822
+ writer.uint32(10).string(message.communityId);
7823
+ }
7824
+ if (message.userAddress !== "") {
7825
+ writer.uint32(18).string(message.userAddress);
7826
+ }
7827
+ return writer;
7828
+ }
7829
+ KickPlayerFromCommunityVoiceChatPayload.encode = encode;
7830
+ function decode(input, length) {
7831
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
7832
+ let end = length === undefined ? reader.len : reader.pos + length;
7833
+ const message = createBaseKickPlayerFromCommunityVoiceChatPayload();
7834
+ while (reader.pos < end) {
7835
+ const tag = reader.uint32();
7836
+ switch (tag >>> 3) {
7837
+ case 1:
7838
+ if (tag !== 10) {
7839
+ break;
7840
+ }
7841
+ message.communityId = reader.string();
7842
+ continue;
7843
+ case 2:
7844
+ if (tag !== 18) {
7845
+ break;
7846
+ }
7847
+ message.userAddress = reader.string();
7848
+ continue;
7849
+ }
7850
+ if ((tag & 7) === 4 || tag === 0) {
7851
+ break;
7852
+ }
7853
+ reader.skipType(tag & 7);
7854
+ }
7855
+ return message;
7856
+ }
7857
+ KickPlayerFromCommunityVoiceChatPayload.decode = decode;
7858
+ function fromJSON(object) {
7859
+ return {
7860
+ communityId: isSet(object.communityId) ? String(object.communityId) : "",
7861
+ userAddress: isSet(object.userAddress) ? String(object.userAddress) : "",
7862
+ };
7863
+ }
7864
+ KickPlayerFromCommunityVoiceChatPayload.fromJSON = fromJSON;
7865
+ function toJSON(message) {
7866
+ const obj = {};
7867
+ message.communityId !== undefined && (obj.communityId = message.communityId);
7868
+ message.userAddress !== undefined && (obj.userAddress = message.userAddress);
7869
+ return obj;
7870
+ }
7871
+ KickPlayerFromCommunityVoiceChatPayload.toJSON = toJSON;
7872
+ function create(base) {
7873
+ return KickPlayerFromCommunityVoiceChatPayload.fromPartial(base !== null && base !== void 0 ? base : {});
7874
+ }
7875
+ KickPlayerFromCommunityVoiceChatPayload.create = create;
7876
+ function fromPartial(object) {
7877
+ var _a, _b;
7878
+ const message = createBaseKickPlayerFromCommunityVoiceChatPayload();
7879
+ message.communityId = (_a = object.communityId) !== null && _a !== void 0 ? _a : "";
7880
+ message.userAddress = (_b = object.userAddress) !== null && _b !== void 0 ? _b : "";
7881
+ return message;
7882
+ }
7883
+ KickPlayerFromCommunityVoiceChatPayload.fromPartial = fromPartial;
7884
+ })(KickPlayerFromCommunityVoiceChatPayload || (exports.KickPlayerFromCommunityVoiceChatPayload = KickPlayerFromCommunityVoiceChatPayload = {}));
7885
+ function createBaseKickPlayerFromCommunityVoiceChatResponse() {
7886
+ return { response: undefined };
7887
+ }
7888
+ var KickPlayerFromCommunityVoiceChatResponse;
7889
+ (function (KickPlayerFromCommunityVoiceChatResponse) {
7890
+ function encode(message, writer = minimal_1.default.Writer.create()) {
7891
+ var _a;
7892
+ switch ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) {
7893
+ case "ok":
7894
+ KickPlayerFromCommunityVoiceChatResponse_Ok.encode(message.response.ok, writer.uint32(10).fork()).ldelim();
7895
+ break;
7896
+ case "invalidRequest":
7897
+ InvalidRequest.encode(message.response.invalidRequest, writer.uint32(18).fork()).ldelim();
7898
+ break;
7899
+ case "forbiddenError":
7900
+ ForbiddenError.encode(message.response.forbiddenError, writer.uint32(26).fork()).ldelim();
7901
+ break;
7902
+ case "notFoundError":
7903
+ NotFoundError.encode(message.response.notFoundError, writer.uint32(34).fork()).ldelim();
7904
+ break;
7905
+ case "internalServerError":
7906
+ InternalServerError.encode(message.response.internalServerError, writer.uint32(42).fork()).ldelim();
7907
+ break;
7908
+ }
7909
+ return writer;
7910
+ }
7911
+ KickPlayerFromCommunityVoiceChatResponse.encode = encode;
7912
+ function decode(input, length) {
7913
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
7914
+ let end = length === undefined ? reader.len : reader.pos + length;
7915
+ const message = createBaseKickPlayerFromCommunityVoiceChatResponse();
7916
+ while (reader.pos < end) {
7917
+ const tag = reader.uint32();
7918
+ switch (tag >>> 3) {
7919
+ case 1:
7920
+ if (tag !== 10) {
7921
+ break;
7922
+ }
7923
+ message.response = {
7924
+ $case: "ok",
7925
+ ok: KickPlayerFromCommunityVoiceChatResponse_Ok.decode(reader, reader.uint32()),
7926
+ };
7927
+ continue;
7928
+ case 2:
7929
+ if (tag !== 18) {
7930
+ break;
7931
+ }
7932
+ message.response = {
7933
+ $case: "invalidRequest",
7934
+ invalidRequest: InvalidRequest.decode(reader, reader.uint32()),
7935
+ };
7936
+ continue;
7937
+ case 3:
7938
+ if (tag !== 26) {
7939
+ break;
7940
+ }
7941
+ message.response = {
7942
+ $case: "forbiddenError",
7943
+ forbiddenError: ForbiddenError.decode(reader, reader.uint32()),
7944
+ };
7945
+ continue;
7946
+ case 4:
7947
+ if (tag !== 34) {
7948
+ break;
7949
+ }
7950
+ message.response = { $case: "notFoundError", notFoundError: NotFoundError.decode(reader, reader.uint32()) };
7951
+ continue;
7952
+ case 5:
7953
+ if (tag !== 42) {
7954
+ break;
7955
+ }
7956
+ message.response = {
7957
+ $case: "internalServerError",
7958
+ internalServerError: InternalServerError.decode(reader, reader.uint32()),
7959
+ };
7960
+ continue;
7961
+ }
7962
+ if ((tag & 7) === 4 || tag === 0) {
7963
+ break;
7964
+ }
7965
+ reader.skipType(tag & 7);
7966
+ }
7967
+ return message;
7968
+ }
7969
+ KickPlayerFromCommunityVoiceChatResponse.decode = decode;
7970
+ function fromJSON(object) {
7971
+ return {
7972
+ response: isSet(object.ok)
7973
+ ? { $case: "ok", ok: KickPlayerFromCommunityVoiceChatResponse_Ok.fromJSON(object.ok) }
7974
+ : isSet(object.invalidRequest)
7975
+ ? { $case: "invalidRequest", invalidRequest: InvalidRequest.fromJSON(object.invalidRequest) }
7976
+ : isSet(object.forbiddenError)
7977
+ ? { $case: "forbiddenError", forbiddenError: ForbiddenError.fromJSON(object.forbiddenError) }
7978
+ : isSet(object.notFoundError)
7979
+ ? { $case: "notFoundError", notFoundError: NotFoundError.fromJSON(object.notFoundError) }
7980
+ : isSet(object.internalServerError)
7981
+ ? {
7982
+ $case: "internalServerError",
7983
+ internalServerError: InternalServerError.fromJSON(object.internalServerError),
7984
+ }
7985
+ : undefined,
7986
+ };
7987
+ }
7988
+ KickPlayerFromCommunityVoiceChatResponse.fromJSON = fromJSON;
7989
+ function toJSON(message) {
7990
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
7991
+ const obj = {};
7992
+ ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) === "ok" &&
7993
+ (obj.ok = ((_b = message.response) === null || _b === void 0 ? void 0 : _b.ok)
7994
+ ? KickPlayerFromCommunityVoiceChatResponse_Ok.toJSON((_c = message.response) === null || _c === void 0 ? void 0 : _c.ok)
7995
+ : undefined);
7996
+ ((_d = message.response) === null || _d === void 0 ? void 0 : _d.$case) === "invalidRequest" &&
7997
+ (obj.invalidRequest = ((_e = message.response) === null || _e === void 0 ? void 0 : _e.invalidRequest)
7998
+ ? InvalidRequest.toJSON((_f = message.response) === null || _f === void 0 ? void 0 : _f.invalidRequest)
7999
+ : undefined);
8000
+ ((_g = message.response) === null || _g === void 0 ? void 0 : _g.$case) === "forbiddenError" &&
8001
+ (obj.forbiddenError = ((_h = message.response) === null || _h === void 0 ? void 0 : _h.forbiddenError)
8002
+ ? ForbiddenError.toJSON((_j = message.response) === null || _j === void 0 ? void 0 : _j.forbiddenError)
8003
+ : undefined);
8004
+ ((_k = message.response) === null || _k === void 0 ? void 0 : _k.$case) === "notFoundError" &&
8005
+ (obj.notFoundError = ((_l = message.response) === null || _l === void 0 ? void 0 : _l.notFoundError)
8006
+ ? NotFoundError.toJSON((_m = message.response) === null || _m === void 0 ? void 0 : _m.notFoundError)
8007
+ : undefined);
8008
+ ((_o = message.response) === null || _o === void 0 ? void 0 : _o.$case) === "internalServerError" &&
8009
+ (obj.internalServerError = ((_p = message.response) === null || _p === void 0 ? void 0 : _p.internalServerError)
8010
+ ? InternalServerError.toJSON((_q = message.response) === null || _q === void 0 ? void 0 : _q.internalServerError)
8011
+ : undefined);
8012
+ return obj;
8013
+ }
8014
+ KickPlayerFromCommunityVoiceChatResponse.toJSON = toJSON;
8015
+ function create(base) {
8016
+ return KickPlayerFromCommunityVoiceChatResponse.fromPartial(base !== null && base !== void 0 ? base : {});
8017
+ }
8018
+ KickPlayerFromCommunityVoiceChatResponse.create = create;
8019
+ function fromPartial(object) {
8020
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
8021
+ const message = createBaseKickPlayerFromCommunityVoiceChatResponse();
8022
+ if (((_a = object.response) === null || _a === void 0 ? void 0 : _a.$case) === "ok" && ((_b = object.response) === null || _b === void 0 ? void 0 : _b.ok) !== undefined && ((_c = object.response) === null || _c === void 0 ? void 0 : _c.ok) !== null) {
8023
+ message.response = {
8024
+ $case: "ok",
8025
+ ok: KickPlayerFromCommunityVoiceChatResponse_Ok.fromPartial(object.response.ok),
8026
+ };
8027
+ }
8028
+ if (((_d = object.response) === null || _d === void 0 ? void 0 : _d.$case) === "invalidRequest" &&
8029
+ ((_e = object.response) === null || _e === void 0 ? void 0 : _e.invalidRequest) !== undefined &&
8030
+ ((_f = object.response) === null || _f === void 0 ? void 0 : _f.invalidRequest) !== null) {
8031
+ message.response = {
8032
+ $case: "invalidRequest",
8033
+ invalidRequest: InvalidRequest.fromPartial(object.response.invalidRequest),
8034
+ };
8035
+ }
8036
+ if (((_g = object.response) === null || _g === void 0 ? void 0 : _g.$case) === "forbiddenError" &&
8037
+ ((_h = object.response) === null || _h === void 0 ? void 0 : _h.forbiddenError) !== undefined &&
8038
+ ((_j = object.response) === null || _j === void 0 ? void 0 : _j.forbiddenError) !== null) {
8039
+ message.response = {
8040
+ $case: "forbiddenError",
8041
+ forbiddenError: ForbiddenError.fromPartial(object.response.forbiddenError),
8042
+ };
8043
+ }
8044
+ if (((_k = object.response) === null || _k === void 0 ? void 0 : _k.$case) === "notFoundError" &&
8045
+ ((_l = object.response) === null || _l === void 0 ? void 0 : _l.notFoundError) !== undefined &&
8046
+ ((_m = object.response) === null || _m === void 0 ? void 0 : _m.notFoundError) !== null) {
8047
+ message.response = {
8048
+ $case: "notFoundError",
8049
+ notFoundError: NotFoundError.fromPartial(object.response.notFoundError),
8050
+ };
8051
+ }
8052
+ if (((_o = object.response) === null || _o === void 0 ? void 0 : _o.$case) === "internalServerError" &&
8053
+ ((_p = object.response) === null || _p === void 0 ? void 0 : _p.internalServerError) !== undefined &&
8054
+ ((_q = object.response) === null || _q === void 0 ? void 0 : _q.internalServerError) !== null) {
8055
+ message.response = {
8056
+ $case: "internalServerError",
8057
+ internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
8058
+ };
8059
+ }
8060
+ return message;
8061
+ }
8062
+ KickPlayerFromCommunityVoiceChatResponse.fromPartial = fromPartial;
8063
+ })(KickPlayerFromCommunityVoiceChatResponse || (exports.KickPlayerFromCommunityVoiceChatResponse = KickPlayerFromCommunityVoiceChatResponse = {}));
8064
+ function createBaseKickPlayerFromCommunityVoiceChatResponse_Ok() {
8065
+ return { message: "" };
8066
+ }
8067
+ var KickPlayerFromCommunityVoiceChatResponse_Ok;
8068
+ (function (KickPlayerFromCommunityVoiceChatResponse_Ok) {
8069
+ function encode(message, writer = minimal_1.default.Writer.create()) {
8070
+ if (message.message !== "") {
8071
+ writer.uint32(10).string(message.message);
8072
+ }
8073
+ return writer;
8074
+ }
8075
+ KickPlayerFromCommunityVoiceChatResponse_Ok.encode = encode;
8076
+ function decode(input, length) {
8077
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
8078
+ let end = length === undefined ? reader.len : reader.pos + length;
8079
+ const message = createBaseKickPlayerFromCommunityVoiceChatResponse_Ok();
8080
+ while (reader.pos < end) {
8081
+ const tag = reader.uint32();
8082
+ switch (tag >>> 3) {
8083
+ case 1:
8084
+ if (tag !== 10) {
8085
+ break;
8086
+ }
8087
+ message.message = reader.string();
8088
+ continue;
8089
+ }
8090
+ if ((tag & 7) === 4 || tag === 0) {
8091
+ break;
8092
+ }
8093
+ reader.skipType(tag & 7);
8094
+ }
8095
+ return message;
8096
+ }
8097
+ KickPlayerFromCommunityVoiceChatResponse_Ok.decode = decode;
8098
+ function fromJSON(object) {
8099
+ return { message: isSet(object.message) ? String(object.message) : "" };
8100
+ }
8101
+ KickPlayerFromCommunityVoiceChatResponse_Ok.fromJSON = fromJSON;
8102
+ function toJSON(message) {
8103
+ const obj = {};
8104
+ message.message !== undefined && (obj.message = message.message);
8105
+ return obj;
8106
+ }
8107
+ KickPlayerFromCommunityVoiceChatResponse_Ok.toJSON = toJSON;
8108
+ function create(base) {
8109
+ return KickPlayerFromCommunityVoiceChatResponse_Ok.fromPartial(base !== null && base !== void 0 ? base : {});
8110
+ }
8111
+ KickPlayerFromCommunityVoiceChatResponse_Ok.create = create;
8112
+ function fromPartial(object) {
8113
+ var _a;
8114
+ const message = createBaseKickPlayerFromCommunityVoiceChatResponse_Ok();
8115
+ message.message = (_a = object.message) !== null && _a !== void 0 ? _a : "";
8116
+ return message;
8117
+ }
8118
+ KickPlayerFromCommunityVoiceChatResponse_Ok.fromPartial = fromPartial;
8119
+ })(KickPlayerFromCommunityVoiceChatResponse_Ok || (exports.KickPlayerFromCommunityVoiceChatResponse_Ok = KickPlayerFromCommunityVoiceChatResponse_Ok = {}));
8120
+ function createBaseCommunityVoiceChatUpdate() {
8121
+ return { communityId: "", voiceChatId: "", createdAt: 0, status: 0, endedAt: undefined };
8122
+ }
8123
+ var CommunityVoiceChatUpdate;
8124
+ (function (CommunityVoiceChatUpdate) {
8125
+ function encode(message, writer = minimal_1.default.Writer.create()) {
8126
+ if (message.communityId !== "") {
8127
+ writer.uint32(10).string(message.communityId);
8128
+ }
8129
+ if (message.voiceChatId !== "") {
8130
+ writer.uint32(18).string(message.voiceChatId);
8131
+ }
8132
+ if (message.createdAt !== 0) {
8133
+ writer.uint32(24).int64(message.createdAt);
8134
+ }
8135
+ if (message.status !== 0) {
8136
+ writer.uint32(32).int32(message.status);
8137
+ }
8138
+ if (message.endedAt !== undefined) {
8139
+ writer.uint32(40).int64(message.endedAt);
8140
+ }
8141
+ return writer;
8142
+ }
8143
+ CommunityVoiceChatUpdate.encode = encode;
8144
+ function decode(input, length) {
8145
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
8146
+ let end = length === undefined ? reader.len : reader.pos + length;
8147
+ const message = createBaseCommunityVoiceChatUpdate();
8148
+ while (reader.pos < end) {
8149
+ const tag = reader.uint32();
8150
+ switch (tag >>> 3) {
8151
+ case 1:
8152
+ if (tag !== 10) {
8153
+ break;
8154
+ }
8155
+ message.communityId = reader.string();
8156
+ continue;
8157
+ case 2:
8158
+ if (tag !== 18) {
8159
+ break;
8160
+ }
8161
+ message.voiceChatId = reader.string();
8162
+ continue;
8163
+ case 3:
8164
+ if (tag !== 24) {
8165
+ break;
8166
+ }
8167
+ message.createdAt = longToNumber(reader.int64());
8168
+ continue;
8169
+ case 4:
8170
+ if (tag !== 32) {
8171
+ break;
8172
+ }
8173
+ message.status = reader.int32();
8174
+ continue;
8175
+ case 5:
8176
+ if (tag !== 40) {
8177
+ break;
8178
+ }
8179
+ message.endedAt = longToNumber(reader.int64());
8180
+ continue;
8181
+ }
8182
+ if ((tag & 7) === 4 || tag === 0) {
8183
+ break;
8184
+ }
8185
+ reader.skipType(tag & 7);
8186
+ }
8187
+ return message;
8188
+ }
8189
+ CommunityVoiceChatUpdate.decode = decode;
8190
+ function fromJSON(object) {
8191
+ return {
8192
+ communityId: isSet(object.communityId) ? String(object.communityId) : "",
8193
+ voiceChatId: isSet(object.voiceChatId) ? String(object.voiceChatId) : "",
8194
+ createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
8195
+ status: isSet(object.status) ? communityVoiceChatStatusFromJSON(object.status) : 0,
8196
+ endedAt: isSet(object.endedAt) ? Number(object.endedAt) : undefined,
8197
+ };
8198
+ }
8199
+ CommunityVoiceChatUpdate.fromJSON = fromJSON;
8200
+ function toJSON(message) {
8201
+ const obj = {};
8202
+ message.communityId !== undefined && (obj.communityId = message.communityId);
8203
+ message.voiceChatId !== undefined && (obj.voiceChatId = message.voiceChatId);
8204
+ message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
8205
+ message.status !== undefined && (obj.status = communityVoiceChatStatusToJSON(message.status));
8206
+ message.endedAt !== undefined && (obj.endedAt = Math.round(message.endedAt));
8207
+ return obj;
8208
+ }
8209
+ CommunityVoiceChatUpdate.toJSON = toJSON;
8210
+ function create(base) {
8211
+ return CommunityVoiceChatUpdate.fromPartial(base !== null && base !== void 0 ? base : {});
8212
+ }
8213
+ CommunityVoiceChatUpdate.create = create;
8214
+ function fromPartial(object) {
8215
+ var _a, _b, _c, _d, _e;
8216
+ const message = createBaseCommunityVoiceChatUpdate();
8217
+ message.communityId = (_a = object.communityId) !== null && _a !== void 0 ? _a : "";
8218
+ message.voiceChatId = (_b = object.voiceChatId) !== null && _b !== void 0 ? _b : "";
8219
+ message.createdAt = (_c = object.createdAt) !== null && _c !== void 0 ? _c : 0;
8220
+ message.status = (_d = object.status) !== null && _d !== void 0 ? _d : 0;
8221
+ message.endedAt = (_e = object.endedAt) !== null && _e !== void 0 ? _e : undefined;
8222
+ return message;
8223
+ }
8224
+ CommunityVoiceChatUpdate.fromPartial = fromPartial;
8225
+ })(CommunityVoiceChatUpdate || (exports.CommunityVoiceChatUpdate = CommunityVoiceChatUpdate = {}));
8226
+ exports.SocialServiceDefinition = {
8227
+ name: "SocialService",
8228
+ fullName: "decentraland.social_service.v2.SocialService",
8229
+ methods: {
8230
+ /** Get the list of friends for the authenticated user */
8231
+ getFriends: {
8232
+ name: "GetFriends",
8233
+ requestType: GetFriendsPayload,
8234
+ requestStream: false,
8235
+ responseType: PaginatedFriendsProfilesResponse,
8236
+ responseStream: false,
8237
+ options: {},
8238
+ },
8239
+ /** Get the list of mutual friends between the authenticated user and the one in the parameter */
8240
+ getMutualFriends: {
8241
+ name: "GetMutualFriends",
8242
+ requestType: GetMutualFriendsPayload,
8243
+ requestStream: false,
8244
+ responseType: PaginatedFriendsProfilesResponse,
8245
+ responseStream: false,
8246
+ options: {},
8247
+ },
8248
+ /** Get the pending friendship requests for the authenticated user */
8249
+ getPendingFriendshipRequests: {
8250
+ name: "GetPendingFriendshipRequests",
8251
+ requestType: GetFriendshipRequestsPayload,
8252
+ requestStream: false,
8253
+ responseType: PaginatedFriendshipRequestsResponse,
8254
+ responseStream: false,
8255
+ options: {},
8256
+ },
8257
+ /** Get the sent friendship requests for the authenticated user */
8258
+ getSentFriendshipRequests: {
8259
+ name: "GetSentFriendshipRequests",
8260
+ requestType: GetFriendshipRequestsPayload,
8261
+ requestStream: false,
8262
+ responseType: PaginatedFriendshipRequestsResponse,
8263
+ responseStream: false,
8264
+ options: {},
8265
+ },
8266
+ /** Create or update friendship status: REQUEST, ACCEPT, REJECT, CANCEL, DELETE */
8267
+ upsertFriendship: {
8268
+ name: "UpsertFriendship",
8269
+ requestType: UpsertFriendshipPayload,
8270
+ requestStream: false,
8271
+ responseType: UpsertFriendshipResponse,
8272
+ responseStream: false,
8273
+ options: {},
8274
+ },
8275
+ /** Subscribe to updates of friendship status: REQUEST, ACCEPT, REJECT, CANCEL, DELETE */
8276
+ subscribeToFriendshipUpdates: {
8277
+ name: "SubscribeToFriendshipUpdates",
8278
+ requestType: empty_gen_1.Empty,
8279
+ requestStream: false,
8280
+ responseType: FriendshipUpdate,
8281
+ responseStream: true,
8282
+ options: {},
8283
+ },
8284
+ /** Get the friendship status between the authenticated user and the one in the parameter */
8285
+ getFriendshipStatus: {
8286
+ name: "GetFriendshipStatus",
8287
+ requestType: GetFriendshipStatusPayload,
8288
+ requestStream: false,
8289
+ responseType: GetFriendshipStatusResponse,
8290
+ responseStream: false,
8291
+ options: {},
8292
+ },
8293
+ /** Subscribe to connectivity updates of friends: ONLINE, OFFLINE, AWAY */
8294
+ subscribeToFriendConnectivityUpdates: {
8295
+ name: "SubscribeToFriendConnectivityUpdates",
8296
+ requestType: empty_gen_1.Empty,
8297
+ requestStream: false,
8298
+ responseType: FriendConnectivityUpdate,
8299
+ responseStream: true,
8300
+ options: {},
8301
+ },
8302
+ blockUser: {
8303
+ name: "BlockUser",
8304
+ requestType: BlockUserPayload,
8305
+ requestStream: false,
8306
+ responseType: BlockUserResponse,
8307
+ responseStream: false,
8308
+ options: {},
8309
+ },
8310
+ unblockUser: {
8311
+ name: "UnblockUser",
8312
+ requestType: UnblockUserPayload,
8313
+ requestStream: false,
8314
+ responseType: UnblockUserResponse,
8315
+ responseStream: false,
8316
+ options: {},
8317
+ },
8318
+ getBlockedUsers: {
8319
+ name: "GetBlockedUsers",
8320
+ requestType: GetBlockedUsersPayload,
8321
+ requestStream: false,
8322
+ responseType: GetBlockedUsersResponse,
8323
+ responseStream: false,
8324
+ options: {},
8325
+ },
8326
+ getBlockingStatus: {
8327
+ name: "GetBlockingStatus",
8328
+ requestType: empty_gen_1.Empty,
8329
+ requestStream: false,
8330
+ responseType: GetBlockingStatusResponse,
8331
+ responseStream: false,
8332
+ options: {},
8333
+ },
8334
+ subscribeToBlockUpdates: {
8335
+ name: "SubscribeToBlockUpdates",
8336
+ requestType: empty_gen_1.Empty,
8337
+ requestStream: false,
8338
+ responseType: BlockUpdate,
8339
+ responseStream: true,
8340
+ options: {},
8341
+ },
8342
+ /** Get all the social settings for the authenticated user */
8343
+ getSocialSettings: {
8344
+ name: "GetSocialSettings",
8345
+ requestType: empty_gen_1.Empty,
8346
+ requestStream: false,
8347
+ responseType: GetSocialSettingsResponse,
8348
+ responseStream: false,
8349
+ options: {},
8350
+ },
8351
+ /** Insert or update the social settings for the authenticated user */
8352
+ upsertSocialSettings: {
8353
+ name: "UpsertSocialSettings",
8354
+ requestType: UpsertSocialSettingsPayload,
8355
+ requestStream: false,
8356
+ responseType: UpsertSocialSettingsResponse,
8357
+ responseStream: false,
8358
+ options: {},
8359
+ },
8360
+ /** Get the private messages privacy settings for the requested users */
8361
+ getPrivateMessagesSettings: {
8362
+ name: "GetPrivateMessagesSettings",
8363
+ requestType: GetPrivateMessagesSettingsPayload,
8364
+ requestStream: false,
8365
+ responseType: GetPrivateMessagesSettingsResponse,
8366
+ responseStream: false,
8367
+ options: {},
8368
+ },
8369
+ /** Subscribe to community member connectivity updates: ONLINE, OFFLINE */
8370
+ subscribeToCommunityMemberConnectivityUpdates: {
8371
+ name: "SubscribeToCommunityMemberConnectivityUpdates",
8372
+ requestType: empty_gen_1.Empty,
8373
+ requestStream: false,
8374
+ responseType: CommunityMemberConnectivityUpdate,
8375
+ responseStream: true,
8376
+ options: {},
8377
+ },
8378
+ /** Start a private voice chat */
8379
+ startPrivateVoiceChat: {
8380
+ name: "StartPrivateVoiceChat",
8381
+ requestType: StartPrivateVoiceChatPayload,
8382
+ requestStream: false,
8383
+ responseType: StartPrivateVoiceChatResponse,
8384
+ responseStream: false,
8385
+ options: {},
8386
+ },
8387
+ /** Accept a private voice chat */
8388
+ acceptPrivateVoiceChat: {
8389
+ name: "AcceptPrivateVoiceChat",
8390
+ requestType: AcceptPrivateVoiceChatPayload,
8391
+ requestStream: false,
8392
+ responseType: AcceptPrivateVoiceChatResponse,
8393
+ responseStream: false,
8394
+ options: {},
8395
+ },
8396
+ /** Reject a private voice chat */
8397
+ rejectPrivateVoiceChat: {
8398
+ name: "RejectPrivateVoiceChat",
8399
+ requestType: RejectPrivateVoiceChatPayload,
8400
+ requestStream: false,
8401
+ responseType: RejectPrivateVoiceChatResponse,
8402
+ responseStream: false,
8403
+ options: {},
8404
+ },
8405
+ /** End a private voice chat */
8406
+ endPrivateVoiceChat: {
8407
+ name: "EndPrivateVoiceChat",
8408
+ requestType: EndPrivateVoiceChatPayload,
8409
+ requestStream: false,
8410
+ responseType: EndPrivateVoiceChatResponse,
8411
+ responseStream: false,
8412
+ options: {},
8413
+ },
8414
+ /** Get the incoming private voice chat request */
8415
+ getIncomingPrivateVoiceChatRequest: {
8416
+ name: "GetIncomingPrivateVoiceChatRequest",
8417
+ requestType: empty_gen_1.Empty,
8418
+ requestStream: false,
8419
+ responseType: GetIncomingPrivateVoiceChatRequestResponse,
8420
+ responseStream: false,
8421
+ options: {},
8422
+ },
8423
+ /** Subscribe to private voice chat updates */
8424
+ subscribeToPrivateVoiceChatUpdates: {
8425
+ name: "SubscribeToPrivateVoiceChatUpdates",
8426
+ requestType: empty_gen_1.Empty,
8427
+ requestStream: false,
8428
+ responseType: PrivateVoiceChatUpdate,
8429
+ responseStream: true,
8430
+ options: {},
8431
+ },
8432
+ /** Start a community voice chat (moderator/owner only) */
8433
+ startCommunityVoiceChat: {
8434
+ name: "StartCommunityVoiceChat",
8435
+ requestType: StartCommunityVoiceChatPayload,
8436
+ requestStream: false,
8437
+ responseType: StartCommunityVoiceChatResponse,
8438
+ responseStream: false,
8439
+ options: {},
8440
+ },
8441
+ /** Join a community voice chat */
8442
+ joinCommunityVoiceChat: {
8443
+ name: "JoinCommunityVoiceChat",
8444
+ requestType: JoinCommunityVoiceChatPayload,
8445
+ requestStream: false,
8446
+ responseType: JoinCommunityVoiceChatResponse,
8447
+ responseStream: false,
8448
+ options: {},
8449
+ },
8450
+ /** Request to speak in community voice chat */
8451
+ requestToSpeakInCommunityVoiceChat: {
8452
+ name: "RequestToSpeakInCommunityVoiceChat",
8453
+ requestType: RequestToSpeakInCommunityVoiceChatPayload,
8454
+ requestStream: false,
8455
+ responseType: RequestToSpeakInCommunityVoiceChatResponse,
8456
+ responseStream: false,
8457
+ options: {},
8458
+ },
8459
+ /** Promote speaker in community voice chat (moderator only) */
8460
+ promoteSpeakerInCommunityVoiceChat: {
8461
+ name: "PromoteSpeakerInCommunityVoiceChat",
8462
+ requestType: PromoteSpeakerInCommunityVoiceChatPayload,
8463
+ requestStream: false,
8464
+ responseType: PromoteSpeakerInCommunityVoiceChatResponse,
8465
+ responseStream: false,
8466
+ options: {},
8467
+ },
8468
+ /** Demote speaker in community voice chat (moderator only) */
8469
+ demoteSpeakerInCommunityVoiceChat: {
8470
+ name: "DemoteSpeakerInCommunityVoiceChat",
8471
+ requestType: DemoteSpeakerInCommunityVoiceChatPayload,
8472
+ requestStream: false,
8473
+ responseType: DemoteSpeakerInCommunityVoiceChatResponse,
8474
+ responseStream: false,
8475
+ options: {},
8476
+ },
8477
+ /** Kick player from community voice chat (moderator only) */
8478
+ kickPlayerFromCommunityVoiceChat: {
8479
+ name: "KickPlayerFromCommunityVoiceChat",
8480
+ requestType: KickPlayerFromCommunityVoiceChatPayload,
8481
+ requestStream: false,
8482
+ responseType: KickPlayerFromCommunityVoiceChatResponse,
8483
+ responseStream: false,
8484
+ options: {},
8485
+ },
8486
+ /** Subscribe to community voice chat updates (only 'started' events) */
8487
+ subscribeToCommunityVoiceChatUpdates: {
8488
+ name: "SubscribeToCommunityVoiceChatUpdates",
8489
+ requestType: empty_gen_1.Empty,
8490
+ requestStream: false,
8491
+ responseType: CommunityVoiceChatUpdate,
6411
8492
  responseStream: true,
6412
8493
  options: {},
6413
8494
  },